Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Block-Based Collision Detection?

4: Adsense

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 YodaTheCoder   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 a person   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.