+1 vote

Use isonwall to detect when an enemy collides with a wall, to change its direction. But I don't want this to happen with the player, I want him to ignore this when he collides with the player to keep looking at the direction of this

in Engine by (93 points)

1 Answer

+2 votes

The easiest way would be to put them on different collision layers for e.g.
Walls on layer 1, Player on 1 & 2 and Enemy on 1 & 3.
The enemy can then have an area set to layer 2/the player's layer for any interaction.

by (3,257 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 Frequently asked questions and 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 [email protected] with your username.