✅ Sin wave function cannot be converted to radians NaN encountered
Hey there, I’m trying to build a real time sin wave visualization, I’ve got it working with x / y positions, but when I try to apply the formula to the rotation property, it has to be first converted to radians as rive automatically assumes data bound inputs are radians and converts to degrees.
When i dump my formula into a conversion group to convert to radians I get NaN, I’ve tried several different methods but no success here. Is this a bug or am I doing something incorrect.?
Here is the formula I’m working with (most numbers are pulled in from View model properties to allow for more control over the sin wave)
The TimeOscRotation, is a rotation value being read from a “dummy layer” rotating 0 > 360 degrees over 2 secs on a loop, this powers the wave.
{{View Model 1/Amp}}*sin((({{View Model 1/TimeOscRotation}}*{{View Model 1/Speed}})+(({{View Model 1/BoneIndex_0}}/({{View Model 1/Num_Bones}}-1.0))*360.0*{{View Model 1/Freq}})))Amp = 45
Speed = 1
BoneIndex_0 = 0
Num_Bones = 5
Freq = 1