I’m wondering how to achieve a walking animation that changes when you walk in a direction with shift lock. Like sidestepping or walking backwards. Here’s an example:
I know there is a post just about this but I want to achieve this effect with Humanoid.MoveDirection. I don’t plan on using inverse kinematics since it’s not needed for my project.
I want to know how to see directions like left, right, diagonal upright and etc. Please do not explain how Humanoid.MoveDirection works, I know how to use it just having trouble with it.
Good question, this is a bit more advanced though you can notice some patterns like when walking forward Z is equal to -1 when it is in object space, backwards is equal to Z =1, right is X = 1.
You could even convert it into an angle by using:
local x, y, z CFrame.lookAt(Vector3.new(0,0,0), movementDirectionRelativeToHumanoidRootPart):ToOrientation()
–>Create a cframe looking towards the movement direction
→ Convert it into orientation for angle terms
You can do something like @i_eetANts which also uses the idea of getting a movement vector relative to the humanoid root part and then rounding it to the closest movement direction with an animation assigned like walk forwards, walk right and convert it into a hash/string identifier.
The result looks pretty good similar to Inverse kinematics which is interesting.