I’m using Lerp() to animate a part that’s welded to the character’s torso.
When setting the orientation of C0 or C1, the X and Z axis seem to combine together.
I’ve looked through the developer hub, but haven’t found much. Someone proposed rotating the object using C1 instead of C0, which worked until I needed to set an orientation all three axis.
I’ve also tried different rotation orders, it didn’t make a difference.
This is a reoccuring issue that’s been bugging me for years. Orientation seems to work normally on some objects, yet does this on others.
Media:
Resulting orientation
Code:
local function onRenderStepped(deltaTime: number): nil
sine += deltaTime * speed
Weld.C0 = Weld.C0:Lerp(new(4.25, 2.5 + 0.25 * sin(sine), 1.75), 0.1)
Weld.C1 = Weld.C1:Lerp(Angles(rad(90 + 10 * cos(sine)), rad(90), rad(-5)), 0.1)
return
end
Any help much appreciated!