I want to create a curving ball that actually has physics (when I lerp it along a Bezier Curve it’ll just teleport through the wall or clip into the wall.) I’ve seen other posts where they try to curve a ball with BodyVelocity, but it’s just inconsistent with which way the character is facing and doesn’t curve as well.
(The problem with Lerping, it just goes through the wall.)
Only suggestion I could give is to use the .Touched event and add a check to the lerp everytime it changes the CFrame:
local stop = false
ball.Touched:Connect(function()
if ball.Anchored then
stop = true
end
end)
--inside the lerp loop
if stop then
stop = true
ball.Anchored = false
break
end
(This is ofcourse assuming the ball is anchored when lerping)
You could move it along a bezier but at each step do a little raycast to see if its about to go through a wall and if it is, stop the movement and set the velocity to the current curve velocity.