- Home /
Differentiate between sliding collision and impact collision,Need to differentiate sliding vs colliding
I have a game on a Tilemap where you (a 1x1 square) can move around a top-down map. All tiles are 1x1. Some tiles (spikes) kill the player when the player touches it, but I want the player to be able to walk directly next to the tile. This means if there is a wall above the spike, the player should be able to walk all the way up to the wall, then walk down along it safely past the spike.
This is where I run into my issues. When I check collision via OnTriggerEnter2D, it always says that I trigger the Tilemap Collider. This is not only an issue because I don't want this "sliding collision" to count, but also because I can't manually check the bounds of the shape, as it is part of a Tilemap, and I don't seem to get any information about the individual tile which I collided with.
I am really struggling to find a solution, so any input is welcome. Thanks!
Your answer
Follow this Question
Related Questions
How to handle custom collision sliding 0 Answers
Object is sliding off instead of bouncing! 3 Answers
Composite Collider on Tilemap not really stopping player 0 Answers
Tilemap Collider/Composite Collider leaving gaps 2 Answers
How to the detect what side of the player is colliding with a object in a tilemap 2 Answers