I’m trying to make ragdoll physics fencing game and I struggle with constraining movement to the XY plane.
As you can see I have set everything (except that I have restricted movement to XY and in example it’s XZ) as in example: Applying 2D Physics | Unreal Engine Documentation
Arms structure is sprites attached to boxes that are simulated and boxes are constrained to each other like bones, but arm is constrained with an unsimulated capsule component.
I’ve printed world location and rotation for one component (right forearm the one I move with applied force), according to the screenshot when I step in on the other character (I move my pawn with Velocity or AddWorldOffset (with sweep and teleport on) my pawn’s contraints don’t restrict movement 100% of the time. There are small movements in pitch and roll that shouldn’t happen and also Z plane isn’t cut out. Also I don’t understand why my character doesn’t stop when steps on another enemy (collisions double-checked for every component).
This issue occurs for me even in the 2d sidescroller example set physics simulation and constraint to XZ plane when ledge hits the ground or when you apply force that works against constrainted planes there is movement on the restricted Y plane and rotation changes also occur.
This is how I’ve set physics settings for the simulated component:
Also whole arm glitches when two characters collide and I noticed that parts are sometimes not even attached to each other. :