Page 1 of 1

How to visualize my entities hitcircles ?

Posted: Fri Feb 25, 2011 10:43 am
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

Posted: Fri Feb 25, 2011 12:27 pm
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
}