liaocheng/away3d-particles-system

rotate individual particles

Opened this issue · 2 comments

Hi Liao,

Great work on this particle system, it is the best.

If I add RandomRotateLocal, my particles disappear. I tried many different values for param["RandomRotateLocal"] but I don't see the particles.

I have very simple Plane particles for testing. I would like these particles to start at different x, y, z rotations.

It is based on your "fire example":

var material:ParticleColorMaterial = new ParticleColorMaterial();

        var planeGeo:PlaneGeometry = new PlaneGeometry(30, 20,1,1,false,true);
        var planeGeo2:PlaneGeometry = new PlaneGeometry(15, 10,1,1,true,true);          

        sample1 = new ParticleSample(planeGeo.subGeometries[0], material);
        sample2 = new ParticleSample(planeGeo2.subGeometries[0], material);         

        //step 2:we create a generater which will group the samples.
        var generater:MutiWeightGenerater = new MutiWeightGenerater([sample1, sample2], [5, 1], 1000);

        //step 3: we create a container and set some attributes.
        particle = new ParticlesContainer();
        particle.loop = true;
        particle.hasDuringTime = true;          

        var action5:RandomRotateLocal = new RandomRotateLocal();
        particle.addAction(action5);

Hey, I just have a try, it works well. I used the dev branch.
BTW, You can use this lastest particle system being integrating with Away3D:
https://github.com/away3d/away3d-core-fp11/tree/particle_integrate

these are two simple examples :
http://www.awayphysics.com/liao/particleWithLight/example.zip
www.awayphysics.com/liao/triangle.zip

Thank you for you reply, I found my problem: The param["RendomRotateLocal"] need a vector with 4 arguments (x,y,z,w) I only gave it 3 (x,y,z) it works now. thanks!