Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

let OpenGL do bullet collision?

Name: Anonymous 2006-09-06 0:11

this is something that's been on my mind but I can't find much information on this on Google (which leads me to believe that it's probably not a good idea if nobody else has thought of it).

Umm... okay say I have a scene with a bunch of enemies and other moving models.  And I want to implement localized damage (shoot enemy in the foot, or in the shoulder, etc... specific places).

Is there any reason I can't do this by using GL_SELECT rendering mode in an auxiliary buffer?  like when a shot is fired, render everything like normal as always, but then, in an unseen auxiliary buffer, switch the "camera" to your gun's point-of-view, and then draw the models to the namebuffer (remember this is GL_SELECT rendering mode so things like textures, lighting, even regular won't cause overhead because they're not drawn -- just flat polygons with "names" associated with them).  And then if there's any hits in the auxiliary buffer upon a shot, take the identity of the hit polygon and figure out which body part of a model got hit?

this probably is useless for true collision (as in physics, bouncing, etc) but I thought it might be a neat solution to registering bullet-shots on dynamic entities in a scene.

has anyone ever done bullet-collision this way?

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List