Why does a basic align position stutter?

I can’t seem to use lerp or align position without either of them stuttering. I don’t know why. Both stutter and it is very annoying.

This is a very basic align position I have set up, no code.

And this one I have coded using lerp.

Why do they stutter? It’s very annoying. I need/want to use both align positions and lerp, but they stutter.

1 Like

What are the all Properties of your AlignPosition? If you don’t use enough force then it might be the issue.
Is it friction between the large Part and the Baseplate?

1 Like

AlignPosition moves at a consistent speed, and slows down when it approachs the target position.
Try lowering the speed of the AlignPosition, or just move the part a bit more

Can you try moving the target part with a RunService loop rather than with the studio dragger tools?

You’re not necessarily moving at a smooth and consistent speed when using the dragger (You can see that you have it snapped to a grid in your video) which I have also noted to result in issues with jittery simulations when messing with constraints during their release into studio.

Just the normal physical properties of plastic, and there’s no large parts lol they’re just 4x1x2. And the align position had the default of 10000 force, which is more than enough to move almost anything.

Well for some, I need the align position to be fast. And I made a script that moves the part’s cframe using heartbeat and delta at a faster and consistent rate but the stutter was still there.

game:GetService("RunService").Heartbeat:Connect(function(dt)
	script.Parent.CFrame *= CFrame.new(0,0,dt*2)
end)

It’s as smooth as the camera while holding shift, so pretty smooth.

Wow mb, I used two scripts, one for the moving and one for the lerping, and it was smoother.
But the gun in the later post is still an issue.

No lol
image

Here are some more specifics.


The part has CanCollide off. It has a mass of 1.
The network owner is not a problem since it is cloned via local script.
The align position has a max force of 500, inf max velocity, and 50 responsiveness.

rs.RenderStepped:Connect(function(dt)
	camPart.CFrame = camera.CFrame
end)

This is if I lerp the camPart to the camera.

rs.RenderStepped:Connect(function(dt)
	camPart.CFrame = camPart.CFrame:Lerp(camera.CFrame, dt*10)
end)

Apparently renderstepped is not the chosen one.
So after some searching I came across post and pre simulation, which both work perfectly(???) for lerping, but not(???) setting the cframe. So like
post or pre simulation for camPart.CFrame = camPart.CFrame:Lerp(camera.CFrame, dt*10)
and renderstepped for camPart.CFrame = camera.CFrame
However, the align position is still stuttering :angry:

This is if I use renderstepped for the campart: (look at the blue square outline)


This is if I use pre simulation (or post)

It is good for lerping though.

1 Like

I’ve always found that the Default MaxForces for all the contraints are pretty low. 10000 isn’t much at all.
Try decreasing your MaxVelocity too, it may just be accelerating it too fast causing the stutter.
Experiment with the Responsiveness as well.

Each time you play with one of the above properties you may have to tweak the other ones.
It’s like tuning the suspension of a car, changing one Property may affect the rest.

I will forget align position if I have to. I once again can’t figure out the lerping as it’s stuttering AGAIN.
I have it across two scripts.

in renderstepped in custom animate script

camera.CFrame = camAtta.CFrame

in presimulation loop

	local cf = camera.CFrame * currentAtta.CFrame:Inverse()
	
	local lerpcf = gunPart.CFrame:Lerp(cf,dt*10)
	
	gunPart.CFrame = lerpcf

bruh this sucks

1 Like

have you tried SetNetworkOwnership?

2 Likes

All of it is created client-sided so that doesn’t matter.