Activity › Forums › Adobe After Effects Expressions › if/else Diagonal
-
if/else Diagonal
Posted by Steve Robinsons on March 14, 2021 at 10:27 amStephen Dixon replied 5 years, 1 month ago 4 Members · 5 Replies -
5 Replies
-
Steve Robinsons
March 15, 2021 at 7:49 amHi 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 pmHi 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 amHi 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 amI 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.
Reply to this Discussion! Login or Sign Up