Skip to content
Advertisement

Ball bounces along a parabolic trajectory

The question was initiated by a topic

In that question, the bounces were vertical

JavaScript

This question concerns bounces with different amounts of offset in height and length

enter image description here

But it is difficult to realize the unevenness of movement and speed.

How to implement realistic parabolic ball movement?

Any idea and solution would be appreciated.

Advertisement

Answer

I allowed for this behaviour in my previous answer (in the linked question). Just set dx to a non-zero value.

JavaScript
  • x and y are the starting position of the ball
  • dx and dy are the initial velocity of the ball

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement