Skip to main content
GameDev.net gamedev.net
🔒 Locked

abc

Started by ccherng Oct 28, 2005 at 6:01 PM 2 replies 500+ views
Original Post
ccherng
ccherng
a
grhodes_at_work
grhodes_at_work
The idea of a hinge is to setup constraint equations that allow rotation about only one axis, the hinge axis. In practice, the way you would actually have to do this is to set up 5 constraints...Instead of allowing rotation about the hinge axis, instead prevent rotation about the two axes perpendicular to the hinge axis and translation about x, y, and z. Once you prevent translation and rotation outside of the hinge axis, then what you are left with is a system that can rotate about the hinge axis. If you want a hinge that is angle-limited, then you have to add some extra logic.

I highly recommend Russ Smith's chapter in the book Game Programming Gems 4, which discusses exactly the type of constraint equations to configure to implement joints such as hinges. He describes all of this in a very straightforward way, in my opinion, a good compliment to Baraff's papers. Its a damn good reference for people who need to implement this sort of thing.
Graham Rhodes Moderator, Math & Physics forum @ gamedev.net
tthibault
tthibault
Hmm, I haven't implemented hinges, but it seems that all that is required is that the relative velocity at the hinge points must be zero. Subsequently, in the part of your physics where it temporarily has some momentum you can solve for the impulse required to bring the relative velocity at the point of contact down to zero. This is not unlike the code required to compute static friction at a contact point, for, mathematically speaking, static friction behaves exactly the same as a hinge.
...and do not wildly extrapolate. Just because Saddam Hussein gassed Kurds in 1990 doesn't mean he eats babies' brains.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.