- Home /
RTS-style selection circle/marquee
How do I go about doing a selection circle, like in many RTS games, when I select a game-object? I believe it is to take a texture of a 2D circle, assign it to a flatten gameobject, and position it such that it will be at the center of the object.
- How do I find the size of an existing object?
- Is there any definite way to get the center location of a object, despite its pivot? This is because different game-objects may have different pivot points.
- If I am using terrain, how do I make it such that the texture maps to the terrain, if therre are slopes?
Samples are appreciated if they exist on the Internet.
Answer by qJake · May 23, 2010 at 05:47 AM
If you're using terrain, and you want your selection circle to paint on the terrain underneath the object, you need to use a Projector.
They can be a little tricky to set up, having the correct art assets for the cookie as well as the selection texture, but if you get it setup right, it should do exactly what you want.
There's a projector example in the Standard Assets folder that comes with Unity. You should check it out and learn how it works, then try to implement your own in your game.
Answer by Ricardo · Jun 06, 2010 at 10:24 AM
For #3, you may want to see the Unite '09 conference on shader tricks. The demonstrated expansion of color in Puzzle Bloom might be appropriate for what you want, although you may need to project an object on top of your terrain.
Your answer
![](https://koobas.hobune.stream/wayback/20220613020248im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Adding force to a bullet 3 Answers
Changing 3d text through script 1 Answer
Creating a bounding box for multiple objects using bounds 2 Answers
3D Menu Help 1 Answer