Page 1 of 1

[HELP] Grid based collision

Posted: June 18th, 2017, 8:00 pm
by BerlingSwe
Hello friends. Today, I've been working on my project. The main thing I added was a drag and place feature for some building blocks. (The gray blocks have this feature) What I need help with now, is how I should handle the collision, so that the player cant walk into the same tile as the block. I would be capable of doing it on my own, but then I would have to do it by actually checking the position of the player and all the boxes, and if the player is next to a box, make it impossible for the player to walk into that tile.

Here is the GitHub link: https://github.com/BerlingSwe/GridGame

And here is the actual project:
GridGameV1.rar
(2.32 MiB) Downloaded 127 times
:)

NOTE: The gray blocks are drag and place blocks.

Re: [HELP] Grid based collision

Posted: June 18th, 2017, 8:05 pm
by Battlefrog
Forgot this -> ] :)