|Topic was automatically imported from the old Question2Answer platform.
How would I make a third person character that keeps their speed while turning, as opposed to the usual sliding collider method? It would be similar to how NieR:Automata does it, if anyone’s played that.
My current idea on how to emulate this is to steer the player towards where the input is driving them, using turning speed variables for the interpolation of the rotation, while keeping a constant forward-moving speed. However, I don’t really have much vector math knowledge to do this in GDScript.
Can anyone help with this?
This is very hard for me
ViolaRose | 2021-07-07 06:28
how do you handle turning and acceleration/deceleration?
klaas | 2021-07-06 15:21
Thanks for replying,
I was following this tutorial initially.
It’s a simple movement setup with linearly interpolated velocity, so the character just slides around based on the input direction and position of the camera.
I’ve seen a lot of third person games keep the movement speed of the character up as they’re turning, and NieR does it in a somewhat clever way: the turning is instant if there are small adjustments in direction (think moving the stick slightly to the left on a controller), but it takes a little bit of time to turn around if the adjustment is big enough (think making a circle with the stick), as if it’s steering towards it. You can see it here.
I’d love to have a crack at replicating the steering behavior as that fits with my game idea, but I’m not too well-versed in vector math. Can you give any pointers as to where I should begin?
Rilic | 2021-07-07 09:38
the first link dont work.
I dont know the game and the video isnt helping. Do you have a specific problem with your code or vector-math?
klaas | 2021-07-09 19:43