How to visualize my entities hitcircles ?

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
teto
Posts: 159
Joined: Thu Dec 03, 2009 9:37 pm
Location: /home
Contact:

How to visualize my entities hitcircles ?

Post by teto »

Hi,

I'm creating a shmup with many bullets on screen. Collisions are in 2D and are computed using circles intersection, each bullet having a radius of collision. I would like to be able to switch on and off quickly the visualization of those radius on top of their 3D models.

I wonder what's the best solution to achieve this. I could create spheric nodes and attach them to their respective parent models. But I would need to create as many spheres as entities onscreen. Is there any way I can draw those circles (as collisions are 2D, spheres are not needed) through shaders ?

Please let me know if I made myself clear enough.
Matt
Using trunk with mingw/gcc 4.6, Windows 7 64 bits driver opengl
REDDemon
Developer
Posts: 1044
Joined: Tue Aug 31, 2010 8:06 pm
Location: Genova (Italy)

Post by REDDemon »

can you simply switch the bullet with another type of bigger mesh? so

Code: Select all

render()
{
    if(showDebugData)
        //draw bullet
    else
        //draw wireframe sphere
}
Junior Irrlicht Developer.
Real value in social networks is not about "increasing" number of followers, but about getting in touch with Amazing people.
- by Me
Post Reply