DragonflyJones Posted January 23, 2015 Share Posted January 23, 2015 I have a simple tile based game similar to PacMan. I'm using a path algorithm that always returns the next tile a sprite should navigate to. Think about one of the ghosts moving. I'm having a hard time getting the sprite to stop getting stuck between tiles. I've tried adding velocity and MoveTo but the sprites constantly get stuck. I've also taken the suggestion in the link below and shrunk my sprites a bit but the collisions are still off. http://stackoverflow.com/questions/27785355/moving-a-sprite-along-a-pre-defined-path-in-phaser-io I'm using Arcade physics btw. Any ideas? Link to comment Share on other sites More sharing options...
rich Posted January 23, 2015 Share Posted January 23, 2015 If I was doing Pacman I wouldn't collide the ghosts with the tilemap at all. I would use the map for its underlying data, so the ghosts can track which tile they are on and which tiles are coming up (based on their direction), so you can move them around and such - but I wouldn't actually use the map for collision with them, because they don't actually need it - and it's highly likely to conflict with how they need to be automatically moved. DragonflyJones and AdamMagyar 2 Link to comment Share on other sites More sharing options...
DragonflyJones Posted January 24, 2015 Author Share Posted January 24, 2015 This is a good idea. I'll try it, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts