Hot answers tagged


You want to make it so that 'bottom' resolves into the next tile when there is a small increase in _pos.Y, the same goes for 'right' and _pos.X. This will also fix the edge case when you're exactly aligned within a tile ie. 'top' and 'bottom' will be within the same tile in that case. So to calculate the left, right, top and bottom, do something like the ...

Only top voted, non community-wiki answers of a minimum length are eligible