0 votes

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.

Godot version 3.2.3
in Engine by (42 points)

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.

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

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.