diff options
author | Eric Rybicki <stratos695@googlemail.com> | 2017-11-08 22:35:47 +0100 |
---|---|---|
committer | Eric Rybicki <stratos695@googlemail.com> | 2017-11-10 22:33:54 +0100 |
commit | bd5df841990e7410593d8aae5bee10bab16f6f43 (patch) | |
tree | 1d1d46e94a1ee19dcced55840975ab92b7101ad3 /modules/bullet/bullet_physics_server.cpp | |
parent | 19b1ff0fc5f7acce23176ad6c8752604357472f0 (diff) | |
download | redot-engine-bd5df841990e7410593d8aae5bee10bab16f6f43.tar.gz |
Allow double-axis lock in RigidBody and KinematicBody
Diffstat (limited to 'modules/bullet/bullet_physics_server.cpp')
-rw-r--r-- | modules/bullet/bullet_physics_server.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp index 7f95d16ba6..63a4fe5bc6 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(); } |