How can I make my character move in the direction that he is facing? (newbie question)

I’m pretty new to unreal, and so I’ll need you to explain the solution to my problem very descriptively. Explain to me like I’m five. So, here’s my problem: I made a script that makes the character look left and right based on the mouse movement. Also, I’ve made a script that makes my character move forward. Right now, when I press “W”, he moves forward, along the Y axis (just like I told him to). However, I would like it if he would, when I press W, move in the direction he is facing, rather than just along the Y axis. So that’s just it. Someone please tell me how to make it so that when I press W, my character moves the direction that he is facing. I have posted screenshots of all the code that matters.

85545-move+blueprint.png

Thank you for your help! I do have another question, however. I attached the return value of the “make vector” function to my physics velocity function, but now there is no movement. As you can see, I used a physics velocity function for movement, so where should I attach it all to make him actually move in the direction you showed me how to check?

Thank you so much for your help!

Hey there!

With the direction he is facing, do you mean the character or your camera?

If it’s the camera forward rotation you want you want to drag in the camera in the blueprint from the components tab and drag off → Get forward Vector and break the vector and remake the vector setting Z to 0 to make sure you’re not moving up or down.

See the image for the example of it.
If you want to check the direction the character is facing, use the CharacterMesh and get Forward Vector.

I see you have 0,400,0 as a manual input. Just get the vector and do vector * float and set 400 as float, that’ll do it normally :slight_smile:

No problem! Glad i was able to help!