Hi.
I'm trying to figure out when the player clicks on a 3d sprite. Which method would be the easiest to perform this check?
Thanks!
Hi.
I'm trying to figure out when the player clicks on a 3d sprite. Which method would be the easiest to perform this check?
Thanks!
Record a z-buffer of all your screen, and link sprites ID's into it and then compare to that?
An example would be much appreciated, I am incredibly new to OpenGL :P
Pixelthief, may I ask what is a z buffer?
Thanks
Marv (the brainless)
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm
http://en.wikipedia.org/wiki/Z-buffer
Basically, a pixel has doesn't just have a color, but also a depth value that describes how far the visible object on the pixel is away.
Totally off topic but does anyone know whats happening with the development for these objects?
Seems it has been a while since there was any news for them now.
Thanks Looki for helping out.
Marv
458 TGF to CTF 2.5+ Examples and games
http://www.castles-of-britain.com/mmf2examples.htm
Yah, your pixel array should have
*Depth (the Z value, duh)
*Pixel Color
*Pointer to object (ID)
that way simply clicking on a specific pixel will access
depending on implementations ie hardware vs software, these could be simultaneous sidebyside 2 dimensional arrays, or a single 3 dimensional array. In opengl I assume it would be the former
Hopefully if Min is still making the collection a bounding box, depth test or full collision events object with these types of options could be added. This would be quite a useful extension for the collection i think.
You should use the GL_SELECT render mode for this-- a nice tutorial can be found here![]()