-
Help with if / else statement
Ok, I’m just messing around with expressions and just testing some stuff, and am working on simulating gravity.
Then I decided that when my object reached the bottom of the screen, it would go back to the top and stay there. This is what I have, but it doesn’t work.
x = transform.position[0];
y = transform.position[1]; // y is equal to ft or metersm = thisComp.layer(“Null 1”).effect(“mass”)(“Slider”);
g = thisComp.layer(“Null 1”).effect(“gravity”)(“Slider”);yFall = y + m * g;
if ( yFall >= thisComp.height)
{
yFall * 0
} else {
yFall
};[x, yFall]
I was messing with if/else statements earlier last week, but I have to be missing something.
Thanks in advance…
Stephen =]