Hi everybody.
I’ve set up my character starting from third person template, but instead of using the default movement input, I used two float variables that allows the blending between animations.
So my character actually walks thanks to animations with Root Motion, and not with “move forward” function.
Now I want to make a GTA-Like camera. So what I want is that when the character isn’t moving, you are free to rotate the camera around the character, but if you give him an input, he turns in the look direction of the camera and starts walking in that direction.
Now the problem is this:
my “free camera look” works, but when I start walking the character doesn’t turn to the camera’s watching direction.
He starts walking, but not in the camera’s watching direction.
These are my BP:
so, in theory, what you have to do is instead of just adding speed to y or x you need to get the direction the camera is facing and add speed to that direction.
about the pratical solution, i can’t tell “just add this node here and plug this thing to it and it’s gonna work” because i would need a better look at your code, but there’s a “direction plug” in “Add Movement Input” should be easier if you use it
The problem is that I’m not using “Add movement Input” cause I’m using Animations to move the character to avoid sliding issues.
What I should do is, in order:
- If,for example, the camera is watching to the left of the character AND the character recieve the “Forward” input → turn to that direction
- change the variable’s value that allows the animation to start.
I found a way to solve this.
I’m using a “turn 90 degrees” animation turning the character by 90 degrees to the left or to the right if you "rotate around the character with the camera more than 90 degrees from the starting position of the camera (that is behind the character) AND if you give some input.
Anyway now I’m having another little issue cause the character, when finishes turning, doesn’t stay idle in that rotation.
He make the turn rotation and then go back to the starting rotation when the animation finishes.