Hi
I was wondering if there was a way to render a crosshair on a 2d Object like a surface dynamically?
Thanks,
Chris
Hi
I was wondering if there was a way to render a crosshair on a 2d Object like a surface dynamically?
Thanks,
Chris
Couple of options for this:
Create a crosshairs image, with transparent background. Create a sprite gameobject, with this texture, and assign this gameobject as a child of the targeted gameobject. Note: it’s local transform will need to be slightly closer to the camera, in order to render in FRONT of the targeted object.
An alternative method would be to use the GL drawing functions (Unity - Scripting API: GL), to manually draw the lines for the cross hair, based on the transform of the targeted object. This will probably be much trickier than the sprite method suggested above.