How can I move a part at constant speed through multiple points?

I’ve always had an issue with AlignPosition, which is that it doesn’t move at constant speed but rather deaccelerates, reaches the point, and then starts accelerating again, but I want the speed to be constant. How can I achieve this?

alignPosition = Instance.new("AlignPosition")
alignPosition.Attachment0 = bottomAttachment
alignPosition.Mode = Enum.PositionAlignmentMode.OneAttachment
alignPosition.Position = target.WorldPosition
alignPosition.MaxForce = 100_000
alignPosition.MaxVelocity = 25
alignPosition.Responsiveness = 100
alignPosition.Parent = character
	
alignOrientation = Instance.new("AlignOrientation")
alignOrientation.Attachment0 = bottomAttachment
alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
alignOrientation.MaxTorque = 100_000
alignOrientation.MaxAngularVelocity = 25
alignOrientation.Responsiveness = 25
alignOrientation.Parent = character

What I have VS What I want to achieve:

RobloxStudioBeta_eRAzdVgPdhApplicationFrameHost_Ht8AGPaSEo

1 Like

You just need to increase the responsiveness to the maximum amount. The other image likely is using CFrame calculations or manually applying force using ApplyImpulse if I’m not mistaken.

1 Like

I just opted-out of AlignPosition and instead I am going with TweenService + Spline module. Still working on it, so we will see if it will solve my problem.

RobloxStudioBeta_XtpqqrV9Cr

Just managed to do this with TweenService + Spline function + AlignPosition.

So what I did was generate points with spline function, then tween from point to point an attachment, AlignPosition would just follow the attachment through the attachment1 property.

2 Likes

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