0 votes

In my project I have a spell attack that uses an Area2D as the root node. I can detect when it enters kinematic bodies without problem so it can dissipate and affect players/enemies.

However, I have a TileMap that I am using to draw levels with floor and walls. The player and enemies collide with the walls, but I am struggling to find out how to make the spell dissipate upon touching the walls. I don't want them to be able to go through walls.

Can I do this, or do I have to make the attacks use a kinematic body? The only problem with that is they physically interact with other bodies they collide with when I don't want them to.

asked May 21 in Engine by artsyWraith7 (24 points)

Area2D's body_entered signal will fire on TileMaps too. Share more about your implementation and maybe we can see why it's not working for you.

You are right, it works now- the problem was that the script was checking if the colliding body was an enemy and not considering tiles at all. I've changed it to collide with all bodies that aren't the player.

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.