0 votes

When my player(kinematicBody2D) collide with a tile(TileMap) I need to only acknowledge the first collision until it collides with a different cell. how can I achieve this ?

in Engine by (112 points)
edited by

1 Answer

0 votes

I'm making some logic leaps here, but what I think you need to look at is Collision Layers. Putting the things you want into layers so they will collide only with what they're supposed to.

Once you get things into layers, you won't need to fiddle with getting "the first" collision, it will only collide with what it should collide with.

Watch this excellent video on Collision Layers, makes it very easy.
Godot 3 - How to Use Collision Layers

by (328 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.
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.