So my character moves fine when pressing W/S to move forward and backward, but when I press and hold A/D to move left or right, it keeps walking in a circle in either the left or right direction. How do I stop this and make the character only go left or right when holding the A/D key?
For instance, I want the character to rotate from its initial direction (looking forward) to finish to the left by pressing A before continuing walking in this direction by holding A.
I’m new to this so any help is appreciated, thank you!!
You can set a boolean variable that goes true when “Move forward” and false when Movement = “0”
Then you can use a branch on Move Right that only allows you to steer/turn when moving forward (or backwards)
Hi, thank you for answering! I tried it, but it still doesn’t work. Might you show me how you’d do it in blueprints?
Why are you using the capsule component to get the vectors and not Control Rotation?
When you start moving left or right, the capsule starts rotating and the vectors change constantly and the character walks in circles.
Yep, I found a pretty cool solution in the ThirdPersonTemplate Character. It works for me.
Thank you for sharing this! However, this was my previous blueprint and it isn’t the desired effect I aim to get as I want to make the character’s movement independent from the camera/mouse.
As I have written on the comment above of this thread, I wanted to make the character move without the camera/mouse affecting its direction. I do want to make two systems, one where the character’s movement doesn’t depend on the mouse/camera, so I can freely look around while moving, and the other where it is dependent.
I’d like to make the latter function while holding the right click mouse button while the former would work automatically.
I thought it’d be better to focus on the former system since it’s the one that’s not working very well and it’s the one I want to do the most.
Hello, I wanted to make the character’s movement independent from the camera/mouse. So I didn’t want the direction of the camera/mouse to orient the character as it was walking or rotating (according to the mouse) when it stood in place.
Although, I do want to make the previous system to work, but while holding the right click mouse button instead of working automatically. So there would be two different systems.
I figured it’d be better if I focused on the one I was more interested to do before trying to put the two systems in the same project.
And this blueprint was suggested by another person and so far it’s the only one that has worked for me. If you do have another suggestion, I’m open to it!
And if I’ve understood well that’s the entire system you need. (Change on Space keyboard/Jump event just for test)
I think I get the idea. Is that?