- Home /
Gui Essentials Collision Tutorial didn't work
Hi I am new to unity, and I was following the gui essentials tutorial to get started. At the end it had me create a plane and two boxes the bottom box has a box collider and the top box has a rigidbody, which has gravity turned on. The tutorial says that when I play the scene the top box will collide with the bottom box, and land on the plane. However what happens is the top box goes right through both the bottom box and the plane. I have search the forums and tried changing many of the different options and can not figure this out. I'm sure this is something simple I am missing, any help would be appreciated.
Answer by Meltdown · Mar 02, 2011 at 09:38 AM
Add a box collider or mesh collider to the plane. Make sure there is also a box collider or mesh collider on the bottom box
I have done that already that's why I can't understand why it won't work. The bottom box and the plane both have a box collider.
If you are using oncollosion enter and you want the box should stay in plane uncheck the is trigger in box collider in bottom box if not clearly mention your problem with sample code
Right, if you use any scripts, add them to your question (edit). Like robert mentioned: if you want collisions don't mark any of the colliders with isTrigger. A trigger can't collide, it just sends trigger messages if you intersect. btw. are you sure the boxes "goes right through" eachother? $$anonymous$$aybe try a different camera angle to see if they really collide
Are you referring to this one http://download.unity3d.com/support/Tutorials/1%20-%20GUI%20Essentials.pdf ? Another little hint: If you select an object the collider shape is drawn with green lines make sure you haven't offset it from the actual objects mesh.
Wow thanks for the response I'm actually referring to the Gui Essentials pdf tutorial on this page. http://unity3d.com/support/documentation/$$anonymous$$anual/Tutorials.html, there is no scripting involved on the second to the last page it just says to add the rigidbody to a bube and then add a collide to another cube and press play it should work. I'm not using any trigger and the boxes do go right through each other, I have changed the camera angles and it in.