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