summaryrefslogtreecommitdiffstats
path: root/scene/2d/ray_cast_2d.h
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2017-10-21 22:17:26 +0200
committerPedro J. Estébanez <pedrojrulez@gmail.com>2017-10-21 22:17:47 +0200
commit7b12ae39f280e9168e314cba08107cce6b99c4ff (patch)
tree934372cc21bed89c10426511658a5cef6b8ece72 /scene/2d/ray_cast_2d.h
parent6361e24f29ae735b75bcd27f9fe521397ce7c10c (diff)
downloadredot-engine-7b12ae39f280e9168e314cba08107cce6b99c4ff.tar.gz
Rename RayCasts collision_layer to collision_mask
The point is that `RayCast`s are checked against objects' `collision_layer`(s), but they themselves are considered no to _belong_ to any layer. Therefore, the correct name for their property is `collision_mask`, rather than `collision_layer`. Only renaming is needed since the behavior was already the right one, only that it wasn't matching what users would expect from the name and description of the property. Fixes #7589, where it's also discussed.
Diffstat (limited to 'scene/2d/ray_cast_2d.h')
-rw-r--r--scene/2d/ray_cast_2d.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/ray_cast_2d.h b/scene/2d/ray_cast_2d.h
index 338de814d2..da1be84307 100644
--- a/scene/2d/ray_cast_2d.h
+++ b/scene/2d/ray_cast_2d.h
@@ -43,7 +43,7 @@ class RayCast2D : public Node2D {
Vector2 collision_point;
Vector2 collision_normal;
Set<RID> exclude;
- uint32_t collision_layer;
+ uint32_t collision_mask;
uint32_t type_mask;
bool exclude_parent_body;
@@ -61,8 +61,8 @@ public:
void set_cast_to(const Vector2 &p_point);
Vector2 get_cast_to() const;
- void set_collision_layer(uint32_t p_layer);
- uint32_t get_collision_layer() const;
+ void set_collision_mask(uint32_t p_mask);
+ uint32_t get_collision_mask() const;
void set_type_mask(uint32_t p_mask);
uint32_t get_type_mask() const;