added angular limits to the Generic D6 constraint. Works for small angles. Will add a check for different combinations, and use different extraction of ordering of rotation from the diff quaternion.
Improved vehicle interpolation of wheels, and added Z-up axis option for the Demo made 'getWorldTransform' const method in btMotionState added future 'deactivationCallback'(not used yet)
This commit is contained in:
@@ -19,16 +19,25 @@ struct btDefaultMotionState : public btMotionState
|
||||
}
|
||||
|
||||
///synchronizes world transform from user to physics
|
||||
virtual void getWorldTransform(btTransform& centerOfMassWorldTrans )
|
||||
virtual void getWorldTransform(btTransform& centerOfMassWorldTrans ) const
|
||||
{
|
||||
centerOfMassWorldTrans = m_centerOfMassOffset.inverse() * m_graphicsWorldTrans ;
|
||||
}
|
||||
|
||||
///synchronizes world transform from physics to user
|
||||
///Bullet only calls the update of worldtransform for active objects
|
||||
virtual void setWorldTransform(const btTransform& centerOfMassWorldTrans)
|
||||
{
|
||||
m_graphicsWorldTrans = centerOfMassWorldTrans * m_centerOfMassOffset ;
|
||||
}
|
||||
|
||||
///Bullet gives a callback for objects that are about to be deactivated (put asleep)
|
||||
/// You can intercept this callback for your own bookkeeping.
|
||||
///Also you can return false to disable deactivation for this object this frame.
|
||||
virtual bool deactivationCallback(void* userPointer) {
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif //DEFAULT_MOTION_STATE_H
|
||||
|
||||
Reference in New Issue
Block a user