Jump to content

  • Log In with Google      Sign In   
  • Create Account

Block-Based Collision Detection?


Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1   Members   

122
Like
Likes
Like

Posted 16 December 2001 - 11:36 AM

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."

#2   Members   

118
Like
Likes
Like

Posted 16 December 2001 - 05:10 PM

yeah, checking whether the player''s bound box is going through your blocks. look up collision detection on this site as well as google.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.