Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotate individual particles #15

Open
nixxle opened this issue Oct 24, 2012 · 2 comments
Open

rotate individual particles #15

nixxle opened this issue Oct 24, 2012 · 2 comments

Comments

@nixxle
Copy link

nixxle commented Oct 24, 2012

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);
@liaocheng
Copy link
Owner

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

@nixxle
Copy link
Author

nixxle commented Oct 26, 2012

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants