Go to index of notes. ~ Go to home page.

Determine Pivot Point

When an object (traveling through space) collides with one or more objects, and touches at more than one point, this approximation method will decide which of those points it touches it will pivot on.

This is only a simple approximation method for game programming I came-up with after some experimentation and does not account many factors -- for instance it assumes all the points it touches are stationary and immoveable.

The formula is: ( a * a ) / b
...where a is the length of a line drawn from the centre of gravity of the travelling object to the touch point in question,
...and b is the length of a line drawn from the same centre of gravity plus the force vector to the same touch point.
Do this calulation for each point the object is colliding with and choose the point with the highest result as the pivot point.

A number of examples are drawn for the same traveling object in the below diagram.

Once you have found the pivot point you then have to apply the leverage to see how much the object will rotate due to the collision... to find the leverage length then find the perpendicular distance of the found pivot point to the force vector ( as if the force vector has its origin as the travelling objects centre of gravity ). A leverage of zero will cause no rotation at all.