- Home /
Disable and hide object after collision between player and cube
Good evening everyone, I have a problem with Unity3d. I would like to disable or get rid of a gameobject after a collision between player and Cube.
How can I fix this? Thanks to all
What have you tried so far? Please post your script as it is at the moment for us to see. If you don't have a script yet then please try to write one before you ask for help, we do not write scripts to order...
Here are a couple of links to help you get started :
http://docs.unity3d.com/$$anonymous$$anual/CollidersOverview.html
http://unity3d.com/learn/tutorials/modules/beginner/physics/colliders
http://docs.unity3d.com/ScriptReference/Collider.OnCollisionEnter.html
http://unity3d.com/learn/tutorials/modules/beginner/physics/on-collision-enter
and :
http://docs.unity3d.com/ScriptReference/Renderer-enabled.html
http://unity3d.com/learn/tutorials/modules/beginner/scripting/destroy
http://docs.unity3d.com/ScriptReference/Object.Destroy.html
:)
Answer by Eck · Nov 23, 2014 at 01:02 PM
Go through the first video tutorial series. It walks you through step by step how to setup collision detection between a player (sphere) and a cube. It's the "Roll a Ball" tutorial.
Your answer
Follow this Question
Related Questions
on collision, show/hide other model scripting ? 1 Answer
Parent Object 0 Answers
How do I get rid of white lines when objects collide? 1 Answer
How to do something when an object is in the player sights. 2 Answers
Player object falling through game environment, collision not detected with ground 0 Answers