• Advertisement
Sign in to follow this  

Best way to store collision detection BBs

This topic is 1339 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, okay so ive got got a 3d game with a lot of wall and objects that i want to have collision detection and resolution with, so far ive been using bounding boxes like this:


        //Right bunker wall
        if(playerX > nuclearBunkerX + 7 && playerX < nuclearBunkerX + 8
        && playerY > nuclearBunkerY - 8 && playerY < nuclearBunkerY + 6
        && playerZ > nuclearBunkerZ - 3 && playerZ < nuclearBunkerZ + 16.3)


but having all these bounding boxes takes up a lot of space meaning it takes me longer to find different parts of code, has anyone got any ways that they use bounding boxes while still being able to keep the BBs from filling up my code, for example maybe i could have a text file that i read in to my program that contains all the BBs and then have a for loop running through them? has anyone done it and been successful doing it this way?


Thanks :)

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement