Rotate Physics Object about a point?

Hi guys, total noob here…I was wondering what the best way is to rotate a physics object about an arbitrary point/access…

I was expecting to find something like RigidBodyControl.setPhysicsRotation(Quaternion), but all I see is RigidBodyControl.setPhysicsRotation(Vector3f).

poking around I see a HingeJoint object that might work, but I’m confused by the 2 node inputs it takes…etc…

logically I’m just trying to rotate a door, which looks perfect for HingeJoint based description…but based on the api…taking 2 nodes am…lost…

One thing I was thinking of doing way manually do the localTranslation/rotation/localTranslation as possible solution, but that feels ‘wrong’.

I played around with the TestAttachGhostObject, and TestPhysicsHingeJoint, but really not seeing how that would work with a door. (Also…not sure if this my build or what…but half the time I fire up either of these tests…they fail…nothing happens when pressing the bound keys…(I’ve confirmed the key presses are being seen) and I have to literally restart netBeans to get to tests to work again…I’m guessing this may be an issue with 64bit windows/vm.which also causes the java vm to crash on exit…in fact I’ve been considering moving develop to my 32bit windows laptop for sanities sake).

note: I’ve been using build: 8513, with java 1.6.0_29 (I tried trunk…but that fails with Andriod issues)

anyways any pointers would greatly be appreciated.


Just searched a door hinge implementation for games, and I found a nice tutorial that teaches how to create a door hinge for unity 3D. I read that, and the theory is so easy, you don’t need to use hinge joints, you can implement that for your game, it’s based on a hierarchy of two nodes :




Door Hinge

The only physics you’ll need to use, is the collision checking between the player and the door, so you can listen to when your model collides with the door.

Here’s the link, good luck :

umm…ok well I just noticed that there is in fact a setPhysicsRotation(Quaternion)…not sure how I missed that…will try again and see where that gets me.