diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-06-14 23:04:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-14 23:04:04 +0200 |
commit | bccee07ae714b43df135199594899ed88389d7b4 (patch) | |
tree | 5c952ee4e45e1363f3d7d0768b99db457cd5b046 /scene/3d/physics_body.cpp | |
parent | be3115119994141d3708eb67cfb7db3bc14f84a8 (diff) | |
parent | 6c44fff5088d445d60ccd7109c8b5163a0764a7c (diff) |
Merge pull request #9165 from Noshyaar/pr-area
Refactor layer_mask to collision_layer
Diffstat (limited to 'scene/3d/physics_body.cpp')
-rw-r--r-- | scene/3d/physics_body.cpp | 10 |
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; } |