- Home /
how do i make a (3d/in world) button?
how would i make a proper 3d button. I'm not talking about a GUI button.
I'm making a tank game, and i want the player to be-able to drive onto a button (it's a cartoon tank game) and instantiate a force field?
i want to know how i can make a button that is press-able(tank drives on button. button falls down, the instantiate happens, tank drives off of button)?
Answer by equalsequals · Jul 16, 2010 at 05:46 PM
I would use a Collider, set it's isTrigger property to true, and then use the event OnTriggerEnter to cue an animation of the button being pressed and cause the forcefield to engage. Similarly you could then use the OnTriggerExit event to cause the button to pop back up.
Cheers
==
Your answer
Follow this Question
Related Questions
Instantiate buttons for different actions 0 Answers
Instantiate Object At Local Position 2 Answers
Pressing space calls the wrong function 1 Answer
when float is less then zero, do action once 1 Answer
Button then instanitates gameobject 1 Answer