Finding the best trajectory for the ball

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear! I am making a vollyball game, and im currently making a ball launcher. The player provides it a point that it should hit and it should launch the ball in the steepest trajectory possible. If the launcher is placed below the net, it will not launch the ball.

  2. What is the issue? Include screenshots / videos if possible! I don’t know how to include phyfics in the calculation of the trajectory of the ball. For example, if I place the launcher on the serve line higher than the net, and then launch the ball at the steepest trajectory, it will fly down on its path and hit the net. here is what I mean:


expected trajectory


real trajectory

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub? I tried to think of any solutions but nothing came to my mind

If you will need any more details feel free to tell me!

1 Like

This is a post I’ve referenced before.
Goes over the math and has examples

1 Like

One more thing, how do i find the steepest trajectory possible for the ball if I have this data? I originally thought of raycasting, but it won’t work in that scenario(at least i think so)

Do you mean the steepest angle your object can go?

If I have the position of the launcher, the position I want to hit and the maximum speed the ball can fly at I need to calculate the velocity for the ball so that it will hit that point at the steepest angle possible so that it barely even flies over the net

Actually i realized i was just very stupid this post was more than enough

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.