Welcome Guest (Log in)

Two ball collisions

StarStarStarStarStar
Games (4) |
General
Expander triangle
  • Author
  • Rating
  • Type
  • Revision
  • Downloaded
  • Updated
  • Jim Hurley
  • StarStarStarStarStar
  • Stack
  • 1
  • 1024 Times
  • 28 March 2012
Collisions, games, physics
This simple stack provides a function that allows one to allow for collisions between circular graphic objects. It is based on the physics of an ideal, elastic collision in which the total momentum and energy are conserved.

Given the position and velocities of each ball just before the collision, the "getVel" function will return the velocities of each ball just after the collision.
Ajax Loader
Tags
Expander triangle
User Comments
Expander triangle