Saturday, February 16, 2008

Rigid Body Physics #4

hi, last weeks i created the physics engine with general constraints, and i though it will be fun to play with them a little, so i added more constraints to the system so i could build more complex systems with it.
the constraints the system support:
1. ball and socket - constraint two bodies to one common point
2. body to body - constraint point on one body to a point on another body
3. body to body with distance - same as 2 but maintain a specific distance between the points
4. body to world - constraint point on a body to be fixed on specific world position
5. body to plane - constraint a body to move inside specific plane
6. body to line - constraint point on a body to move along specific line
7. hinge - constraint point on one body to a point on another body along specific axis with angle limits.
8. universal - same as 1 but constraint an extra degree of freedom, if we specify one axis on body0 and another axis (perpendicular to the first axis) on body1 it keeps them perpendicular.
here is few movies that demonstrate few of the constraints in action:
NOTE: the movies captured in debug mode of the physics system so you'll see some lines and spheres that shows constraints info.

body to line
video

body to plane
video

body to world position
video

body to body
video

Hinge
video

No comments: