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.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#4
Hi,
Was the issue solved?
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Changing spline connection in inspector causes splines to revert to defaults lacota 3 6 03-18-2024, 07:55 PM
Last Post: _Aka_
  GO can't fit end of the spline GameDeveloperek4123 3 13 03-04-2024, 11:06 AM
Last Post: _Aka_
  Keeping a fixed spline length jh092 3 16 02-21-2024, 06:25 AM
Last Post: Primrose44
  How could I get position in spline from "From" value in BuildRasterizedPath? Chanon 1 8 02-12-2024, 09:54 PM
Last Post: _Aka_

Forum Jump: