Changing a Characters Movement from X Axis to Z Axis

Have you tried using the surface normal to simulate its gravity? You can use it to manually apply a force to your character that would be equivalent to the gravity (which would have to be deactivated, as you’re already doing).

You can also use the surface normal to know how to rotate an input vector in such a way that it abides to the “new gravity”.

Or you could just rotate the surface instead of messing around with physics and whatnot, although that may not be possible depending on your project.

Hey guys,

we want to create an RTS-like game with an invisible sphere serving as the Camera Character (CC). Is there a way to make the CC stop its movement along the X-Axis at a specific point in the world and instead convert the Movement Input into a movement on the Z-Axis? (see 1. Image)

The CC is basically supposed to just keep walking, but instead of back and forth it should be up and down. (with gravity and air velocity not taking effecting it) Or is it possible to tell a surface where to “pull/push” a Character in terms of gravity?

P.S.: Attached you’ll also find the BP for the way we already tried turning off gravity on colliding with a Trigger Box (which didn’t work. The Character just floated in air).
The third image is in case you need to see how the CC is set up.

We hope we made ourselves clear! :slight_smile:

When you use the cross product, you can compute the movement direction by using the cross-product on the Surface Normal and the camera right vector. You just have to find out how to get the surface normal

… there are a few different movement moves available to the Character class… including walking and flying… I’d just switch between these modes on Tick, and change the input direction using Get Forward Vector to Get Up Vector… using the Character (not Pawn) class it should be easy. Yes, there is some baggage (slots for skeletal mesh etc.) that comes with this class but it is ideal for a quick n easy prototype

Hey Guys,

just wanted to give an update. It’s a little bit late, but all your answers helped us to get it done the way we want it to work. We basically switch the movement axis at a certain location in the world (because it is always the same location) and that works perfectly for our project.