Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Placing objects on volume
#3
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:
Code:
spline.TFToDistance(tfPosition) / spline.Length

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.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Messages In This Thread
Placing objects on volume - by Anthonyk - 12-31-2018, 02:14 AM
RE: Placing objects on volume - by _Aka_ - 12-31-2018, 10:34 AM
RE: Placing objects on volume - by _Aka_ - 12-31-2018, 11:10 AM
RE: Placing objects on volume - by Anthonyk - 12-31-2018, 02:48 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Set Volume to the Volume Controller at Runtime pako88 2 10 04-08-2024, 03:26 PM
Last Post: _Aka_
Question Volume Spots inter group distance Sacryn 1 3 02-27-2024, 04:08 PM
Last Post: _Aka_
  Line Renderer between two objects on a spline travellinggamedev 1 7 01-13-2024, 10:39 AM
Last Post: _Aka_
  Removing the objects behind an object alms94 6 6 12-06-2023, 09:31 PM
Last Post: _Aka_

Forum Jump: