Creating a Simple Hinge in Shockwave 3D Using the Havok Xtra
April 11, 2007
Today I finally figured out how to create a simple hinge in Shockwave 3D using the Havok Xtra’s linear dashpot. In the past, I was frustrated by Havok’s linear dashpot, because by default it connects two movable rigid bodies’ centers of mass. I wanted to be able to connect them more precisely, such as by their corners. I found that it is simple to accomplish this by assigning pointA and pointB of a linear dashpot to the desired vertice. First I attached two cubes using two linear dashpots. Then I set point A of the first linear dashpot to be positioned at the desired corner on the first cube and point B at the desired corner on the second cube. I did the same with the second linear dashpot. My demo source code is nothing but a toy app, but it’s enough to get the concept. Once you get the concept, you can adapt it for your own project. Be warned that when you increase the size of the boxes, the results become unpredictable. To adapt this to your own code, you may need to experiment with the vertex lists of the faces of your own model. Download source.
Other Posts Categorized as 3D Programming:
- Aegia Physics Code Samples in Director 11 - April 5th, 2008
- WOW 3D Physics Engine for Flash - January 30th, 2008
- Director, I Missed You - February 9th, 2007
- Going Around in Circles - Back to Shockwave 3D Now - February 4th, 2007
- I've Been Martened, Tarted and Torqued - November 18th, 2006
- Sandy 1.0 Beta Released - June 24th, 2006
- Stuck on Rotation with Verlet Integration - June 17th, 2006
- A Good Tutorial on Basic 3D Math - June 7th, 2006
- A Trigonometry Tutorial - June 4th, 2006
- 3D Models of Seemingly Impossible M.C. Escher Drawings - May 2nd, 2006
Other Posts Categorized as Shockwave 3D:
- Aegia Physics Code Samples in Director 11 - April 5th, 2008
- Interview with One Man Creator Behind MMORPGs at MaidMarian.com - March 11th, 2007
- Director, I Missed You - February 9th, 2007
- Going Around in Circles - Back to Shockwave 3D Now - February 4th, 2007