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?
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.
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.
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”?