I keep getting this " error Invalid call. Nonexistent function 'get_collider' in base 'Dictionary'
, which is weird because I followed the docs and they used it the same say way. my code is blow.
func _input(event):
if(Input.is_mouse_button_pressed(BUTTON_LEFT)):
rayFrom = self.project_ray_origin(event.pos);
rayTo = rayFrom + self.project_ray_normal(event.pos) * 100
func _fixed_process(delta):
if(rayFrom != Vector3() && rayTo != Vector3()):
var space_state = get_world().get_direct_space_state()
var ray = space_state.intersect_ray(rayFrom, rayTo, [self]);
if(!ray.empty()):
print(ray.get_collider())
print(ray.is_colliding())