Post

 Resources 

Console


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


-
Up One Level | Back to Forum


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 187 visitors within the last 20 minutes
RSS News Feed