- Home /
I can't get ANY simple collision to work!
I just started using unity recently and I have watched all the 'getting started' tutorials. My problem is, I simply can't get ANYTHING to collide... I'm using Unity 3.4.2f3 on windows 7.
All I do is insert a simple plane object with [mesh collider], then a cube with a [box collider] and [rigid body]. I put the cube above the plane, hit play, and it falls right through.
In addition I have tried making the mesh collider convex, tried different combinations of colliders with one another (including convex mesh collider on both objects), tried making the plane static, etc.... What in the world am I missing here?
I really want to learn this program, but if I can't even figure this out... lol. I looked at all of the components attached to the objects in the tutorial video on cgcookie.com "Unity: Intro to User Interface Part 2" and everything seems to be identical, yet here I am... Somebody please help me!!! xD
edit: I tried applying [rigid body] to both objects and using different combinations of colliders with that as well (including checking and unchecking kinematic on both)... still has fallen through every time.
edit: Also, all the collision detection with the Bootcamp demo works just fine.
Did you check that the layer of your objects are set to collide within the PhysX engins? See: http://unity3d.com/support/documentation/Components/Layer%20Based%20Collision%20detection.html
I just did a simple scene with a plane (GameObject->Create Other->Plane) and a cube (GameObject->Create Other->Plane). I added a rigidbody to the cube and hit Start. And it works just fine.
@$$anonymous$$obius42: Uhmm, wasn't that exactly what you've done already? At least that's what you've said in your question. Now you said "that's what is was". I don't get it...
$$anonymous$$ryptos said: "Did you check that the layer of your objects are set to collide within the PhysX engins? See: http://unity3d.com/support/documentation/Components/Layer%20Based%20Collision%20detection.html"
$$anonymous$$y layer settings WERE messed up. That's exactly what the problem was. Thx again! :D
Answer by Bunny83 · Jan 15, 2012 at 02:04 AM
Never had such an issue. Make sure:
the objects arent parented to each other.
you didn't set some strange settings in the collision matrix in the physics settings.
moving objects with rigidbody have either primitive collider(box, sphere, capsule) or a convex meshcollider
you don't directly move the object "manually" by setting the transform.position.
Thanks for the response. I'll double check all those things right now.
@$$anonymous$$obius42: Don't use the Answer function to comment on other posts. Answers should only be used to answer the question. I've converted your answer into a comment.
@Bunny83: Sorry, first time poster. I noticed what I had done after I already clicked submit hehe. Thank YOU as well, I didn't realize the collision matrix settings you referred to was the same thing kryptos was talking about.
Answer by Meltdown · Jan 15, 2012 at 08:33 AM
Don't use a plane with a mesh collider. Remove the mesh collider from it and add a box collider to it. I've had numerous issues with mesh collider collisions you should try use a box collider where possible.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Precise Collision Detection 0 Answers
Problem with acing problems with : OnTriggerEnter 0 Answers
On Collision, Create a Cube? 1 Answer
How To: One collider for detection; one for collision. 1 Answer