0
\$\begingroup\$

Is there a standardized method for creating a 2D ball physics movement like you can see on gif below?

enter image description here

\$\endgroup\$
1
\$\begingroup\$

This behavior could be characterized as 2D physics reflection. I would recommend reading on physics reflection, for example on the wikipedia page on physics reflection, especially the first opening section about Reflection of Light.

Of special importance is this diagram: enter image description here

This diagram demonstrates the law of reflection, that \$θi = θr\$, or rephrased: the angle of incidence equals the angle of reflection.

Beyond the basics physics, the game in the gif likely also has special behavior to avoid situations where the ball gets stuck bouncing back and forth indefinitely. Additionally there is screen shake, motion blur, particles, and color tinting, all of which could be called "juice" or "game-feel".

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.