Wacky default projectile behaviour
by Daniel Buckmaster · in Torque Game Engine · 08/04/2008 (3:24 am) · 2 replies
I'm starting to play with projectiles. The main thing I want is projectiles that ricochet when hitting a surface at a certain angle. Not too hard. But wanting to program this prompted me to do some research into how Torque currently handles projectile bounces, arming delays, etcetera.
The answer is: wierdly.
If I fire a non-ballistic projectile, it won't collide with anything until it's armed. If I fire a ballistic projectile with an armingDelay similar to its lifetime and 0 elasticity, it will stick to whatever it collides with, then at the end of its life, it may or may not explode.
Projectiles with armingDelay reasonably lower than lifetime explode reliably. What's the problem when the gap is closer?
The answer is: wierdly.
If I fire a non-ballistic projectile, it won't collide with anything until it's armed. If I fire a ballistic projectile with an armingDelay similar to its lifetime and 0 elasticity, it will stick to whatever it collides with, then at the end of its life, it may or may not explode.
Projectiles with armingDelay reasonably lower than lifetime explode reliably. What's the problem when the gap is closer?
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!
#2
I'm just wondering what the cause of the random explosions is - I'm assuming that it's a client/server issue. Either way, I'm ewriting the projectile code, so...
08/04/2008 (12:18 pm)
Yeah - so the bullet doesn't collide with the gun, basically. Also, you can use it for grenades like in Tribes - they bounced a few times and then exploded, but if you fired a long arcing shot, it'd explode as soon as it hit.I'm just wondering what the cause of the random explosions is - I'm assuming that it's a client/server issue. Either way, I'm ewriting the projectile code, so...
Torque 3D Owner Morrock