Hello fellow programmers,
I am having a problem I cannot resolve at the moment.
I am (still) doing a tower defense game, and while I managed to make my pathfinding behavior work more or less properly with small sprites, I have one of my towers that "shoots" a poison cloud that basically "pathfinds" from its spawn location on the path all the way to the beginning of the track.
The pathfinding logic is fine. Everything that is not "the path" has the solid behavior, and the cloud has "solids" as obstacles in its logic. I used events to see which cells were obstacles and which ones weren't, and everything looks good.
Here is the problem :
When you go in the Construct 2 pathfinding example (the one with the green arrow), the sprite is quite small, and it certainly does not collide with obstacles. BUT try to make the sprite bigger, say 60*60, and you can see the arrow overlapping with obstacles all over the place.
Hence Two questions :
-What does defines the object's "hit box" when pathfinding ? (the actual hit box, small or big doesn't seem to matter, I tested it)
-How do I make a medium sized sprite, about 60*60 not overlap with cells marked as obstacles ?
Here is a visual representation of what im saying, in the Construct 2 example :
Thank you very much !