Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

    • CommentAuthordebug
    • CommentTimeFeb 22nd 2010
     
    Is it possible to create a 3d grid of particles without an emitter (using nested for loops), i've tried doing it with the emitter but seem to run into some problems. According to the documentation I should be able to use ParticleCreator3D but i'm getting the following error when trying to initialize an object:

    1046: Type was not found or was not a compile-time constant: ParticleCreator3D.
    • CommentAuthorRichard
    • CommentTimeMar 16th 2010 edited
     
    The normal way to achieve what you're after would be to create a custom initializer that places the particles in the grid pattern that you want.

    Alternatively, you can create the particles by hand (they're just instances of Particle3D) and then add them to the emitter using the addExistingParticles method of the emitter.

    ParticleCreator3D is a factory class for managing the creation and reuse of particles. The emitter uses it to create particles and if you want to use it directly either

    var particleFactory:ParticleCreator3D = new ParticleCreator3D();
    var particle:Particle3D = particleFactory.createParticle() as Particle3D;


    or

    var particleFactory:ParticleCreator3D = emitter.particleFactory as ParticleCreator3D;
    var particle:Particle3D = particleFactory.createParticle() as Particle3D;