Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Switching splines and directions
#1
Question 
I'm building a network of linear splines that are using connections to tie the splines together.

At connection points, the user can choose to go left or right or straight ahead if possible.

I have this working reliably when the current spline, and the spline switched to, is going in the same direction.

If the SplineController is moving at a negative speed (i.e. going backwards on the spline) and switches to a spline where it needs to go forward, an OnControlPointReached event for the first control point of the new spline is immediately raised and the new spline is not followed.

If the SC is going forwards and switches to a spline going forward, or backwards to backwards, no event is raised and the spline correctly follows the new spline.

I am unsure if I am doing something wrong here, or if this behaviour is simply not supported out of the box?

Best regards
Christian
Reply
#2
Tongue 
I shot myself in the foot!

In my quest to understand Curvy splines and controllers, I had created a tangled mess of spaghetti code that had the unfortunate side effect of manipulating the speed parameter of the SplineController in question.

Removing that offensive line of code fixed my problem Blush
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Combine splines of different interpolation for use in generator leeharris 3 317 02-28-2021, 07:27 AM
Last Post: _Aka_
  Closest Spline & control points loop in both directions nehvaleem 13 1,245 02-02-2021, 11:45 AM
Last Post: _Aka_
  Frequent runtime updates of Curvy Generator for simulating plant growth using Splines h4ck3rd4wg 6 1,281 10-02-2020, 07:57 PM
Last Post: _Aka_
  Creating splines at run time jamesunity 6 1,875 07-17-2020, 10:17 PM
Last Post: jamesunity

Forum Jump: