I have a character which is moving on top of tree branches. I am using curvy splines and a spline controller to navigate along the branches. Upon jump what I used to was to set speed to 0, and disable it (I disable it because I couldn't find a way to make the jump happen otherwise. Character always stick to the spline.). When the character lands I get the new spline, use SwitchTo method with the value I get from GetNearestPointTf. Then I enable the controller and set the speed to what it was. After the latest update this is still working and the game goes like nothing happens however I am getting a console error with the following stack trace.
I noticed I shouldn't be calling SwitchTo on a disabled controller. So I tried switching the order (First enable, then SwitchTo). Error disappears however this time GetNearestPointTf always returns wrong number (0 or very close to 0). So character always starts from the start.
Is there something am I missing with the latest update. Or am I doing something totaly wrong. If thats so how would you go about implementing a behavior like I described above.
Thanks
Code:
transform.position assign attempt for 'Player' is not valid. Input position is { NaN, NaN, NaN }.
UnityEngine.Transform:set_position(Vector3)
FluffyUnderware.Curvy.Controllers.CurvyController:InitializedApplyDeltaTime(Single) (at Assets/Packages/Curvy/Controllers/CurvyController.cs:869)
FluffyUnderware.Curvy.Controllers.SplineController:InitializedApplyDeltaTime(Single) (at Assets/Packages/Curvy/Controllers/SplineController.cs:530)
FluffyUnderware.Curvy.Controllers.CurvyController:OnEnable() (at Assets/Packages/Curvy/Controllers/CurvyController.cs:705)
UnityEngine.Behaviour:set_enabled(Behaviour, Boolean)
I noticed I shouldn't be calling SwitchTo on a disabled controller. So I tried switching the order (First enable, then SwitchTo). Error disappears however this time GetNearestPointTf always returns wrong number (0 or very close to 0). So character always starts from the start.
Is there something am I missing with the latest update. Or am I doing something totaly wrong. If thats so how would you go about implementing a behavior like I described above.
Thanks