diff options
| author | Juan Linietsky | 2014-11-05 21:20:42 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-11-05 21:20:42 -0300 |
| commit | 0dbedd18fc62f700e92a4cf581e505d849bc47ad (patch) | |
| tree | 8f2c85b4d9227e441fd35ab4873009faa656bcba /scene/3d/ray_cast.cpp | |
| parent | d14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff) | |
| download | godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.gz godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.tar.zst godot-0dbedd18fc62f700e92a4cf581e505d849bc47ad.zip | |
Diffstat (limited to 'scene/3d/ray_cast.cpp')
| -rw-r--r-- | scene/3d/ray_cast.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index e36e2da14..6bc0c677c 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -33,7 +33,7 @@ void RayCast::set_cast_to(const Vector3& p_point) { cast_to=p_point; - if (is_inside_scene() && get_scene()->is_editor_hint()) + if (is_inside_tree() && get_tree()->is_editor_hint()) update_gizmo(); } @@ -72,7 +72,7 @@ Vector3 RayCast::get_collision_normal() const{ void RayCast::set_enabled(bool p_enabled) { enabled=p_enabled; - if (is_inside_scene() && !get_scene()->is_editor_hint()) + if (is_inside_tree() && !get_tree()->is_editor_hint()) set_fixed_process(p_enabled); if (!p_enabled) collided=false; @@ -91,9 +91,9 @@ void RayCast::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { - if (enabled && !get_scene()->is_editor_hint()) { + if (enabled && !get_tree()->is_editor_hint()) { set_fixed_process(true); Node *p = get_parent(); while( p && p->cast_to<Spatial>() ) { @@ -113,7 +113,7 @@ void RayCast::_notification(int p_what) { } break; - case NOTIFICATION_EXIT_SCENE: { + case NOTIFICATION_EXIT_TREE: { if (enabled) { set_fixed_process(false); |
