make character move up in the air?

hi, I want to add an option to my character to make it move through the air, fly, noclip mode, whatever you want to name it, it just has to move up and down.

ideally it would move towards the direction he’s facing, so if I look up and press forward, it moves up. a button to move up and down, say E makes it go up and Q makes it go down would work too.

thing is, I absolutely can’t make this work, nor a single thread explaining how to do so.

I tried changing movement mode to flying, air control to 1, gravity to 0, adding a movement input upwards, but for some reason none of these work. if I run off a cliff, it will stay the same altitude and float around, but it just doesn’t seem to move up or down.

it’s worth mentioning that the console command “ghost” doesn’t work too. it changes the character behavior the same way as the methods I tried above, but it doesn’t go up or down.


Add physic impulse on axis command if flying?
Yes that’s a question more then an answer.

The real answer is: create a new project with the default flying template, open the BP or the little UFO, copy the nodes over to your project.
That way you can also analyze what’s going on in the template to get stuff to fly.

The project will also give you a rough idea of what settings to utilize to get the hovering and motion going within character movement…

the flying template uses a pawn, not a character, so not really helpful, as it doesn’t have the movement component

oh wow. I spent 4 hours trying to figure this out and nothing. then I ate a meal and came back, did everything over again, exactly the same as before: adding movement input, get actor up vector, enable can fly, movement mode flying and it works now. sigh. obviously I missed something before.

but thanks anyways, it’s solved

And what’s the problem with that? You can disable the movement component and use the same controls as a pawn by just going to zero G…

So you add a new axis input event with E as 1.0 (up) and Q as -1.0 (down). The “Sink Rate” and “Climb Rate” define how fast your character will move up and down (the Scale Value in the “Add Movement Input” can only go from -1 to 1, values bigger than 1 will be set back to 1).

hm interesting, but how? I disabled movement, so my character doesn’t move at all. my movement component is inherited

one of the things I tried was destroying my character and spawning / possessing a default pawn for the walk movement, but it introduced some bugs and the transition wasn’t as smooth as I wanted to.

if I could simply disable the character movement from my character and have it behave as a pawn it would be awesome, but I’m not able to do it so far