summaryrefslogtreecommitdiffstats
path: root/scene/3d/physics_body.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-06-13 22:45:01 +0700
committerPoommetee Ketson <poommetee@protonmail.com>2017-06-14 10:58:34 +0700
commit6c44fff5088d445d60ccd7109c8b5163a0764a7c (patch)
tree74652a91d1e7b2a79da232482f21128013843823 /scene/3d/physics_body.cpp
parenta8e845a474c01c4cde1416ed00e6ae456786c1fb (diff)
downloadredot-engine-6c44fff5088d445d60ccd7109c8b5163a0764a7c.tar.gz
Refactor layer_mask to collision_layer
Diffstat (limited to 'scene/3d/physics_body.cpp')
-rw-r--r--scene/3d/physics_body.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp
index 98babedf0d..3a55a2bc32 100644
--- a/scene/3d/physics_body.cpp
+++ b/scene/3d/physics_body.cpp
@@ -59,15 +59,15 @@ float PhysicsBody::get_inverse_mass() const {
return 0;
}
-void PhysicsBody::set_collision_layer(uint32_t p_mask) {
+void PhysicsBody::set_collision_layer(uint32_t p_layer) {
- layer_mask = p_mask;
- PhysicsServer::get_singleton()->body_set_layer_mask(get_rid(), p_mask);
+ collision_layer = p_layer;
+ PhysicsServer::get_singleton()->body_set_collision_layer(get_rid(), p_layer);
}
uint32_t PhysicsBody::get_collision_layer() const {
- return layer_mask;
+ return collision_layer;
}
void PhysicsBody::set_collision_mask(uint32_t p_mask) {
@@ -167,7 +167,7 @@ void PhysicsBody::_bind_methods() {
PhysicsBody::PhysicsBody(PhysicsServer::BodyMode p_mode)
: CollisionObject(PhysicsServer::get_singleton()->body_create(p_mode), false) {
- layer_mask = 1;
+ collision_layer = 1;
collision_mask = 1;
}