How to disable movement along a certain axis
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?
asked Jun 10 '16 at 09:18 AM in C++ Programming
Just found a solution to this problem in the Side Scroller template project in version UE 4.20. Looks like the settings you want are in the Character Movement Component under "Planar Movement":
No idea why those settings aren't set by default for the Side Scroller template project...
I realise it's probably too late for this to help you now, but hopefully it will help others with the same problem (I found your question searching for the solution to this problem)
answered Aug 18 '18 at 03:24 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here