Setting speedRatio to 0 throws error
Hey,
I'm creating a lens in which I want to change animation speed depending on certain dynamic factors.
This code threw an error and I'd question the reasoning behind the error and the error message.
script.animatedObject.speedRatio = playbackSpeed;
If in this case the value of playbackSpeed is 0.0 Lens Studio throws the error:
"14:15:41 setSpeedRatio: can't set speed ratio"
1) I think it should be possible to set the speedRatio to 0. Exactly for cases like this where a Lens Creator dynamically adapts the playback speed
2) The error message is not very descriptive. It says it can't set the ratio but not that it can't set it because of the value that's passed to setSpeedRatio.
Regards
Hi creative prod,
Thanks for reporting this, I agree it's incorrect behavior and I will forward it to the engineering team to take a look.
In the meantime, you can do a workaround like this to get (almost) the same behavior:
This will stop playback speed from hitting 0 and triggering the error, but still keeps it at an extremely small value that is very close to 0.
Thanks,
Jacob