Hi everyone,

If I assign the sine behavior to an object and have a Magnitude of 1, the sine will go all the way to 1, then all the way to -1 and so on.

What would be the best way to force it to go only from 0 to 1?

8 posts
• Page **1** of **1**

If you set the sine behaviour Movement field to "value only", you can then return a value between 0 and 1 in an action using the expression:

(object.sine.value+1)/2

You can then apply that expression to whatever variable you want the sine to be working on.

You can extend that formula to return a value between 0 an N:

N((object.sine.value+1)/2)

(object.sine.value+1)/2

You can then apply that expression to whatever variable you want the sine to be working on.

You can extend that formula to return a value between 0 an N:

N((object.sine.value+1)/2)

**Posts:**3**Reputation:**276

B

4
S

1
You can, but the curve won't be sinusoidal.

Here, you can use google to plot both equations.

https://www.google.ca/?q=y%3Dabs(sin(x))%2C+y%3D(sin(x)%2B1)%2F2#safe=off&q=y%3Dabs(sin(0.5x))%2C+y%3D(sin(x-pi%2F2)%2B1)%2F2

Here, you can use google to plot both equations.

https://www.google.ca/?q=y%3Dabs(sin(x))%2C+y%3D(sin(x)%2B1)%2F2#safe=off&q=y%3Dabs(sin(0.5x))%2C+y%3D(sin(x-pi%2F2)%2B1)%2F2

**Posts:**1,015**Reputation:**20,790

B

76
S

31
G

27
8 posts
• Page **1** of **1**

## Who is online |

Users browsing this forum: No registered users and 24 guests |