summaryrefslogtreecommitdiff
path: root/modules/bullet/bullet_physics_server.cpp
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/bullet_physics_server.cpp
parentdcc5e21b35efec977539c8e0f5615a30a5fff581 (diff)
parent5dee44bbc13605348b65bc74878a5a8be2b50cbd (diff)
Merge pull request #14516 from AndreaCatania/patch-2
Implemented physics linear and angular lock
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 339dccce33..b233edc0d4 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -723,16 +723,16 @@ 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, int axis, bool p_lock) {
+void BulletPhysicsServer::body_set_axis_lock(RID p_body, BodyAxis p_axis, bool p_lock) {
RigidBodyBullet *body = rigid_body_owner.get(p_body);
ERR_FAIL_COND(!body);
- body->set_axis_lock(axis, p_lock);
+ body->set_axis_lock(p_axis, p_lock);
}
-bool BulletPhysicsServer::body_get_axis_lock(RID p_body) const {
+bool BulletPhysicsServer::body_is_axis_locked(RID p_body, BodyAxis p_axis) const {
const RigidBodyBullet *body = rigid_body_owner.get(p_body);
ERR_FAIL_COND_V(!body, 0);
- return body->get_axis_lock();
+ return body->is_axis_locked(p_axis);
}
void BulletPhysicsServer::body_add_collision_exception(RID p_body, RID p_body_b) {