summaryrefslogtreecommitdiffstats
path: root/scene/3d/ray_cast.h
diff options
context:
space:
mode:
authorBenjamin Dahse <ronoueb@gmail.com>2017-03-21 17:09:04 +0100
committerBenjamin Dahse <ronoueb@gmail.com>2017-03-30 22:34:05 +0200
commit93d6003aa8602262fb4878620178f51e828e5b0c (patch)
treed8efab9ae0d3c4b6c2f6bfe87953e27b1e9f62e6 /scene/3d/ray_cast.h
parent9061d6f8ce8c393653204b7565d7af3fe0c3c084 (diff)
downloadredot-engine-93d6003aa8602262fb4878620178f51e828e5b0c.tar.gz
Show 3D raycasts when debugging collisions
Represent a raycast by a line segment using the direction and magnitude of the cast_to vector. The entire line segment will become red while a collision occurs.
Diffstat (limited to 'scene/3d/ray_cast.h')
-rw-r--r--scene/3d/ray_cast.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h
index 00a10446a5..d1a284aee4 100644
--- a/scene/3d/ray_cast.h
+++ b/scene/3d/ray_cast.h
@@ -49,6 +49,13 @@ class RayCast : public Spatial {
uint32_t layer_mask;
uint32_t type_mask;
+ Node *debug_shape;
+ Ref<Material> debug_material;
+
+ void _create_debug_shape();
+ void _update_debug_shape();
+ void _clear_debug_shape();
+
protected:
void _notification(int p_what);
void _update_raycast_state();