summaryrefslogtreecommitdiffstats
path: root/modules/bullet/bullet_physics_server.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-12-09 13:01:41 +0100
committerGitHub <noreply@github.com>2017-12-09 13:01:41 +0100
commit25b36f18d38c222fb8d115a40ef1de07445e6bf8 (patch)
tree9c1795e49d29e9f6ff1c1490ac32aaffd608b17c /modules/bullet/bullet_physics_server.cpp
parent3fd1c0c76b61173c5d611b14b5b137fb61654f08 (diff)
parentbd5df841990e7410593d8aae5bee10bab16f6f43 (diff)
downloadredot-engine-25b36f18d38c222fb8d115a40ef1de07445e6bf8.tar.gz
Merge pull request #12756 from Stratos695/master
Allowing double-axis lock in RigidBody & KinematicBody (Fixes #12500)
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r--modules/bullet/bullet_physics_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 26c879fddb..339dccce33 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -723,15 +723,15 @@ void BulletPhysicsServer::body_set_axis_velocity(RID p_body, const Vector3 &p_ax
body->set_linear_velocity(v);
}
-void BulletPhysicsServer::body_set_axis_lock(RID p_body, PhysicsServer::BodyAxisLock p_lock) {
+void BulletPhysicsServer::body_set_axis_lock(RID p_body, int axis, bool p_lock) {
RigidBodyBullet *body = rigid_body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_axis_lock(p_lock);
+ body->set_axis_lock(axis, p_lock);
}
-PhysicsServer::BodyAxisLock BulletPhysicsServer::body_get_axis_lock(RID p_body) const {
+bool BulletPhysicsServer::body_get_axis_lock(RID p_body) const {
const RigidBodyBullet *body = rigid_body_owner.get(p_body);
- ERR_FAIL_COND_V(!body, BODY_AXIS_LOCK_DISABLED);
+ ERR_FAIL_COND_V(!body, 0);
return body->get_axis_lock();
}