[SOLVED] Freeze Rotation : rigidbody goes through objects

Hi all and happy new year, best wishes to all Uniterz :slight_smile:

Can someone tell me why when I set “Freeze Rotation” on my player’s rigidbody it goes through objects that have colliders ? When I turn it off, the collisions occur normally…

I have to make a cannon/rocket-man (like in Pain on PS3) that bounces on the terrain to reach the farthest distance to win. I’m adding a big relative force on Z at launch to make the player go straight (on Z) and a little relative force on Y to make it fall.

Any idea please ?

Thanks

Edit : I rewrited the code and it works now, I think it was a badly downwards applied force and several physical material settings that caused the problem.
Ciao !

Are you moving the player by changing its velocity or by using transform.Translate()?

I use AddRelativeForce once in Impulse style on the rigidbody to launch it.

I’ve tried to uncheck “use gravity” on the rigidbody and add a force to the bottom by code, but it’s the same behaviour…

plz help :slight_smile:

Well, the object is moving fast enough it can clip through other objects due to the distance moved per frame. Have you tried shooting it through those same objects at a slow speed? If it doesn’t collide even then, I’d probably have to see it in action to figure out what was going on.

Ok, I’ll try it with slow speed :smile:

I tried slow speed but no change :frowning:

Here’s a debug version if you change have a look. Just press space to launch the player, if you uncheck Freeze Rotation in the editor, you’ll see that it collides well with the terrain…

Upload on the forum seems to be broken, so I used an upload site :

Thanks

You can also select the continuous option in the collision detection drop down in the rigidbody settings.