mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Added restiction of lin/ang movement for rigid bodies.
This commit is contained in:
parent
99c71cef31
commit
8841b1d80a
@ -416,3 +416,25 @@ get_gravity() const {
|
||||
return btVector3_to_LVector3f(_body->getGravity());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletRigidBodyNode::set_linear_factor
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void BulletRigidBodyNode::
|
||||
set_linear_factor(const LVector3f &factor) {
|
||||
|
||||
_body->setLinearFactor(LVecBase3f_to_btVector3(factor));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: BulletRigidBodyNode::set_angular_factor
|
||||
// Access: Published
|
||||
// Description:
|
||||
////////////////////////////////////////////////////////////////////
|
||||
void BulletRigidBodyNode::
|
||||
set_angular_factor(const LVector3f &factor) {
|
||||
|
||||
_body->setAngularFactor(LVecBase3f_to_btVector3(factor));
|
||||
}
|
||||
|
||||
|
@ -73,6 +73,10 @@ PUBLISHED:
|
||||
void set_gravity(const LVector3f &gravity);
|
||||
LVector3f get_gravity() const;
|
||||
|
||||
// Restrict movement
|
||||
void set_linear_factor(const LVector3f &factor);
|
||||
void set_angular_factor(const LVector3f &factor);
|
||||
|
||||
public:
|
||||
virtual btCollisionObject *get_object() const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user