10-20-2014, 11:55 PM
This isn't so much a bug report as it is a "thing that could be more obvious" report.
I installed Curvy, created a spline, and hooked it up to a custom spline walker class (I had written a spline traversal class a while back for a different spline system; I adapted that class to traverse Curvy splines). Hit play, and... no traversal. Just stuck at TF=0 forever. I was using MoveBy with a (valid) distance parameter and it was returning the exact same TF I passed in, every time. Google told me nobody else had ever had this problem, which was mystifying because of how straightforward the use case seemed to be.
I dug around for a couple hours, including stepping my way through a bunch of Curvy's own code, before finally realizing the problem: I was inadvertently passing MoveBy a direction value of zero. Changing it to 1 fixed the issue immediately.
Curious, I tried a few other "wrong" values for direction. Directions greater than 1 didn't seem to have any effect, until I tried a direction of 200, at which point the traversal behaved erratically. I'd have expected higher direction values to either get clamped to 1, or scale the traversal amount; the actual result was just weirdly inconsistent.
Anyway.
Like I said, maybe not a bug per se but it seems like it'd be super useful if MoveBy (and other functions that take a direction) threw an error if the direction value isn't exactly -1 or 1, since other values really make no sense here and seem to do unpredictable things. It's an easy fix once you know what's failing, but right now it's not necessarily obvious what's failing in the first place.
I installed Curvy, created a spline, and hooked it up to a custom spline walker class (I had written a spline traversal class a while back for a different spline system; I adapted that class to traverse Curvy splines). Hit play, and... no traversal. Just stuck at TF=0 forever. I was using MoveBy with a (valid) distance parameter and it was returning the exact same TF I passed in, every time. Google told me nobody else had ever had this problem, which was mystifying because of how straightforward the use case seemed to be.
I dug around for a couple hours, including stepping my way through a bunch of Curvy's own code, before finally realizing the problem: I was inadvertently passing MoveBy a direction value of zero. Changing it to 1 fixed the issue immediately.
Curious, I tried a few other "wrong" values for direction. Directions greater than 1 didn't seem to have any effect, until I tried a direction of 200, at which point the traversal behaved erratically. I'd have expected higher direction values to either get clamped to 1, or scale the traversal amount; the actual result was just weirdly inconsistent.
Anyway.
Like I said, maybe not a bug per se but it seems like it'd be super useful if MoveBy (and other functions that take a direction) threw an error if the direction value isn't exactly -1 or 1, since other values really make no sense here and seem to do unpredictable things. It's an easy fix once you know what's failing, but right now it's not necessarily obvious what's failing in the first place.