I want to create a system where a ball goes forward on a curve, but instead of going up and down, I want it to go left and right. I know that this is possible with bezier curves, but I want collisions to still work while the ball is moving. How can I do this?
Up and down movement is caused by gravity acceleration on (0,-1,0) and an initial upward velocity.
For left to right physics based just repeat it.
Initially a velocity leftwards like the characters -hrp.CFrame.RightVector to present the initial kick
and an acceleration force in the direction of hrp.CFrame.RightVector or rightwards to represent the spin causing the aerodynamics lift phenomenon thingy. Vector force or Bodyforce should do the same thing.
Be sure to remove the acceleration or slowly decrease it after a while to represent drag forces or air friction.
To curve the ball, you can try parenting an Align Position object to the ball,which pushes the ball towards a point (which you would have to calculate yourself; you could try raycasting intially, then changing the vector of the ball). This way, align position will push the ball midair, towards a point, creating a curve effect.
Make sure to destroy the AlignPosition object after you’re done using it, or it will continue to pull the ball towards the point.
this video will show you how to do it without the curve
to add a curve try to imagen it as having 2 gravity’s
the normal gravity pushing down
and the second gravity pushing to the right or left
you can use a VectorForce | Roblox Creator Documentation to add the second gravity and you would use the same formula in the video to add a counter force to make the ball hit the target position