After Collision--turning pulls to one side

The conditions:
I have mixed physics and transform–to great effect. I am steering a vehicle down a hill, where it jumps off things, slides, etc.

Everything is in terms or AddRelativeForce, except…

transform.Rotate(Vector3.up, steer);
for smooth control that feels more natural then torque. That is the only ‘mixing’ i have done.

The only remaining issue in the control scheme has to do with collisions.
After the object goes off a jump, if it lands slightly turned, it has torque and spins the vehicle–which is good, it feels natural.

However, when i turn against that torque, instead of slowly balancing it out, the torque is continually applied. It only stops when the vehicle stops, I turn the vehicle around backwards (in the direction im being pulled), or collide with another object (other than the ground)

The only real solution I’ve found is to increase static friction to prevent sliding altogether. I’m not even sure adding torque would solve it.

I really don’t want to add torque–it makes the controls very difficult and unnatural (at least in my very limited experience). Once torque brakes static friction (in order to turn) i spin wildly out of control.

Is freezeRotation set to false on your Rigidbody?

no, because i need it to rotate with physics (changing inclines and bouncing off things.

the problem is strange–everything is working as intended unless you fight the physics after a collision.

It’s as if the physics has a target rotation it thinks it should reach, and keeps trying to turn the object until it reaches that rotation–my controls only delay the rotation, they don’t totally override it.

Just guessing, but have you tried reseting the inertialTensorRotation in the situation you describe? I have no idea what would happen :smile:

Interesting idea.

That sounds like it might work–or do something crazy–

I just haven’t figured out how to describe the conditions around what is happening in code yet… That is usually the hardest part.

I adjusted the angular drag value, and that seems to have sorted the issue. It was so low that it would never stop turning. Maybe that is why I had trouble with adding torque.