Hello, I have made a dragging system and its working perfectly fine, until you zoom out your camera.
As you can see, it works ok with camera being zoomed in, but when I zoom out, the dragging part is a little offset from the cursor.
This is using align position and orientation if it matters.
I’m looking for a zoom offset that matches the dragging part so it doesn’t look weird.
It also goes far behind your character when its zoomed too far out for some reason.
if not Target then Cleanup() end
local X, Y, Z = Mouse.Hit.X, Mouse.Hit.Y, Mouse.Hit.Z
local CF1 = CFrame.new(Head.Position, Vector3.new(X, Y, Z))
local CF2 = CF1 * CFrame.new(0, 0, -distanceFromPlr)
if smooth < 1 then
smooth += .1
Apos.CFrame:Lerp(CFrame.new(CF2.X, CF2.Y, CF2.Z), smooth)
else
Apos.CFrame = CFrame.new(CF2.X, CF2.Y, CF2.Z)
end
Aori.Orientation = Vector3.new(x + RotX, y + RotY, z + RotZ)
MouseBall.CFrame = CFrame.new(CF2.X, CF2.Y, CF2.Z)
PBall.Position = A0.WorldPosition
local RopeSizeZ = (A0.WorldPosition - MouseBall.Position).Magnitude
local RopePos = CFrame.new(A0.WorldPosition, MouseBall.Position)
RopePos *= CFrame.new(0, 0, -RopeSizeZ * .5)
Rope.Size = Vector3.new(.1, .1, RopeSizeZ)
Rope.CFrame = RopePos
if RopeSizeZ > 30 then
Cleanup()
end