AlignOrientation Interpolation problem

I am working with on a system to align an airplane model with the camera. I am using an AlignOrientation.

I have run into a problem with the way that the internal interpolation works on the AlignOrientation.

Basically I have 3 values that represent the yaw, pitch, and bank of the plane. If I only apply the yaw and pitch, it works just fine.

Here is an example of the Arching interpolation that is not desired:

local p = workspace.Part
local targetCF = p.CFrame * CFrame.fromEulerAnglesYXZ(math.rad(10), math.rad(175), math.rad(80))
local startCF = p.CFrame
local alpha = 0
while true do
    alpha = alpha + game.RunService.Heartbeat:Wait() * 0.5
    if alpha > 1 then
        break
    end
    local newCF = startCF:Lerp(targetCF, alpha)
    p.CFrame = newCF
end

2026-02-20 16-59-30

and here is the same code, but I apply the roll separately.

local p = workspace.Part
local targetCF = p.CFrame * CFrame.fromEulerAnglesYXZ(math.rad(10), math.rad(175), 0)
local targetRoll = CFrame.Angles(0, 0, math.rad(80))
local startCF = p.CFrame
local alpha = 0
while true do
    alpha = alpha + game.RunService.Heartbeat:Wait() * 0.5
    if alpha > 1 then
        break
    end
    local newCF = startCF:Lerp(targetCF, alpha) * CFrame.new():Lerp(targetRoll, alpha)
    p.CFrame = newCF
end

and the result:
2026-02-20 17-00-59

I want to have the results of that second one, but I am not sure the best way to achieve this using the AlignOrientation as it seems to apply all three rotations together, messing up what I want.
Here is the code I use to apply that orientation to an AlignOrientation with Mode TwoAttachment and AllAxes AlignType.

	local yawPitch = CFrame.fromEulerAnglesYXZ(math.rad(CameraModule.yRot), math.rad(CameraModule.xRot * CameraModule._yawSign), 0)
	local roll = CFrame.Angles(0, 0, math.rad(bankAngle))
	self._alignAttachment.CFrame = yawPitch
		* roll
		* CFrame.Angles(0, math.pi, 0)

2026-02-20 17-09-31

How can I change the way the rotations are applied?

1 Like

Hey just wanted to bump this to get some help with this problem. Thanks!