2D game.
I have map (NxN of sprites) and on its right I have some NGUI elements (weapons selection and etc.).When I choose and drag some weapon I need to show around it the effect radius of weapon.
What is the best way to do it?
2D game.
I have map (NxN of sprites) and on its right I have some NGUI elements (weapons selection and etc.).When I choose and drag some weapon I need to show around it the effect radius of weapon.
What is the best way to do it?
3 ways (all of them are almost the same):
You can track the position of your weapon, and convert the Vector3
into screen position. Use the screen position to draw a texture on screen
Track the position of the weapon, use a textured plane to follow the position. At the same time, use LookAt()
on the camera to make sure the texture plane is not distorted. This is like a texture billboard.
Use a semi-transparent material on the sphere, track the position of the weapon.
For all these methods, you can destroy the display object/script when you are done. But you can disabled them as well, perhaps later you would like to show the radius of a weapon when you selected it.