Forum Replies Created

  • Mbs

    June 17, 2005 at 5:01 pm in reply to: Particle Playground and Expressions Help

    Oops! (errant mouse click)

    Finally got a chance to try this out. Thanks so much for your help. While the first part (the expression for the cannon’s position) is giving me positions outside of the frame, I’m still having the problem of some particles being “born” within the frame.

    My null Layer is animating around the frame (in a square – lower left, upper left, upper right, etc.) over the course of 20 sec, so the code I’m using is:

    variation=random(0,20);
    helper=thisComp.layer(“circler”);
    new_X=helper.position.valueAtTime(variation)[0];
    new_Y=helper.position.valueAtTime(variation)[1];

    [new_X,new_Y]

    (where circler is the name of my null object).

    Any thoughts on why particles are popping up in the frame? Could it be my other settings?

    In addition, the second part (the angle the cannon fires) seems to be acting weird.
    The code suggested:

    helper=thisComp.layer(“Cannon Helper”);
    helper_X=helper.position[0];
    helper_Y=helper.position[1];
    center_X=thisComp.width/2;
    center_Y=thisComp.height/2;
    diff_X=helper_X-center_X;
    diff_Y=helper_Y-center_Y;

    angle=readiansToDegrees(Math.atan2(diff_Y,diff_X));

    First of all, am I correct in thinking that the first line should actually be grabbing the position of the Cannon, and not the Cannon helper? With that difference, i’m still getting erratic angles. I added a Slider Control to debug, and Diff_X and Diff_Y seem to be coming out all right, so I figure the problem is in the last line (apart from the typo in “radians”). Anyone have any ideas? Thanks in advance.

  • Mbs

    June 17, 2005 at 5:01 pm in reply to: Particle Playground and Expressions Help

    Oops! (errant mouse click)

    Finally got a chance to try this out. Thanks so much for your help. While the first part (the expression for the cannon’s position) is giving me positions outside of the frame, I’m still having the problem of some particles being “born” within the frame.

    My null Layer is animating around the frame (in a square – lower left, upper left, upper right, etc.) over the course of 20 sec, so the code I’m using is:

    variation=random(0,20);
    helper=thisComp.layer(“circler”);
    new_X=helper.position.valueAtTime(variation)[0];
    new_Y=helper.position.valueAtTime(variation)[1];

    [new_X,new_Y]

    (where circler is the name of my null object).

    Any thoughts on why particles are popping up in the frame? Could it be my other settings?

    In addition, the second part (the angle the cannon fires) seems to be acting weird.
    The code suggested:

    helper=thisComp.layer(“Cannon Helper”);
    helper_X=helper.position[0];
    helper_Y=helper.position[1];
    center_X=thisComp.width/2;
    center_Y=thisComp.height/2;
    diff_X=helper_X-center_X;
    diff_Y=helper_Y-center_Y;

    angle=readiansToDegrees(Math.atan2(diff_Y,diff_X));

    First of all, am I correct in thinking that the first line should actually be grabbing the position of the Cannon, and not the Cannon helper? With that difference, i’m still getting erratic angles. I added a Slider Control to debug, and Diff_X and Diff_Y seem to be coming out all right, so I figure the problem is in the last line (apart from the typo in “radians”). Anyone have any ideas? Thanks in advance.

  • Mbs

    June 17, 2005 at 4:20 pm in reply to: Particle Playground and Expressions Help

    Finally got a chance to try this out. Thanks so much for your help.
    The first part seems to work well (

  • Mbs

    June 17, 2005 at 4:20 pm in reply to: Particle Playground and Expressions Help

    Finally got a chance to try this out. Thanks so much for your help.
    The first part seems to work well (

  • Mbs

    June 17, 2005 at 3:18 am in reply to: Particle Playground and Expressions Help

    Thanks so much for the help! I’m trying it out now… i’ll let you know how it goes.

  • Mbs

    June 17, 2005 at 3:18 am in reply to: Particle Playground and Expressions Help

    Thanks so much for the help! I’m trying it out now… i’ll let you know how it goes.

  • Mbs

    May 26, 2005 at 12:14 pm in reply to: Batch Processing / Template / Workflow question

    Thanks for your help, guys, i’ll try both techniques!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy