0 votes

I have an Area2D with 3 CollisionPolygon2D assigned to detect 3 different parts of the Area2D. Now, the problem is : body_shape_entered of Area2D only supplies a shape index called area_shape, to know which shape of all the sub-shapes combined of the CollisionPolygon2Ds collided.
To know which CollisionPolygon2D collided I have to count them and make a relatively complex multi-line If-Clause.

Isn't there a simpler way to access the actual CollisionPolygon2Ds?

Thanks alot for your patience.
Greetings, Footurist

in Engine by (840 points)

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.