# Disable rotation on physics collision

In my game, i want the character to collide with stuff for the hit events. However collisions rotate and translate the character, which i do not want. Can I turn this off, and still have the hit events?

I have physics turned on for my character so it fires hit events with the rest of the world.

Cheers

Hey

I had a similar problem in a demo I was building. I came up with the following solution. First I bumped up the Angular Damping on my pawn to a big number (100000). Then I created the following blueprint on my pawn Blueprint Event Tick.

You could probably create this in your collision event, so that every time your pawn or character collides the rotation will go back to how it was. Due to my circumstances I had to create it in the Event Tick. Hope this helps.

Cheers

Iâ€™m facing the same problem and Iâ€™m using the same script of your capture. I think this is a bug and should be reported. I mean, if I set the rotation every tick, even when the object collide in one frame, the next frame it should be rotated whit the desired value but itâ€™s not, the character rotates a little and then the script rotate it from this rotation. I donâ€™t think this is the correct behavior.

What do you think?

This script limits the rotation on the X and Y. In my case I have a ship that when it collides it stays in the upright position. In what circumstances are you using this script?

Suppose we have a force being applied to a body. Take the force vector and extend it to infinity in both directions. If the resultant line doesnâ€™t go through the center of mass of the body, the force will induce a torque (causing rotation). When your physics body collides with another actor a force is applied at the point of contact. Here is a simplified version of whatâ€™s going on.

To prevent your body from rotating you would need the resultant impact force to point towards the center of mass. You can achieve this by adding a Sphere Collision component centered at the bodyâ€™s center of mass as well as using a zero-friction Physics Material. If you donâ€™t want any bounce you can set the restitution to zero (in the physics material).

Apologies for bringing this thread back to life, but had a similar problem and found a simple solution that works for me.

In the StaticMesh youâ€™re simulating physics on, under the â€śPhysicsâ€ť section, expand the advanced options and increase the â€śInertia Tensor Scaleâ€ť variable.

Now, when running into objects, my physics object no longer rotates. Yay!

1 Like