#how to use AlignOrientation to slowly turn to a look at position?

1 messages · Page 1 of 1 (latest)

keen smelt
#

How do I make the align orientation to slowly turn my part to face the align position target that I'm going towards?

Currently, it'll slowly turn my part to the same direction as my align Position target, but I need the follower to look at the target instead of same as the target

#
function alignOrientationDuo(follower,target,speed,rotationResponsiveness)

local alignPosition=Instance.new("AlignPosition")
    alignPosition.Attachment0=follower.Attachment
    alignPosition.Attachment1=target.Attachment
    alignPosition.MaxForce=math.huge
    alignPosition.MaxVelocity=speed
    alignPosition.Responsiveness=200
    alignPosition.Parent=follower

local alignOrientation=Instance.new("AlignOrientation")
    alignOrientation.Attachment0=follower.Attachment
    alignOrientation.Attachment1=target.Attachment
    alignOrientation.MaxTorque=math.huge
    alignOrientation.MaxAngularVelocity=200
    alignOrientation.Responsiveness=rotationResponsiveness or 200
    alignOrientation.Parent=follower
end


strange comet
#

can u show me video

#

I'm confused rn

nova sun
#
function alignOrientationDuo(follower, target, speed, responsivenes)
    local alignPosition = Instance.new("AlignPosition")
    alignPosition.Attachment0 = follower.Attachment
    alignPosition.Attachment1 = target.Attachment
    alignPosition.MaxForce = math.huge
    alignPosition.MaxVelocity = speed
    alignPosition.Responsiveness = 200
    alignPosition.Parent = follower

    local alignOrientation = Instance.new("AlignOrientation")
    alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
    alignOrientation.Attachment0 = follower.Attachment
    alignOrientation.MaxTorque = math.huge
    alignOrientation.MaxAngularVelocity = 200
    alignOrientation.Responsiveness = responsivenes or 200
    alignOrientation.CFrame = CFrame.lookAt(follower.Attachment.WorldPosition, target.Attachment.WorldPosition)
    alignOrientation.Parent = follower
end