I am stuck between a rock and a hard place.
I don’t want to write my own physics engine, or buy someone else’s most-likely buggy in some other unforeseen way physics engine from the marketplace.
I am using unity’s Rigidbody2D physics.
If you check OFF Freeze Rotation Z, the physics works as expected, however all of the object’s children components also rotate with the parent.
If you check ON Freeze Rotation Z, the entire physics system stops working. An object that hits a surface will bounce along the surface’s normal vector instead of relative to the angle from which it hit the surface. Completely unusable.
How do I fix it so I can have the behaviour of Freeze OFF with Freeze ON?
It is not enough to ‘just write a script that locks the Z rotation of every child’ because I have all kinds of other circumstances where I DO want the children to rotate, and it would be basically a total re-write full of potentially easily fucked up bugs trying to constantly lock and unlock the Z rotation.