Tile Collision Question
Posted
by Alu
on Stack Overflow
See other posts from Stack Overflow
or by Alu
Published on 2010-04-17T00:54:51Z
Indexed on
2010/04/17
1:03 UTC
Read the original article
Hit count: 285
tiles
Hey guys,
I'm working on tile collision. Currently, I just draw the tile map the normal way (two for loops) and there is no scrolling. Right now, to check if my player is over a tile, I use tileX = (int)person1v.X / 16;
tileY = (int)person1v.Y / 16;
However, I want to detect collision before I hit the tile so it could act as a wall. How do I detect collision before even making the move?
© Stack Overflow or respective owner