Alternative ways to simulating projectile motion

i was trying to make a basketball system, but rather than relying on roblox’s physics engine, which is what EgoMoose’s tutorial used, calculating the force required to throw the basketball in, i was wondering if it was possible to force the ball to go in, or at least.make it more consistent than just using assemblylinearvelocity

something similar to the game Azure Latch’s shooting moves, like the curve shots, i’d assume those are scripted, but they can still rebound off the wall

for starters, how would i do something like that

Before you do any of that, try first making a part go in straight line without using:

  1. TweenService
  2. Roblox physics

Do it on the client or serverside (either works) and make sure it works on all framerates (within reason).

Once you’ve done all that, then talk about curve shots or shots affected by gravity.

Yes, you could model a projectile motion using a bezier curve, changing the time component every deltaTime in a renderStepped function. Before changing the position, you could also fire a raycast using the new position and the old position to see if it hits a wall, and if so, recalculate the motion according to the direction the ball was moving in. A benefit of bezier curves is that you choose the start and end point, and one or more height influences, so you can force the ball to reach a certain point.

Let me know if you need an explanation on how bezier curves work, however if you are not sure there are dozens of comprehensive tutorials online.

after looking at bezier curves and changing its position over a runservice heartbeat connection, ive found that it works great, up until the bezier curve’s end, where it pauses and hovers in the air for a bit before roblox’s physics engine takes over
what would you suggest, letting roblox’s physics engine take over or should i completely script it falling into the hoop as well/rebound

You’re probably best just using 1 system rather than switching back and forth from scripting/CFraming/Tweening etc. to physics.
It usually causes issues like the pause you are seeing.

I would recommend scripting it falling into the hoop, as well as rebound. You can utilise bezier curves to calculate a rebound trajectory, and as for falling, it can just be scripting the ball to fall with heartbeat. Like what @scottifly said, it is probably very hard to implement seamless switching between scripting and roblox’s default engine. Also, the basic physics that you implement with scripting will be more reliable long term as results will be predictable and precise