Jump to content
  • Advertisement


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


3D Collision Detection

This topic is 6914 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,I have made a 3d world demo made up of cubes as objects. I can move around quite freely but also through the objects. I guess this is where collision detection comes in, can anyone please help me out as to what steps i need to take to impliment this - or preferably point me in the right direction to some easy tutorials on the web. Many Thanks

Share this post

Link to post
Share on other sites
Collision detection is a fairly complex matter and I believe you would learn it by reading as many article as possible on the subject. A good place to start is looking through the programming features at Gamasutra. There are a couple of good articles there that shouldn''t be too hard to grasp.

- WitchLord

Share this post

Link to post
Share on other sites
Hard dont think
Collision detection is hard! dont think. If you think about it logically it can be applied seamlessley with little effort or mathmatical prowes. I got CD in my 3d world and i aint the sharpest mathmatical brain in the uk. the easyiest way if to use the good old ''if'' statement to tell the app if you standing in a area u shouldnt be then stop moving u just hit sommin!.

for example on a wall which streches from (9,0),(-9,0);

if(xpos >= 9 && xpos <=-9 && zpos > 0 && zpos <0.3)

you would have to tweak the coords slightly so that u stop infront! of the wall(which u would with the supplied set 0.3 units in front of wall) and not in it and u allways must supply 4 arguments to the if statemnet or youll find that you wont be abble to walk in some places. oh jueah to collide on a hight scale for like walking up ramps you would obviusly need to supply a height coord.

youve proberbly have noticed /realised that supplying 4 coords on this way describes a rectangular area mathmaticall which it what basically you do u discrbe using the if statements areas that are hard. this isnt by far the best technique but its enough to get started. and remember you always need atleast 4 coords!!!!!

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!