Add 1D and 2D support for Bullet: using rigidbody->angularFactor(const btVector3& factor) and body->setLinearFactor(const btVector3& linearFactor);
For example, to only allow linear motion in the X-Z plane, and only rotation around Y axis use:
body->setLinearFactor(btVector3(1,0,1));
body->setAngularFactor(btVector3(0,1,0));
Fix build issues with CodeBlocks, when generating projectfiles using CMake 2.6:
${OPENGL_glU_LIBRARY} should be ${OPENGL_glu_LIBRARY}
Fix build issue with CodeBlocks, comment out xmlfree in Extras/COLLADA_DOM/src/modules/LIBXMLPlugin/daeLIBXMLPlugin.cpp (will leak memory)
This commit is contained in:
@@ -110,8 +110,8 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverBody
|
||||
BT_DECLARE_ALIGNED_ALLOCATOR();
|
||||
btVector3 m_deltaLinearVelocity;
|
||||
btVector3 m_deltaAngularVelocity;
|
||||
btScalar m_angularFactor;
|
||||
btScalar m_invMass;
|
||||
btVector3 m_angularFactor;
|
||||
btVector3 m_invMass;
|
||||
btScalar m_friction;
|
||||
btRigidBody* m_originalBody;
|
||||
btVector3 m_pushVelocity;
|
||||
@@ -162,7 +162,7 @@ ATTRIBUTE_ALIGNED16 (struct) btSolverBody
|
||||
|
||||
void writebackVelocity(btScalar timeStep=0)
|
||||
{
|
||||
if (m_invMass)
|
||||
if (m_originalBody)
|
||||
{
|
||||
m_originalBody->setLinearVelocity(m_originalBody->getLinearVelocity()+m_deltaLinearVelocity);
|
||||
m_originalBody->setAngularVelocity(m_originalBody->getAngularVelocity()+m_deltaAngularVelocity);
|
||||
|
||||
Reference in New Issue
Block a user