Unity drawing game




















First, we want to make our white image take up the whole screen. You do this by selecting the Raw Image , then over in the inspector, you can make the raw image stretch to fill the screen, regardless of screen size, by clicking on the Anchor Presets image by default it looks like a square with a red plus going over it , holding Alt, and clicking the box with the horizontal and vertical blue arrows, in the lower left corner.

If you run the game now, and move the face around a bit, you should see what this means, and you might start to see how this is all going to work. Before anything else, the raw image is going to get in the way. You can get mine here. Mine is 2C3E With the brush selected, you should see Layer: Default over in the top right corner of the inspector.

Do so, and add a brushes layer, then go back to your brush and set its layer to your new one. Then, over in our drawing camera, we can restrict the layers it sees, so it only sees the Brushes layer. Click on the Culling Mask option, and select none, then add Brushes. Finally, we just set the object with this script to the mouse position. So if the mouse is being held, the graphic is drawn, and if the mouse is not held, the graphic is not drawn.

It looks good, but I don't know if it is what I'm looking. So far it looks like it's the best Unity-related solution. Vectrosity does free-hand lines pretty well; see here. Click once in the window and use the mouse to draw. I am of course biased, but if I were programming this, I would totally use Vectrosity since it would get the best results with minimum effort. Eric5h5 : "Vectrosity does free-hand lines pretty well; see here.

I want to be able to perform free hand writing. Eric, your asset can do all that right? I can erase as well right? The link you posted above when you mentioned free hand-writing is exactly what I'm looking for.

But whenever I draw something, it gets cleared out the next time I draw something else. Eric5h5 : That's it, I'm buying :D - Just curious, hope you don't mind me asking, how did you become that good? Eric5h5 : Out of curiosity, how did you solve the 65k vertices limit problem? I remember running into that when writing my own line-drawing utility a few years back for an oil-sim wire-line logs.

Use this line-drawing method to draw lines on your texture. You save changes to the texture using myTexture. Plus, the texture can be saved easily to disk using myTexture. BTW text is going to be much harder, unless you want them to write text using lines.

The plus side of that is that you can "zoom-in" and "pan" etc. Your lines are true vectors. They don't appear jagged. You can also create text using TextMesh and it will play nice with your lines.

You cant go wrong with anything done by Eric Haines Eric5h5. You can have 3D lines as well, so you retain the advantages of 2. You can use UnityPaint as a base-line to build your own stuff.

Thanks for your answer. I'm not thinking of letting him change the thickness or whatever, just markers, pencils and erasers how can I erase?

Panning isn't really important unless we have a big map, but it would be definitely nice to have around, same for zooming in and out, I expect my game designer to have big maps, so it's better to take caution measures.

If Eric's tool does all that, I'm going for it. Have you worked with it? If you are using a texture, then zooming-in, by "any" means, will cause either pixelation, or blurriness, depending on your texture filter.

It might be a Known Issue. Please check with the Issue Tracker at issuetracker. Version: Language English. Scripting API. Suggest a change. Submission failed For some reason your suggested change could not be submitted.

Parameters start Point in world space where the line should start. Description Draws a line between specified start and end points.



0コメント

  • 1000 / 1000