Smoothly rotating a Motor6D's C0

Lerping like that is not framerate independent, and that might be the problem. Maybe try use this spring module to interpolate it? Example:

-- in constructor
local horizontalSpring = Spring.new(0)
horizontalSpring.s = 15 -- speed
horizontalSpring.d = 1 -- damping, 1 is smooth, lower the more "bouncy"

self.horizontalSpring = horizontalSpring

-- in a loop:
horizontalSpring.t = rad(horizontalDegrees)
self.horizontalMotor6d.C0 * cFrameAngles(0, self.horizontalSpring.p, 0)

--repeat for vertical

I dunno if it will help, we’ll see

3 Likes

Hi,

This worked perfectly, thank you so much!

1 Like

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