Ok so basically I have this card in a viewport frame which I want to spin around. However I want to slow this card so that it comes to a stop at a 0 degree rotation. Trouble is I am using Module3D and they calculate their cframe by doing this:
local BoundingCFrame,BoundingSize = Model:GetBoundingBox()
local ModelCenter = BoundingCFrame.p
--Determine the distance back.
local MaxSize = math.max(BoundingSize.X,BoundingSize.Y,BoundingSize.Z)
local DistanceBack = ((MaxSize/math.tan(math.rad(Camera.FieldOfView)))) * DepthMultiplier
local Center = CFrame.new(ModelCenter)
Camera.CFrame = Center * CFrameOffset * CFrame.new(0,0,(MaxSize/2) + DistanceBack)
Camera.Focus = Center
I have tried many things such as calculating how long it takes to spin a full 180 then dividing it by the frame rate and adding the difference of the angle to 0 but they all either don’t work or have a 50% accuracy
If anyone could help that would much appreciated!
Have a good day