zero-g movement help

I am trying to create a first person zero-g environment. Using the FPS template I have it setup so that WASD is the normal movement, and Q and E move you up and down.

Mode is set to ‘flying’

This is working fine but the problem I have is that once my character moves up, I need it to be able to move in the direction it’s looking by pressing W - at the moment If I move up, and look towards the ground, pressing W does not move me towards the ground, it moves me forward as if still on the floor. (I hope this makes sense).

Is there some way of telling the W key to move in the direction that the mouse is pointing?

See my screenshot for BP

So I’ve been doing some reading today and I’ve read that Gravity is locked to the Z axis, which may cause a problem when trying to implement this kind of game (I don’t fully understand this, could anyone explain it?)

Am I going to have to disable gravity completely and then write my own gravity in c++? (not that I’d know how)

Sorry I’m somewhat of a noob with this stuff…

I’m unsure how to achieve this, but wonder if you could create a vector based on the look direction of the character relative to world space to determine your movement and use that to control the direction ?

Yes that could be an idea, I wonder if ‘2.13 Camera Forward Vector CameraForwardVector is shown with a diagram illustrating forward vector paths.’ from here would be what I need: Math Hall Content Examples | Unreal Engine Documentation

Anyone got any suggestions.

I can’t try this until I get home from work.

I’ve worked out how to do it and yes forward vector the multiplied up depending on how you wish to do it (I am using a 360 pad at the moment as dual sticks are good for pitch/yaw/roll and with triggers it’s quite easy to control). I am working in Acelleration, deceleration and lateral and vertical thrusters now, so you can press a button to move side to side and up/down without having to face that way. Once I have it worked out I will post it up for people to use freely.

Hi, were you able to achieve it? I would be interested to see your solution or get some tips. Thanks!