Finding Tiles
I have a tilemap(15x15 tiles) made of 16x16pixel tiles and a player which is circle-shaped (8pixel radius). The player has 'free-movement' (can touch more than one tile at a time).
How can I find the tiles the player is over?
(btw, I dont want to use a bounding-box)
Lasse Hassing
--------------------------------------------------------------
Erh?
Edited by - lazer_hassing on 11/14/00 1:36:38 PM
November 15, 2000 01:10 PM
Get the center of the player. Do a bounding box to find the tiles they might be on. Do a distance calc for each tile corner. If the dist is >= 4 he is on that tile.
quote: Original post by Anonymous Poster
Get the center of the player. Do a bounding box to find the tiles they might be on. Do a distance calc for each tile corner. If the dist is >= 4 he is on that tile.
So I guess I do want to use a bounding box anyway,
Thanks!!!
Lasse Hassing
--------------------------------------------------------------
Erh?
Edited by - lazer_hassing on November 15, 2000 4:18:49 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement