Setting Particle Emitter velocity in local coordinates

In my project, I have a gun, and am using a particle emitter to simulate the “shells” ejecting out. The problem is, I set the velocity of the particle emitter to (7.5f, 2.0f, 0.0f) so it will emit that in the world coordinates. How could I emit these particles relative to the guns local x coordinate?

1 Like

Attach the emitter to the same node as the gun … this will place the emitter local to that node. There is a flag for whether or not the particles are handled in local space (follow the emitter) or world space (stay relative to their emission point).

Unfortunately I do not remember the specific method names. Though this should be enough to get you on the right path.

@t0neg0d said: Attach the emitter to the same node as the gun ... this will place the emitter local to that node. There is a flag for whether or not the particles are handled in local space (follow the emitter) or world space (stay relative to their emission point).

Unfortunately I do not remember the specific method names. Though this should be enough to get you on the right path.


Thanks for the reply. The method would be setInWorldSpace or something like that. I did try to attach the emitter to the node of the gun and it didn’t seem to work so that why I came here.

1 Like