This topic is now archived and is closed to further replies.


Block-Based Collision Detection?

Recommended Posts

Here''s my setup: I have a 3D, first person enviroment. I have walls (blocks really) that are, well, the walls. I have a function that reads an array that looks like this: int grassArray[4][]={ {0,0,0,1,0,1,0,0}, {0,0,1,0,0,1,0,0}, {0,1,0,0,0,1,0,0}, {1,0,0,0,0,1,0,0}, }; And everytime is sees a ''1'' it will place a 3d block (which is my wall). IS there a way I can not run through my walls? I have tried everything from checking to see whether the player coords are at a given position, but that''s HELL to keep track of! There must me an easier way.. Thanks for your time, Yoda "May the force be with you... $2.25 please."

Share this post

Link to post
Share on other sites