Hello Fellow Devs!
Explanation
I’ve recently ran into a problem with my Football when it comes to catching it. I used to use AlignOrientation
CFrame to Update the Football inside the While
statement and it works exactly how I needed too. Football moves smoothly when FreeFalling. But catching wasn’t accurate at all. The Football would teleport or completely miss a TouchEvent when touched.
When I decided to switch the script over to the Football’s CFrame to update the Football inside the While
statement, the football just started to look horrible when FreeFalling. It looked like it was lagging, but gave accurate TouchEvents which solved the catching problem.
I don’t want a Jittery/Laggy ball FreeFalling, so I’m seeking help to help me fix this. I want to mimic the same type of result AlignOrientation
had but with a accurate TouchEvents.
Code
while self.FreeFalling do
LinearVelocity.VectorVelocity = LinearVelocity.VectorVelocity - Vector3.new(0,self.MotionGravity * Heartbeat:Wait(),0)
-- Constants {BallModel Position} --
local BallPosition = BallModel.CFrame.Position
BallModel.CFrame = CFrame.new(BallPosition,BallPosition + LinearVelocity.VectorVelocity + self.MotionBuffer) * CFrame.Angles(math.pi/2,math.pi,0)
end