- Home /
Question by
LeSph4x · Jun 10, 2017 at 07:16 AM ·
physicscollision detectionrigidbody-collision
OnCollisionEnter called before actual collision
Hello !
So I am throwing a ball and controlling its x and z position via a script while the rigidbody changes the y position via gravity.
When the ball hits a wall the script stops controlling the position of the ball.
My problem is that OnCollisionEnter seems to be called before the ball and the wall touch each other. Actually if the ball is not on a trajectory to hit the wall but is just really close to the wall, OnCollisionEnter seems to be called anyway.
Here are some images of the game paused on the "OnCollisionEnter" call
With the physics debugger on
If you have any idea of what could cause this I would be glad to hear it :)
colliding-early.png
(52.9 kB)
collidingearly2.png
(32.6 kB)
Comment