Jump to content

Able to push sprites through tiles


retrogamer4ever
 Share

Recommended Posts

So I created a tile map via tiled very simple, just some boxes... Then I loaded it up the usual way... then I did setCollisionRange so things wouldn't be able to go through the tiles... So far, so good. Then created two sprite objects and when they individually touch the tiles they are unable to go through the tile which is exactly what I want! But if I have those two sprites move each other they can then push through the tile. Which I find very odd. It's as if when two sprites are touching then collision on the tilemap is just being ignored and let's them go through. 

 

In the update all I am doing is checking for collision between the two sprites and just incrementing each sprites velocity every time keys are pressed. and my tile map is set to just collide with everything.

 

Maybe I am just doing something silly...

 

Any ideas? 

Link to comment
Share on other sites

  • 10 months later...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...