Page 1 of 1

btStaticPlaneShape in Houdini-Bullet *UPDATE - Done!*

Posted: Fri Feb 26, 2010 2:00 am
by goldleaf
I'm trying to get btStaticPlaneShape to work with the Houdini plugin. I've got it working at origin, but I can't move or rotate it. Is this even possible? To get it working, I'm using setEuler() to change the XYZ rotation settings from Houdini into Quaternions (variable 'qtn'), and passing that into the ground's btTransform. Does this look right?

Code: Select all

btDefaultMotionState* groundMotionState = new btDefaultMotionState( btTransform(qtn),btVector3(0,-1,0)));
btRigidBody::btRigidBodyConstructionInfo groundRigidBodyCI(0,groundMotionState,groundShape,btVector3(0,1,0));
btRigidBody* groundRigidBody = new btRigidBody(groundRigidBodyCI);
state->m_dynamicsWorld->addRigidBody(groundRigidBody);

Re: btStaticPlaneShape in Houdini-Bullet

Posted: Tue Jun 01, 2010 2:02 am
by Erwin Coumans
It should work. You can try setting the world transform of the rigid body directly before adding it to the world:

Code: Select all

btRigidBody* groundRigidBody = new btRigidBody(groundRigidBodyCI);
btTransform tr; tr.setIdenty(); 
// set your own transform here
groundRigidBody->setWorldTransform(tr);
state->m_dynamicsWorld->addRigidBody(groundRigidBody);
Thanks,
Erwin

Re: btStaticPlaneShape in Houdini-Bullet

Posted: Thu Jun 03, 2010 7:01 am
by goldleaf
Sweet! I'll keep at it, and post here.

Re: btStaticPlaneShape in Houdini-Bullet

Posted: Mon Jun 07, 2010 11:12 pm
by goldleaf
Ground plane now works in the houdini plugin. I realized I was trying to circumvent how bullet shapes were being created via the plugin, and it was really easy to implement when I wasn't trying to redo all of the work myself.

You can get a version of the bullet solver with groundplane support, as well as substeps(done by Seth Holladay), at http://www.gitorious.org/bullet-physics ... ics-solver.

Thanks for the help!