03-15-2018, 01:24 PM
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.
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.