0 votes

Hello! I'm starting to wrap my head around Area2d and it seems to be the perfect type of collision detection for my game. However, I'm running into a weird issue. Before export, the output of getoverlappingbodies when touching a wall is always [TileMap:680]. However, after export, the value changes and it breaks my script. Three questions:

  1. Why is this happening?
  2. Is there a way to force consistent output before and after export?
  3. Is there a way to detect an object's group name with Area2d?
asked Jan 26, 2018 in Engine by behelit (69 points)

1 Answer

0 votes
Best answer

I never really got an answer to my first 2 questions, there doesn't seem to be a good reason for changing the object references after export... However, I was able to do what I wanted with print(area.get_name()), which allowed me to identify objects uniquely if I rename all the Area2D's. They should really add a signals section to the official game documentation, it's not obvious how it works until you start getting your hands dirty.

answered Jan 27, 2018 by behelit (69 points)
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.