Author Topic: show selected object  (Read 2806 times)

Offline athanazio

  • byte
  • *
  • Posts: 49
    • View Profile
    • http://www.athanazio.pro.br
show selected object
« on: December 10, 2006, 05:20:41 am »
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 ?

Offline Mizuki Takase

  • int
  • **
  • Posts: 97
    • View Profile
show selected object
« Reply #1 on: December 11, 2006, 04:24:11 pm »
That sounds reasonable and easy to execute... Maybe add child and remove child, where the child is the aura that you are talking about?

Offline athanazio

  • byte
  • *
  • Posts: 49
    • View Profile
    • http://www.athanazio.pro.br
show selected object
« Reply #2 on: December 11, 2006, 04:47:06 pm »
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.

Offline eye1

  • int
  • **
  • Posts: 68
    • View Profile
show selected object
« Reply #3 on: December 11, 2006, 04:52:41 pm »
create really thin object and set transparency to some percent. I think that may work

Offline Mizuki Takase

  • int
  • **
  • Posts: 97
    • View Profile
show selected object
« Reply #4 on: December 12, 2006, 04:16:30 pm »
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!