Is their anyway to detect an incomming collision?
by Vince Gee · in Torque Game Engine · 01/30/2006 (7:23 am) · 3 replies
Dunno if it's possible,
But I would like to know if their are any projectiles w/in say 10 meters of a character where are inpending collision.
Figure it like radar on a projectile.
So a script function would be like Player.getincommingcollisions()
and it would return an array or collection of all projectile id's which are incomming.
Any ideas on where to start looking or if it's been done yet?
Vince
But I would like to know if their are any projectiles w/in say 10 meters of a character where are inpending collision.
Figure it like radar on a projectile.
So a script function would be like Player.getincommingcollisions()
and it would return an array or collection of all projectile id's which are incomming.
Any ideas on where to start looking or if it's been done yet?
Vince
About the author
www.winterleafentertainment.com
#2
01/30/2006 (7:41 am)
Misread and martin beat me to it.
#3
Given a decent number of projectiles, I think it would require much less processing for the projectile to notify its target as opposed to the players looping through them all when the majority might not even be aimed at them.
01/31/2006 (2:15 am)
The other way around would be to put impending collision detection on the projectile, so they warn the target when they are a certain distance. The biggest caveat to either system might be the fact that projectiles usually move pretty quickly, if you detected one 10 meters out, chances are very good that it's a split second away from hitting you.Given a decent number of projectiles, I think it would require much less processing for the projectile to notify its target as opposed to the players looping through them all when the majority might not even be aimed at them.
Torque Owner Martin Schultz
Martin