Skip to main content
S_ A
Inspiring
September 26, 2024
Answered

Math sin expression problem-2

  • September 26, 2024
  • 1 reply
  • 477 views

Hi,

 

I need some guidance from seniors here. If my AE comp height 1080, That means my Y axis limit is from 0 t0 1080. Right? that means My Sin wave's crest/peek will touch only two borders/egdes up and down where in Y axis down is 0 pixel and up is 1080. Then why the sin wave crossing the top/up edge here?? I already told the AE that value is 1080 in expression. then why its not listeing to the expression? When I specify the value in 'Expression' , the property that is linked to the expression must listen to that right? Please help me.

 

Square's Y position must stay between 0 and 1080, I mean it must only oscillate in between 0 and 1080, nowhere I said go beyong that. then why its going?

 

 

 

This topic has been closed for replies.
Correct answer Airweb_AE

The value of sine oscillates between 1 and -1, so there is a difference of 2.

If you want a range of 1080, you need to oscillate between 540 and -540,

so something like:

 

Math.sin(time) * 540 + value

 

 

1 reply

Airweb_AECorrect answer
Legend
September 26, 2024

The value of sine oscillates between 1 and -1, so there is a difference of 2.

If you want a range of 1080, you need to oscillate between 540 and -540,

so something like:

 

Math.sin(time) * 540 + value

 

 

S_ A
S_ AAuthor
Inspiring
September 26, 2024

😮 😮 😮 You are so right. Thank you so much.