0 votes

Ok, so I'm trying to get the player to detect if it's overlapping specific tile types.

Normally you do it like this:

Area2D-chan getting a list of overlapping tiles, then telling Player-senpai what they are.

Unfortunately there seems to be no direct way to do that in Godot. You can't get a list of tiles that overlap an Area2D, unless I missed something.

However, there are two stupid ways to do this;

  • Separate each tile type (spikes, water, lava, icecream) into its own tilemap and test for that (dumb extra busywork, but it works).

  • Separate each tile type into its own Area2D and add CollisionShape2Ds for each region they cover (ew, why would you do that?) and test for those.

I guess what I'm asking is if there's any non-dumb alternatives that I overlooked?

Godot version 3.4.2
in Engine by (12 points)

did you solve the problem?

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.