hello!! in my game you can drag objects with ur mouse. so, as a failsafe for dragging stuff into the void, i added a limit to how far it can go
the issue is that the part is being moved like half the actual mouse distance for some reason. please help!
local function updateDrag()
local sizeAdjustment = Vector3.FromNormalId(mouse.TargetSurface) * (currentHoveredObject.Size / 2)
local newPosition = mouse.Hit.Position + sizeAdjustment
currentHoveredObject.Position = newPosition
local distanceFromCamera = newPosition - mouse.Origin.Position
if distanceFromCamera.Magnitude > MAX_DRAG_DISTANCE then
currentHoveredObject.Position = mouse.Hit.LookVector * MAX_DRAG_DISTANCE
end
end