How to move player to view direction (up and down)

Hello everybody,

i’ve got a underwater setting and i realy like to move the character underwater in the direction the player is looking at. So when the player looks up to the water surface he or she should swim upwards. The same the other way around: When the player looks down to the grown, he or she swims to this direction while pressing the key for moving forward. (Background: Oculus Rift is implemented. So it feels to me that this is a little bit easier to move)

At the moment, the player only swims to the left and right directions when he or she is looking to this direction.

Does anybody has a smart idea to realize this in Blueprints?

Thank you very much!

Best regards

My solution is using your ControlRotation, get forward vector from it then multiply it with speed then either set your character location in work space or add force in that direction.

Hello CKong,

Thank you for your answer!
Until the section “get forward vector from…” i can follow you.
But what exactly did you mean with “multiply it with speed then either set your character location in work space”

In my FirstPersonBP I’ve added the node “getControlRotaion” and i’ve get the forward vector out of it. But i’m not quiet sure how to get on now.

Sorry, i stuck :slight_smile:

Best regards

I’m Sorry, for some reason the answer was postet three times :S

Well, because forward vector only return a vector direction with the length of 1, so you will need to create a variable contain your desire speed, and then multiply with the previous forward vector.

Okay, so Ive got the "get ControllRotation → Get Forward Vector Multiply with a walking Speed.
And the output of the multiplication i put into the note “Add Movement Input”?

Thats the way i tried it, but there is no effect.

Well, ive found my mistake.
I am a little bit ashamed, but I had the wrong Character Blueprint as standard Pawn.

So your solution works perfectly!
Thank you well!