Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Coming back on spline issue
#1
Hi, it's me again with another question.

Currently I'm trying to pause my controller so the gameobject can move freely on my navmesh and after a while, my controller decide to get back on the spline.

So here what I do:

- Follow spline
- Decide to move freely 
                    -> SplineController.Pause();                    
- Move freely until feeling coming back on spline 
                    -> Find nearest CurvySegment
                    -> Use NavMeshAgent
- When reaching the CurvySegement 
                    -> SplineController.AbsolutePosition = SplineController.Spline.GetNearestPointTF(curvySegment.position); 
                    -> SplineController.Play();

But everytime when, the controller's position is set at 0TF.
Reply
#2
Well I found the solution, modify InitialPosition instead of AbsolutePosition

Or not, It was just that the point selected to coming back was the same where it left the spline, so InitialPosition doesn't work.
Reply
#3
Hi,
I am right now on vacation, for two weeks. I have some guesses about the issue, but without access to a proper development environment, I can't test them. I hope the guesses will be helpful:

Maybe something overwrites the position's value to it's paused value when you call Play. Try calling play then setting the absolute position, and not the other way.
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply
#4
Hi,
Was the issue solved?
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Is there a way to get the position of each ControlPoint in spline by API? Chanon 1 145 06-07-2025, 09:44 AM
Last Post: _Aka_
  Filling a closed spline dynamically rickgplus 1 368 04-16-2025, 08:56 AM
Last Post: _Aka_
  Disable a spline's gizmo when not selected or disabled. mikechr2000 1 358 02-03-2025, 09:34 AM
Last Post: _Aka_
Information Questions regarding spline colliders and collisions with rigidbodies Spyboticer 7 1,349 01-20-2025, 12:25 PM
Last Post: _Aka_

Forum Jump: