Fixed bugs with constraints on Linux.
This commit is contained in:
parent
5bea667a74
commit
d65d78850e
|
|
@ -226,8 +226,7 @@ transform_changed() {
|
|||
_sync = ts;
|
||||
|
||||
btTransform trans = TransformState_to_btTrans(ts);
|
||||
_rigid->setWorldTransform(trans);
|
||||
_rigid->setInterpolationWorldTransform(trans);
|
||||
_rigid->setCenterOfMassTransform(trans);
|
||||
|
||||
if (ts->has_scale()) {
|
||||
LVecBase3f scale = ts->get_scale();
|
||||
|
|
@ -275,33 +274,6 @@ sync_b2p() {
|
|||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletRigidBodyNode::set_center_of_mass_pos
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void BulletRigidBodyNode::
|
||||
set_center_of_mass_pos(const LPoint3f &pos) {
|
||||
|
||||
nassertv_always(!pos.is_nan());
|
||||
|
||||
btTransform trans = btTransform::getIdentity();
|
||||
trans.setOrigin(LVecBase3f_to_btVector3(pos));
|
||||
|
||||
_rigid->setCenterOfMassTransform(trans);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletRigidBodyNode::get_center_of_mass_pos
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
LPoint3f BulletRigidBodyNode::
|
||||
get_center_of_mass_pos() const {
|
||||
|
||||
return btVector3_to_LPoint3f(_rigid->getCenterOfMassPosition());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletRigidBodyNode::get_linear_velocity
|
||||
// Access: Published
|
||||
|
|
|
|||
|
|
@ -37,9 +37,7 @@ PUBLISHED:
|
|||
INLINE ~BulletRigidBodyNode();
|
||||
|
||||
// Mass
|
||||
LPoint3f get_center_of_mass_pos() const;
|
||||
float get_mass() const;
|
||||
void set_center_of_mass_pos(const LPoint3f &pos);
|
||||
void set_mass(float mass);
|
||||
|
||||
// Velocity
|
||||
|
|
|
|||
Loading…
Reference in New Issue