#alignPosition/draggable part jitters, not smooth

1 messages · Page 1 of 1 (latest)

dark oasis
#

currently need help with a draggable part system (first person). the issue is that the part kind of jitters and is not very smooth. this is mainly prevalent when walking sideways (not moving mouse). the system works by using alignPosition and aligning the part's attachment with an attachment that is in front of the player. anyway to make the movement more smooth? thank you!

detector.DragStart:Connect(function(player)
        object:SetNetworkOwner(player)

        local attachment = getLookAttachment(player)
        if attachment then
            alignPos.Enabled = true
            connection = RunService.Heartbeat:Connect(function()
                alignPos.Position = attachment.WorldPosition
            end)
        end
    end)
upbeat pendant
#

try updating the alignpos on the client?

dark oasis
sleek siloBOT
#

studio** You are now Level 1! **studio

dark oasis
#

I tried controlling it via the client and using RenderStepped but it seems to have the same issue. a workaround I found was changing the AlignPosition's Mode to TwoAttachment and just following the player's attachment, however this causes another issue in which the part gets launched while the player is jumping and moving (while in first person). I would prefer using this two attachment since it's very smooth but also fixing the launching issue. I tried capping velocity/force and changing responsiveness. RigidityEnabled fixes the issue but introduces numerous problems, so it won't work. video attached is TwoAttachment

upbeat pendant
#

why is one attachment on the torso?

dark oasis
# upbeat pendant why is one attachment on the torso?

the attachment is a child of the hrp, it determines where the part should be. it's always 8 studs in front of the hrp, which means if the player faces a different direction, the attachment also moves with it. The attachment's y value gets changed depending on the player's camera

upbeat pendant
#

then why not have the attachment be on the camera instead? or terrain and update its worldcframe to cameras?

#

this will; probally fix that wierd jumpy thing that happens

dark oasis
# upbeat pendant then why not have the attachment be on the camera instead? or terrain and update...

i tried doing that, which fixes the issue, but then just results back to the jitter issue. i tried creating the alignPosition via the server and then just changing the alignPosition's position to the player's attachment via the client (using renderStepped/PreRender) but it still isn't smooth. it essentially fixes the issue but then causes the same issue as when I first had at the beginning of the post.

upbeat pendant
#

try using prerender?

dark oasis
#

yes, i tried to

upbeat pendant
#

i dont know then ive never used the dragable part stuff

#

sorry

dark oasis
#

no problem, i appreciate the help tho!