Custom Character Rotation

I’m having trouble reworking an old character system and making it so that the character faces where its moving.

  1. What do you want to achieve?*
    I would like my character to face the direction that it’s moving in Aswell as slightly face its upward velocity similar to this:

  1. What is the issue?
    The old system uses a BodyGyro to do this which is deprecated. I tried using AlignOrientation instead but I cannot figure out how to make it work.

  2. What solutions have you tried so far?*
    I’ve tried not using the AlignOrientation and instead just lerped the character’s CFrame using a script. It didn’t work. I also tried changing the properties of the AlignOrientation but it didn’t work.

What can I do to fix it?

local collider = character.collider -- The character's movement part
local vel = collider.Velocity -- The Velocity of the character collider

collider.AlignOrientation.CFrame = CFrame.lookAlong(collider.Position,collider.Position+Vector3.new(vel.X,vel.Y/2,vel.Z))

Hi! I’m the creator of the game.
I used Motor6D Lerping:

local rj: Motor6D = humanoidRootPart:WaitForChild('RootJoint')
local front = math.clamp(humanoidRootPart.Velocity.Y, -40, 40)
rj.C0 = rj.C0:Lerp(CFrame.new(rj.C0.Position) * CFrame.Angles(math.rad(90 + front), math.rad(180), 0), math.min(dt * 5, 1))
4 Likes

Thx for the help! Also, your games really cool.

I have another question. I know that this is unrelated, but how do I make the animations smoothly transition between each other. Looked at many threads and stuff but I don’t know how.

I still used Motor6D lerping, for example when you’re diving do front += 90

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.