12-31-2018, 11:10 AM
After a deeper look, here is my answer:
The spline.Interpolate method takes as an input a TF. A TF is not equally distributed on a spline. Please read this to learn more about it.
On the other hand, m_VolumeData.InterpolateVolume takes a value between 0 and 1 that is proportional to the length.
This difference beetween the two is already handled by the Volume Spots CG module, so using it will solve your issue. But if you have any reason to not use the Volume Spots module, simply replace the first parameter of your InterpolateVolume call by this:
Also, on a different subject, if you are using Curvy 5.0.0, you will notice a compiler warning telling you that GetRotatedUp is obsolete and will be removed in a future update. Just inline this method in your own script to solve this. By inlining it, you will also benefit from the side effect which is that you can avoid computing the tangent twice.
The spline.Interpolate method takes as an input a TF. A TF is not equally distributed on a spline. Please read this to learn more about it.
On the other hand, m_VolumeData.InterpolateVolume takes a value between 0 and 1 that is proportional to the length.
This difference beetween the two is already handled by the Volume Spots CG module, so using it will solve your issue. But if you have any reason to not use the Volume Spots module, simply replace the first parameter of your InterpolateVolume call by this:
Code:
spline.TFToDistance(tfPosition) / spline.LengthAlso, on a different subject, if you are using Curvy 5.0.0, you will notice a compiler warning telling you that GetRotatedUp is obsolete and will be removed in a future update. Just inline this method in your own script to solve this. By inlining it, you will also benefit from the side effect which is that you can avoid computing the tangent twice.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Please consider leaving a review for Curvy, this helps immensely. Thank you.

