Collision Detection Rant

Moderator
Posts: 613
Joined: 2004.09
Post: #1
So i needed to step away from my work for a bit and complain about my collision detection engine. Im not really asking for help or anything im just ranting.

What i cant seem to understand if my bounds are correct then why do the stupid objects pass through eachother before they react to collisions. And working out an AI response to 2 animals hitting eachother is a nightmare because most the time they just try and turn into eachother then my collision detection freaks out and they blink and rotate in circles really fast.

What i think i need to do is step back from my code for a few days read some articles, look at someone elses stuff and then try and figure something new out.

Well i guess thats it, just wanted to bring other people into my misery a bit with me =D. Thanks for listening.

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Member
Posts: 184
Joined: 2004.07
Post: #2
Out of curiousity, what kind of collision detection are you trying to do? Circle? Box? Polygons?
Quote this message in a reply
Member
Posts: 156
Joined: 2002.11
Post: #3
A few references:

http://peroxide.dk/tuts_c.shtml

1. Nevell, Graphics Gems III, pp. 231-232.

2. W.H. Press, Numerical Recipes in C, Second Edition (http://www.library.cornell.edu/nr/bookcpdf/c5-6.pdf)

3. T. Schroeder, "Collision Detection Using Ray Casting", Game Developer Magazine, pp. 50-57, August 2001 (ftp://ftp.gdmag.com/pub/src/aug01.zip)

4. T. Akenine-Möller, E. Haines, Real-Time Rendering (http://www.realtimerendering.com/int/)
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #4
Bitmap Masking on oddly shaped models, but i figure i can wrap them in spheres and shot for easier detection using that.

Thanks for the links FCCovett!

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Member
Posts: 184
Joined: 2004.07
Post: #5
I'd go with that, too. Very few players can actually notice bitmap-precise collision detection, and actually the majority will curse your precise collision, wondering how a very narrow part of their player actually got hit. I think it's usually best to inset the collision proxy of an object somewhat.
Quote this message in a reply
Moderator
Posts: 613
Joined: 2004.09
Post: #6
Yea thats looking good, the collision seems to be working more or less I figure i can debug it a bit more when i get everything up and going. My main issue has been the AI reaction to a collision right now the objects freak out because i have set them to look for a free path and they just kind of bounce around for a while. I tried just reversing the current direction but when objects arent hitting head on this provides some very odd results. I read an article on Flocking in Game Gems 1 (I just got the whole set) and it had some decent infomation on prey and predator AI. But off anyones head does anyone know if there are any articles online for the AI of prey/pred?

Kyle Richter
DragonForged.com
Twitter: @kylerichter
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  rant on realism reubert 25 8,173 Jul 25, 2003 07:57 PM
Last Post: OneSadCookie
  Improving collision detection efficiency NCarter 16 9,450 Oct 20, 2002 04:40 AM
Last Post: codemattic