0
votes

I'm currently experimenting in three.js and i have a mesh to which i'd like to attach a particle system (Engine effects on a space ship). I've been experimenting a LOT, but i'm completely lost. Could anyone please point me in the right direction to get it done? or some example would be great!

i've tried just merging the geometry of the particle system to the space ship using THREE.GeometryUtils.merge, but it doesnt work like that.

1

1 Answers

0
votes

i figured it out. a particleSystem has local coordinates, constanly updating the position and rotation of the particlesystem to that of the ship works.

once an emitter is declared, you only have to set the position to that of the mesh it should be attached to like so:

particleEmitter.position = controlledMesh.position;

all that remains is setting the rotation, this does have to be updated every update:

function update(){
    particleEmitter.rotation = controlledMesh.rotation;
}