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.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/scene/2d/ray_cast_2d.cpp b/scene/2d/ray_cast_2d.cpp
index e53f89c46d..2cc3a74270 100644
--- a/scene/2d/ray_cast_2d.cpp
+++ b/scene/2d/ray_cast_2d.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -173,7 +173,7 @@ void RayCast2D::_notification(int p_what) {
}
draw_line(Vector2(), target_position, draw_col, 2);
Vector<Vector2> pts;
- float tsize = 8;
+ float tsize = 8.0;
pts.push_back(xf.xform(Vector2(tsize, 0)));
pts.push_back(xf.xform(Vector2(0, Math_SQRT12 * tsize)));
pts.push_back(xf.xform(Vector2(0, -Math_SQRT12 * tsize)));
@@ -325,12 +325,4 @@ void RayCast2D::_bind_methods() {
}
RayCast2D::RayCast2D() {
- enabled = true;
- collided = false;
- against_shape = 0;
- collision_mask = 1;
- target_position = Vector2(0, 50);
- exclude_parent_body = true;
- collide_with_bodies = true;
- collide_with_areas = false;
}