Cyclone112 Posted July 2, 2017 Share Posted July 2, 2017 I have a top-down game where I want most objects aligned to tiles. They can be moved(by having a velocity applied to them) but when they do they need to end exactly within a tile when they are stopped. Let's say I have a sprite that is moving across the screen and it detects that the next tile it will try to enter is occupied by some other object. In that scenario I would like to manually stop the sprite at exactly the location of the tile it's in. Currently I have collision on blue and red in the picture and blue would then be manually aligned at the previous tile which looks bad animation wise as it sort of jumps backwards. So what I think I need is a sort of predictive method where before blue enters the next tile it checks if that tile is occupied and if so stops. Any suggestions on the best way to handle this? Link to comment Share on other sites More sharing options...
Recommended Posts