Need help making my ball curve system

Hello, I’m making a blade ball remake and have been stuck on the curving system. Specifically applying the curve to the ball. I already have the camera’s direction just I don’t know how to apply it correctly. I have a LinearVelocity with MaxForce set to inf and that works fine but once I start adding curves to the linearvelocity like how blade ball does it starts to get more complicated and just very buggy.

I’ve tried using a VectorForce but found that the LinearVelocity overides the VectorForce, I’ve tried using ball:ApplyImpulse() same issue.

Heres a snipet of my code that contains the velocity calculations, etc :

local targetPos = targetCharacter.HumanoidRootPart.Position
local direction = (targetPos - ball.Position).Unit
local adjustedY = math.max(direction.Y, (minY - ball.Position.Y) / (targetPos - ball.Position).Magnitude)
local clampedDirection = Vector3.new(direction.X, adjustedY, direction.Z).Unit
FollowVelocity.VectorVelocity = clampedDirection * currentSpeed

if (ball.Position - targetPos).Magnitude <= workspace:GetAttribute("PARRY_RANGE") and targetCharacter:GetAttribute("Parrying") == true then
	targetCharacter:SetAttribute("Parrying", false)
	BlockingSystem:FireClient(targetPlayer, "Blocked")
	local nextTarget = getClosestTarget(targetCharacter)
	if nextTarget then
		ball:SetAttribute("Target", nextTarget.Name)
	else
		pickRandomTarget(ball)
	end
	local lookValue = targetCharacter:FindFirstChild("Look")
	if lookValue and lookValue:IsA("CFrameValue") then
		local lookDirection = lookValue.Value.LookVector.Unit
		
	end
end
3 Likes

Honestly, i thought blade ball’s curves were done with a Bezier Curve. Did you try looking into that? I believe Bezier Curves use lerp to move the ball as well.

Edit: It looks like there is a module out there so you don’t have to deal with all the mathematics, here is a link to the Github and Dev Forum.

1 Like

Appreciate it, I will look into that. Thank you!

You’re welcome if you ever need more help you can ask or look at the examples provided in the Github as well. Good Luck!

What I have come across is, the system just seems to easy for it to be all of these calculations. There has to be another way

There really aren’t that many calculations, if you want it to look nice using curves like this then it’s pretty necessary.