[HELP] Grid based collision

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
BerlingSwe
Posts: 13
Joined: June 17th, 2017, 5:46 pm
Location: Sweden

[HELP] Grid based collision

Post by BerlingSwe » June 18th, 2017, 8:00 pm

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 126 times
:)

NOTE: The gray blocks are drag and place blocks.
Last edited by BerlingSwe on June 18th, 2017, 8:19 pm, edited 1 time in total.

User avatar
Battlefrog
Posts: 69
Joined: March 31st, 2015, 10:10 pm
Location: Florida, United States of America

Re: [HELP] Grid based collision

Post by Battlefrog » June 18th, 2017, 8:05 pm

Forgot this -> ] :)
Broc W.

Sole Member of Sledgehog Software, trademark and LLC status pending.

Post Reply