VBGamer |
|
You need to convert it... Rag on a Stick (0 replies, 0 views) (2000-Jul-5) Say you have a map and each tile is 32x32 but your character moves freeform then to check for collisions, you convert the characters location into tile coordinates by dividing by 32. But since the character may be on 4 different squares (or more if they are huge) then you can do 4 tests for collisions:
Top left
Top right
Bottom left
Bottom right
For each one, divide the coordinates by 32 and then check for walkability on the map, if each one of them is clear (walkable) then there is no collision.
It doesn't matter if one is freefrom and the other is tilebased, as long as you convert it.
hth |