How to disable movement along a certain axis

cridia
Fri, 10 Jun 2016 09:18:31 +0000
World Creation

I am making a sidescroller, where movement is predominantly along the Y and Z axis. However, when interacting with certain objects (for instance, when colliding with spherical or cylindrical objects), the character tends to get moved along any axis the engine deems fit, including the X axis. This is problematic, since it moves the character out of range of any objects the character can interact with.

Now I have tried constraining the player through the way I have found through the answerhub, but no luck so far. I have tried locking the translation in the bodyinstance of the main capsule component, I have tried setting up some constrains using the character movement component, but nothing I have found so far seems to work.

Does anyone know how I can permanently disable movement along the X axis and the X axis alone, for a player character?

5 posts - 5 participants