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.