summaryrefslogtreecommitdiff
path: root/modules/bullet/rigid_body_bullet.h
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-11 00:13:06 +0100
committerGitHub <noreply@github.com>2017-12-11 00:13:06 +0100
commit5cfafaf09ec88d4d4f4ca0a3f01de1d8fcb4efe0 (patch)
treec3e1b3c343e29403d5d4798f7b1622b4b6c4453d /modules/bullet/rigid_body_bullet.h
parentdcc5e21b35efec977539c8e0f5615a30a5fff581 (diff)
parent5dee44bbc13605348b65bc74878a5a8be2b50cbd (diff)
Merge pull request #14516 from AndreaCatania/patch-2
Implemented physics linear and angular lock
Diffstat (limited to 'modules/bullet/rigid_body_bullet.h')
-rw-r--r--modules/bullet/rigid_body_bullet.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index fde8b21e17..c0eb148e24 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -184,9 +184,9 @@ private:
KinematicUtilities *kinematic_utilities;
PhysicsServer::BodyMode mode;
- bool locked_axis[3] = { false, false, false };
GodotMotionState *godotMotionState;
btRigidBody *btBody;
+ uint16_t locked_axis;
real_t mass;
real_t gravity_scale;
real_t linearDamp;
@@ -269,8 +269,9 @@ public:
void set_applied_torque(const Vector3 &p_torque);
Vector3 get_applied_torque() const;
- void set_axis_lock(int axis, bool p_lock);
- bool get_axis_lock() const;
+ void set_axis_lock(PhysicsServer::BodyAxis p_axis, bool lock);
+ bool is_axis_locked(PhysicsServer::BodyAxis p_axis) const;
+ void reload_axis_lock();
/// Doc:
/// http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Anti_tunneling_by_Motion_Clamping