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

    • CommentAuthorwormdiet
    • CommentTimeMay 26th 2010
     
    First of all, this system is great!

    Question: how do I move a gravity well around by responding to dynamic events other than a mouse clip?

    In other words, I want to be able to feed a gravity well x & y coordinates based on (non-mouse) user input.

    These are the gravity wells I'm talking about, lifted and tweaked from the examples:

    mitter.addAction( new GravityWell( 40, 200, 200 ) );
    emitter.addAction( new GravityWell( 40, 75, 75 ) );
    emitter.addAction( new GravityWell( -50, 325, 325 ) );
    emitter.addAction( new GravityWell( -40, 75, 325 ) );
    emitter.addAction( new GravityWell( -40, 325, 75 ) );

    Thanks!
    • CommentAuthorkakudaf
    • CommentTimeMay 27th 2010
     
    var g_w:GravityWell = new GravityWell( 40, 200, 200 );
    emitter.addAction( g_w );
    //change x & y
    g_w.x = new_x;
    g_w.y = new_y;
    • CommentAuthorwormdiet
    • CommentTimeJun 1st 2010
     
    Thanks!

    I got some help by looking at some of the samples.