Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
DynamicSpline and SplinePathCloneBuilder
#1
I'm creating a dynamic spline based on the the DynamicSpline example and have attached a SplineWalkerDistance and attached a camera to it. I also have a mesh builder to generate the body of the spline.

My approach for creating the infinte spline is almost the same as the example except I wait until the 5th Control Point before I start deleting the first spline (I did this to avoid any curveture changes right infront of the camera due to the removal of a segment behind it).

Now everything is great and the inflnite spline works perfectly. So why am I posting this? 

The issue I have is that if use SplinePathCloneBuild to generate a couple of objects on the path, the objects get generated fine, however, the objects start jumping from one location on the spline to the other.

I have went through the code and I think the issue is that CloneBuild Script uses the tf to place the objects, however, since I'm removing a segment the location of the object changes since the tf generated for it now points to another location. Right?

I tried using SplineAlign, but that also had issues, and I assume due to the same cause.

Now I understand the code well enough to know the issue, however, I'm at loss on how to tackle this effeciently.

Let me know if you have any suggestions or tips on how to solve this.

Thanks
Hesham

 
 
Reply
#2
Well, the simplest solution is to convert TF or Distance to a Segment and LocalF. That's how it's solved in the AlignToSpline and FollowSpline component shipping with 1.6 (currently in beta). However, the SplinePathCloneBuilder replacement did not make it into this version, but you can use Align2Spline for this purpose.

I'll PM you about the beta.

Jake
Reply


Forum Jump: