x


Rigidbody Physics Fail - simple example included

We're having trouble getting objects to collide reliably in Unity 3.5. The attached bare-bones example Unity project illustrates the problem: spheres are periodically given a force directed at a plane, and they should bounce off the plane, but instead pass straight through. Please note that:

  • the ball has a sphere collider that is not trigger
  • the ball has a rigidbody with collision detection set to continuous dynamic
  • the wall has a box collider that is not trigger

Shouldn't the ball collide with the wall? Are we missing something? Is this a known issue? Is there a workaround?

Thanks in advance for your thoughts!

collision_fail.zip

collision_fail.zip (26.5 kB)
more ▼

asked May 21 '12 at 07:06 PM

tektor gravatar image

tektor
31 1 2

Is the balls rigidbody set to kinematic or non-kinematic?

May 21 '12 at 10:51 PM hijinxbassist

it's non-kinematic. a force is added to it.

May 22 '12 at 08:12 PM tektor
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

At first I thought it was because the zipped example was missing a collider on the wall!

I was able to fix the problem by adding some depth to the collider on the wall. Add a box collider back to it and then give it some more depth. I think in your previous example it was simply calculating before the hit and then again on the other side of the wall (completely overlooking a thin collider). That solved it for me when I added this one item to your file.

more ▼

answered May 22 '12 at 10:12 PM

torrente gravatar image

torrente
355 3

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2488
x1866
x1787

asked: May 21 '12 at 07:06 PM

Seen: 460 times

Last Updated: May 22 '12 at 10:12 PM