summaryrefslogtreecommitdiffstats
path: root/scene/3d/ray_cast.cpp
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-19 01:02:56 +0200
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2017-08-19 01:29:45 +0200
commit90b8a5b71ef79e0339826507c4b290f0c51b7cd2 (patch)
tree6f24bbc63ef9674687589f9ec9017e9fd09d266e /scene/3d/ray_cast.cpp
parentfd69604bd9dc743494a7818f25f384cc7f521b33 (diff)
downloadredot-engine-90b8a5b71ef79e0339826507c4b290f0c51b7cd2.tar.gz
Removes editor_hint from SceneTree
Diffstat (limited to 'scene/3d/ray_cast.cpp')
-rw-r--r--scene/3d/ray_cast.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp
index 67e7fb0e12..b0aab6cc4d 100644
--- a/scene/3d/ray_cast.cpp
+++ b/scene/3d/ray_cast.cpp
@@ -30,12 +30,14 @@
#include "ray_cast.h"
#include "collision_object.h"
+#include "engine.h"
#include "mesh_instance.h"
#include "servers/physics_server.h"
+
void RayCast::set_cast_to(const Vector3 &p_point) {
cast_to = p_point;
- if (is_inside_tree() && (get_tree()->is_editor_hint() || get_tree()->is_debugging_collisions_hint()))
+ if (is_inside_tree() && (Engine::get_singleton()->is_editor_hint() || get_tree()->is_debugging_collisions_hint()))
update_gizmo();
if (is_inside_tree() && get_tree()->is_debugging_collisions_hint())
_update_debug_shape();
@@ -94,7 +96,7 @@ Vector3 RayCast::get_collision_normal() const {
void RayCast::set_enabled(bool p_enabled) {
enabled = p_enabled;
- if (is_inside_tree() && !get_tree()->is_editor_hint())
+ if (is_inside_tree() && !Engine::get_singleton()->is_editor_hint())
set_fixed_process(p_enabled);
if (!p_enabled)
collided = false;
@@ -118,7 +120,7 @@ void RayCast::_notification(int p_what) {
case NOTIFICATION_ENTER_TREE: {
- if (enabled && !get_tree()->is_editor_hint()) {
+ if (enabled && !Engine::get_singleton()->is_editor_hint()) {
set_fixed_process(true);
if (get_tree()->is_debugging_collisions_hint())