Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some Questions about useful function I need
#3
Thanks you for your reply ! I have 2 more question Wink

5 )I just saw you didn't undestand my first question, I will try to reiterate:

I have a float _percent, between 0 and 1.
How can I get a Vector3 position ? (without SplineController, I have just an CurvySpline):

Code:
Vector3 posByPercent = _splineCurvyPlayer.GetWorldPosByPercent(_percent);

Same with rotation, I would like to get the rotation who follow the spline, like that:
Code:
Quaternion rotationForward = _splineCurvyPlayer.GetWorldRotationByPercent(_percent);

6 ) It's less a suggestion this one. With GetNearestPointTF, we can have the float, based on the local Position:
Code:
float nearest = _splineCurvyPlayer.GetNearestPointTF(pos, out closestPosition);

But if pos is not a local position, we have to convert it like that: (not tested):
Code:
Vector3 posRelative = _splineCurvyPlayer.transform.InverseTransformPoint(pos);

float nearest = _splineCurvyPlayer.GetNearestPointTF(posRelative , out closestPosition);

It would be good if we could pass a bool local = true at the function GetNearestPointTF Wink


Thanks you for your amazingn support Smile
Reply


Messages In This Thread
RE: Some Questions about useful function I need - by UsernameHed - 05-03-2019, 02:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Does Curvy has gameobjects pooling system function? Chanon 7 13 09-07-2023, 12:43 PM
Last Post: _Aka_
  Scene 51 questions lukasynthetic 3 12 06-22-2022, 04:12 AM
Last Post: _Aka_
  Conform function, but applied to different directions at the same time Hartigan27 1 11 02-19-2022, 05:09 PM
Last Post: _Aka_
  Spline editing questions giollord 5 150 12-04-2021, 02:24 PM
Last Post: _Aka_

Forum Jump: