I’d like to model the motion of a basketball like EgoMoose does in this tutorial.
This is what I have:
The issue I have is that I’d like for the ball to travel through the air slower. The ball’s arc is the exact same, I would just like for it to take more time to reach the hoop.
I thought of maybe using a CFrame based projectile system, but I wasn’t sure how to handle the ball bouncing off of the rim.
So is it possible for me to stick with EgoMoose’s velocity method of projectile motion and still accomplish my goal, or should I switch to CFrame or something else? If so, specifically what method should I use?
Thanks for the idea! I’m trying it out but I can’t figure out how to apply it correctly to this problem. Specifically, I’m not sure what I can do that won’t mess with the arc.
For example, if I set the BodyForce to -1*v0 where v0 is the calculated initial velocity from before, the ball doesn’t make it to the hoop. If I set it to anything positive, it would naturally go further than the intended target. Etc. Not sure how to circumvent this
So I’ve tried to manually set the basketball’s position at each tick like as described here. I’ve ran into the problem that the arc of the ball has somehow seemingly been changed? In the original video, you could see that the ball goes through the hoop unobstructed.
The ball often ends up bouncing out without even going into the hoop. I don’t understand how changing the method ended up breaking this functionality. All I did was use this code:
while elapsedTime <= t do
heartbeat:wait()
elapsedTime = tick()-startTime
projectile.CFrame = CFrame.new(position(Vector3.new(0, -game.Workspace.Gravity, 0),v0,x0,elapsedTime))
end
where v0 and x0 are calculated in the same way as before.
Also, I tried ignoring that problem just to see if I could at least slow down the arc as I originally hoped to do. I added a second heartbeat:wait() to the aforementioned code snippet, but this just makes the ball stutter on its way to the hoop while taking the same amount of time to get there.
So, I’m stuck again. Any tips on solving either of these problems I reached?