summaryrefslogtreecommitdiff
path: root/scene/2d/ray_cast_2d.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/2d/ray_cast_2d.cpp')
-rw-r--r--scene/2d/ray_cast_2d.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index 3252e02e38..fd6e0aebcc 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -78,7 +78,7 @@ bool RayCast2D::is_colliding() const {
}
Object *RayCast2D::get_collider() const {
- if (against == 0)
+ if (against.is_null())
return NULL;
return ObjectDB::get_instance(against);
@@ -225,7 +225,7 @@ void RayCast2D::_update_raycast_state() {
against_shape = rr.shape;
} else {
collided = false;
- against = 0;
+ against = ObjectID();
against_shape = 0;
}
}
@@ -339,7 +339,7 @@ void RayCast2D::_bind_methods() {
RayCast2D::RayCast2D() {
enabled = false;
- against = 0;
+
collided = false;
against_shape = 0;
collision_mask = 1;