Fork me on GitHub
Not signed in (Sign In)
    • CommentAuthorslickthug
    • CommentTimeFeb 15th 2010
     
    Hi,
    Ive been trying to get particles to move from one disc to another but all they do is move up on y-axis.
    Here is the code i tried to get them to go via xaxis but still goes on y axis.

    emitter.addInitializer( new Position( new DiscZone(new Point3D(0,0,0),new Vector3D(1,0,0),10,8)));
    emitter.addInitializer( new Velocity(new DiscZone(new Point3D(-100,100,0),new Vector3D(1,0,0),10,8)));
    emitter.addAction(new Move());
    • CommentAuthorRichard
    • CommentTimeMar 30th 2010 edited
     
    Hi

    Sorry for the delay in responding - lots of work plus speaking at 360Flex and going on holiday means I haven't been around for a while.

    If you want to move from one DiscZone to another, you don't want a DiscZone velocity. One of these two is likely to be the solution you're after...

    emitter.addInitializer( new Position( new DiscZone(new Point3D(0,0,0),new Vector3D(1,0,0),10,8)));
    emitter.addInitializer( new Velocity(new PointZone(new Point3D(-100,100,0))));
    emitter.addAction(new Move());



    emitter.addInitializer( new Position( new DiscZone(new Point3D(0,0,0),new Vector3D(1,0,0),10,8)));
    emitter.addAction( new TweenToZone( new DiscZone(new Point3D(-100,100,0),new Vector3D(1,0,0),10,8)));
    emitter.addAction(new Move());


    I hope this isn't too late to be useful.
    Richard