Method .get_collider()??

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ateff

Why does the “ray.get_collider()” method work “ray.enable” = false?
I check for collision and turn off the ray, but somehow the method still returns an object.

Do you mean that it detects a collision in the same frame where you turned it off, or that you turned it off in some frame and then in some later frame it still detects a collision?

Related, what does is_colliding() return?

Also, I assume your using ray.enabled = false, right? Above you said ray.enable = false.

jgodfrey | 2020-12-14 21:29

I have already changed the code and I don’t remember exactly how it was written.
I turned off the beam, but the get_collider () method still returned the collision object to me. But the is_colliding () method returns false.

ateff | 2020-12-16 11:27