Collision issue



  • Hi everyone,

    I'm making a copy of the game Battlecity for Game Boy, and I'm having an issue where the enemy tanks are penetrating through the walls of my map. The map has been made with Tiled and imported following the same procedure as in the TiledEditor demo. Here's a gif to illustrate (sorry about the shitty quality, the game is actually slower):

    http://gph.is/2Fo05Y4

    Take a look at the two tanks on the right. At some point they aren't properly separated and just disappear into the void. Anyone has any idea what might be happening here?

    Thank you



  • It looks like, even though the touching flags are updated, the separation doesn't happen anyway. Is this a known bug?



  • Looks like I managed to solve this. Originally, the tank movement was totally random. Now, to avoid them going bumping into walls without need, I have implemented a different solution that scans around the tank. Also -and I think this might have been the actual issue- I was calling overlap on each tank using a loop instead of passing a FlxGroup directly. Looks like it's working so far.


Log in to reply
 

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.