0 votes

I can make the raycast2d detect the area but not the other way around.
Having the area detect the raycast would save me some braincells so any ideas u have just drop them here please!

in Engine by (110 points)

2 Answers

+1 vote
Best answer

RayCasts can't be detected since they don't have a Collision Layer. Adding an object that can be detected as the parent of the RayCast is probably the solution you're looking for.

by (3,665 points)
selected by
0 votes

the area2d can listen to the raycast detecting things. then check if it's him who was detected. it should be equivalent to the area detecting the raycast.

by (27 points)
edited by
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.