diff options
Diffstat (limited to 'scene/resources/ray_shape.cpp')
-rw-r--r-- | scene/resources/ray_shape.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scene/resources/ray_shape.cpp b/scene/resources/ray_shape.cpp index 0acfffdc06..f185263a36 100644 --- a/scene/resources/ray_shape.cpp +++ b/scene/resources/ray_shape.cpp @@ -32,7 +32,7 @@ #include "servers/physics_server.h" -Vector<Vector3> RayShape::_gen_debug_mesh_lines() { +Vector<Vector3> RayShape::get_debug_mesh_lines() { Vector<Vector3> points; points.push_back(Vector3()); @@ -90,6 +90,12 @@ void RayShape::_bind_methods() { RayShape::RayShape() : Shape(PhysicsServer::get_singleton()->shape_create(PhysicsServer::SHAPE_RAY)) { - set_length(1.0); - set_slips_on_slope(false); + length = 1.0; + slips_on_slope = false; + + /* Code copied from setters to prevent the use of uninitialized variables */ + _update_shape(); + notify_change_to_owners(); + _change_notify("length"); + _change_notify("slips_on_slope"); } |