Game Development Community

Projecting muzzle smoke forward

by Darkfire Games · in Game Design and Creative Issues · 02/24/2007 (10:19 pm) · 1 replies

Hi all,

Bit of a noob question here. I'm, just starting out learning torque stuff for an FPS in TGEA using Starter.FPS as a base. My first project is getting an assault rifle modelled and in game with some decent effects.

I've managed to get a simple weapon model in game to replace the cross bow and I've been modifying the crossbow script to change the particle effects.

So my question is how do I get smoke particles to spew out forward from the barrel when I fire? I have added ParticleData and ParticleEmitterData blocks for muzzle smoke. I can control how much smoke there is, it's size, shape, transparency, speed, how far it spreads, gravity, etc..........BUT, it only comes out perpendicular to the barrel axis.

I want it to behave as it does now as far as spreading out from the centre but I want it to be thrown forward as well and affected by a drag coefficient in that direction. I've seen a flame thrower someone posted so it does seem possible to throw a particle forward. I've looked through the console objects documentation but I can't find anything useful except possibly phiReferenceVel but the phi stuff seems really weird. I can't work out what it is all about.....

#1
02/25/2007 (1:55 am)
Actually, I just worked it out. I had misinterpreted Theta after playing with some values. I didn't realise it was a control for how tight a cone the particles would be emitted in going forward from the barrel. The documentation is not so great. I had the max set to 180 degree, used a low ejectionVelocity and a relatively high drag coefficient. The end result was that many particles came out sideways rather than forward and those that did go forward only moved a tiny amount.

So what is Phi all about though.....

Next thing I'll be looking into is making projectiles collide with the muzzle smoke to disperse it sideways when a burst is fired.