Game Development Community

Particle Effect Collision

by Gustavo Boni · in Torque Game Builder · 10/24/2006 (10:41 pm) · 4 replies

Hi all,

I have a gernade in my game and when it explodes i'd like to damage the objects around it. Is there a function to caculate a collision between a particle effect and an object?

Regards,

Gustavo

#1
10/25/2006 (2:43 am)
For this type of work you probably don't want to do that to begin with. Why take a performance hit checking if thousands of particles are colliding with a sprite (not even sure if you can in TGB, to be honest) when you can just get the location of the effect, check for objects within distance r, and apply damage to those objects based on their distance from the effect.

This is typically how it's done in all games - unless you have some weird grenade like the nail grenade in Team Fortress where it spawns it's own child objects that spray in a pattern and you absolutely must check for their collision (because not everyone within the radius would be injured, only if the object hit them).

If it's a normal grenade - work smarter, not harder.
#2
10/25/2006 (7:11 am)
Thanks Michael, think i get it. I was wondering if TGB don't have a callback or fucntion wich do this for me, do you know?

Thanks
#4
10/25/2006 (12:04 pm)
Thanks Michael. It's working now!