summaryrefslogtreecommitdiff
path: root/modules/bullet/rigid_body_bullet.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/bullet/rigid_body_bullet.cpp')
-rw-r--r--modules/bullet/rigid_body_bullet.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index def978cf14..ce39d4f0df 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -268,7 +268,7 @@ RigidBodyBullet::RigidBodyBullet() :
reload_shapes();
setupBulletCollisionObject(btBody);
- set_mode(PhysicsServer3D::BODY_MODE_RIGID);
+ set_mode(PhysicsServer3D::BODY_MODE_DYNAMIC);
reload_axis_lock();
areasWhereIam.resize(maxAreasWhereIam);
@@ -531,14 +531,14 @@ void RigidBodyBullet::set_mode(PhysicsServer3D::BodyMode p_mode) {
reload_axis_lock();
_internal_set_mass(0);
break;
- case PhysicsServer3D::BODY_MODE_RIGID:
- mode = PhysicsServer3D::BODY_MODE_RIGID;
+ case PhysicsServer3D::BODY_MODE_DYNAMIC:
+ mode = PhysicsServer3D::BODY_MODE_DYNAMIC;
reload_axis_lock();
_internal_set_mass(0 == mass ? 1 : mass);
scratch_space_override_modificator();
break;
- case PhysicsServer3D::BODY_MODE_CHARACTER:
- mode = PhysicsServer3D::BODY_MODE_CHARACTER;
+ case PhysicsServer3D::MODE_DYNAMIC_LOCKED:
+ mode = PhysicsServer3D::MODE_DYNAMIC_LOCKED;
reload_axis_lock();
_internal_set_mass(0 == mass ? 1 : mass);
scratch_space_override_modificator();
@@ -711,7 +711,7 @@ bool RigidBodyBullet::is_axis_locked(PhysicsServer3D::BodyAxis p_axis) const {
void RigidBodyBullet::reload_axis_lock() {
btBody->setLinearFactor(btVector3(btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_X)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Y)), btScalar(!is_axis_locked(PhysicsServer3D::BODY_AXIS_LINEAR_Z))));
- if (PhysicsServer3D::BODY_MODE_CHARACTER == mode) {
+ if (PhysicsServer3D::MODE_DYNAMIC_LOCKED == mode) {
/// When character angular is always locked
btBody->setAngularFactor(btVector3(0., 0., 0.));
} else {
@@ -1006,7 +1006,7 @@ void RigidBodyBullet::_internal_set_mass(real_t p_mass) {
// Rigidbody is dynamic if and only if mass is non Zero, otherwise static
const bool isDynamic = p_mass != 0.f;
if (isDynamic) {
- if (PhysicsServer3D::BODY_MODE_RIGID != mode && PhysicsServer3D::BODY_MODE_CHARACTER != mode) {
+ if (PhysicsServer3D::BODY_MODE_DYNAMIC != mode && PhysicsServer3D::MODE_DYNAMIC_LOCKED != mode) {
return;
}
@@ -1015,7 +1015,7 @@ void RigidBodyBullet::_internal_set_mass(real_t p_mass) {
mainShape->calculateLocalInertia(p_mass, localInertia);
}
- if (PhysicsServer3D::BODY_MODE_RIGID == mode) {
+ if (PhysicsServer3D::BODY_MODE_DYNAMIC == mode) {
btBody->setCollisionFlags(clearedCurrentFlags); // Just set the flags without Kin and Static
} else {
btBody->setCollisionFlags(clearedCurrentFlags | btCollisionObject::CF_CHARACTER_OBJECT);