I also just remembered I could technically rotate the actor counter clockwise, and increase the rotation value, and that would make it go both ways....
Using your version of the code that would not solve your issue.
The problem is you are using two sine waves (I used a sine and a cosine) and you have made the angle they both operate on equal (I deliberately made them different).
If you change just one of your two '55' values to anything else it will break the deadlock, for example change the first one to 22. Or even just change one of the sines to a cosine, but ideally the idea of an undulating floaty thing is to introduce a sense of randomness rather than a clockwork-like constant pattern, so I'd make one of the sines a cosine and also make the two angles that sin/cos operates on different (make it so that they are not divisible by each other, so 47 and 39.6 rather than 50 and 25 or 22 and 88).
Because the two sine waves are in sync (both running at 55 degrees at second) when the first sine wave is at its peak (1) it is being multiplied by the second sine wave which is also at its peak (1) . . . so the total peak value is 1 (1x1).
When the first sine wave is at the mid point (0) it is being multiplied by the second sine wave which is also at its mid point (0) . . . so the mid point is 0 (0x0).
And when the first sine wave is at its low value (-1) it is being multiplied by the second sine wave which is also at its its low value (-1) . . . . so the low value is 1 !! ((-1)x(-1))=1 . . . so the low value of two in sync sine waves would be the same as the peak value, so values will never drop below 0 (which is why your rotating actor would only rotate one way and then back to 0°, you were only producing positive values) - and the pitch of the sine wave would effectively be doubled too as both the low value and the peak value are 1.
Holy pretzels Socks, what a fine day for science indeed. Yeah I get what your saying. I'll try this out when I get back to it. Thanks for being so helpful.
Comments
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
Using your version of the code that would not solve your issue.
The problem is you are using two sine waves (I used a sine and a cosine) and you have made the angle they both operate on equal (I deliberately made them different).
If you change just one of your two '55' values to anything else it will break the deadlock, for example change the first one to 22. Or even just change one of the sines to a cosine, but ideally the idea of an undulating floaty thing is to introduce a sense of randomness rather than a clockwork-like constant pattern, so I'd make one of the sines a cosine and also make the two angles that sin/cos operates on different (make it so that they are not divisible by each other, so 47 and 39.6 rather than 50 and 25 or 22 and 88).
Yeah, that's basically what we are doing here, modulating a sine wave (with a second sine wave).
Thinking about this . . . .
Because the two sine waves are in sync (both running at 55 degrees at second) when the first sine wave is at its peak (1) it is being multiplied by the second sine wave which is also at its peak (1) . . . so the total peak value is 1 (1x1).
When the first sine wave is at the mid point (0) it is being multiplied by the second sine wave which is also at its mid point (0) . . . so the mid point is 0 (0x0).
And when the first sine wave is at its low value (-1) it is being multiplied by the second sine wave which is also at its its low value (-1) . . . . so the low value is 1 !! ((-1)x(-1))=1 . . . so the low value of two in sync sine waves would be the same as the peak value, so values will never drop below 0 (which is why your rotating actor would only rotate one way and then back to 0°, you were only producing positive values) - and the pitch of the sine wave would effectively be doubled too as both the low value and the peak value are 1.
Hope that makes sense !
What a fine day for science!
Mathtap.com (Android) | Fridgemanager.com (Android) | Breakoutofspace.com (Android)
Holy pretzels Socks, what a fine day for science indeed. Yeah I get what your saying. I'll try this out when I get back to it. Thanks for being so helpful.
I like this thread.