show selected object

Started by athanazio, December 10, 2006, 05:20:41 AM

Previous topic - Next topic

athanazio

I'm thinking about to show the current selected object, using a elipse at the ground where the object is like this image bellow :



any ideas ?

was thinking about an transparent plane between the ground and the character base and draw on this plane ... not sure if it will work or not ...

suggestions ?

Mizuki Takase

That sounds reasonable and easy to execute... Maybe add child and remove child, where the child is the aura that you are talking about?

athanazio

the aura and the green circle to show that the object is selected ...
I'm not sure how to set the texture transparency to put a plane close to the ground and still show the ground texture.

eye1

create really thin object and set transparency to some percent. I think that may work

Mizuki Takase

Object3D has a function called setTransparency(int)... I was recommending that you create your selection aura as a plane with some transparency on it and then addChild from the selected parent.

You can also do something like the car sample to place the circle properly on the ground. I believe that the car sample has 4 surrounding children that help calculate the angle and height where the parent should be, which is the selection aura in your case. If your level is all flat, then maybe the selection aura can figure out how high it should be placed; I was mentioning the car sample's 4 children because that demo has hills and so on...

I hope this helps!