From b4a7a19db42d54062e86d8d5d1275adc7407b49d Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Fri, 24 Apr 2015 20:46:18 -0300 Subject: [PATCH] Updated tutorial_raycasting (markdown) --- tutorial_raycasting.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorial_raycasting.md b/tutorial_raycasting.md index 4a0a44f..2cd5664 100644 --- a/tutorial_raycasting.md +++ b/tutorial_raycasting.md @@ -87,9 +87,11 @@ extends KinematicBody2D func _fixed_process(delta): var space_state = get_world().get_direct_space_state() - var result = space_state.intersect_ray( get_global_pos(), enemy_pos, [ get_rid() ] ) + var result = space_state.intersect_ray( get_global_pos(), enemy_pos, [ self ] ) ``` +The extra argument is a list of exceptions, can be objects (need Godot 1.1beta2+ for this) or RIDs. + ### 3D Ray Casting From Screen Casting a ray from screen to 3D physics space is useful for object picking. There is not much of a need to do this because [CollisionObject](class_collisionobject) has an "input_event" signal that will let you know when it was clicked, but in case there is any desire to do it manually, here's how.