Unreal Sidescroller, character collission issues

We’re currently working on a side-scrolling game inside of Unreal 4, however we’ve run into some issues when it comes to making sure that the character stays on the X-axis.

When the character meets certain collision boxes they sometimes push him off of the X-axis and he may end up falling off of the stage. We’ve attempted to use some large blocking volumes but this causes some issues with AI navigation and other mechanics for our game.

Is there any way to make sure it’s impossible for him to be moved off the x-axis?

Hey Novrasplice,

What you will want to do is set up a constraint along the axis you wish the character to be bound. You can find these settings within characters Pawn/Mesh Settings.

Axis Movement Constraint

I took this screenshot from the ‘Platformer Game’ example. If you are making a sidescroller game I would suggest checking this example out for some helpful tips!

There is also a map within the ‘Content Examples’ project available in the ‘Learn’ tab of the ‘Unreal Launcher’ which provides physics constraints. This would also be a good place to gather some extra information on how to set up these rules for physics objects.

Physics Level Documentation


Andrew Hurley

Thanks man! We’ll give this a shot