Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions if/else Diagonal

  • Andrei Popa

    March 14, 2021 at 1:43 pm

    I am not sure what you want your if/else statement to do…

  • Steve Robinsons

    March 15, 2021 at 7:49 am

    Hi Andrei,

    Doesn’t matter the final result, I just want to know how to set up the diagonal limit in js code.

    Thanks!

  • Robert Müller

    March 15, 2021 at 3:29 pm

    Hi Steve, we need to know what you are trying to accomplish here, there is no universal if/else statement. Do you want an object moving in a diagonal path? Do you want to check if an object is inside/outside the green triangle? Should the path of the triangle be drawn?

  • Steve Robinsons

    March 18, 2021 at 9:29 am

    Hi Robert,

    I need to draw the triangle path to check if an object is inside/outside the green one.

    I want to know how to establish this diagonal measures into ae js

    Thank you so much!

  • Stephen Dixon

    March 23, 2021 at 12:33 am

    I get the feeling you don’t really understand how AE and expressions work.
    You can use sampleImage() to get the colour of the pixels at a point on the layer, and then check to see if they are green. To check if another layer is completely inside the green area you would find its bounding box and check each corner to see if it was inside.

    https://ae-expressions.docsforadobe.dev/layer-general.html#layer-sampleimage-point-radius-0-5-0-5-posteffect-true-t-time

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