0 votes


I'm making a 2d game with grid based movement and to check if there's something to collide with in the cell where the player wants to move I'm using a Raycast2D.

I'm changing the its position rather than casting it to the cell where the player wants to move because if there's something in the same cell as the player, like some pickup that can't be picked (for gameplay porposes), it will only detect that pickup and not, for example a wall.

The thing is that this way the collisions work as usual with enemies and pickups (sprites with an area2d), but not with the tilemap.

I'm updating the raycast after moving it and all the tiles have collision shapes, so I don't know why this doesn't work. I would appreciate any help!

asked May 28 in Engine by MateG_ (12 points)

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.