Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Control point rotation
#6
SplineController.RelativePosition gives you the TF on the spline. You then can use Spline.TFToSegment() to get the local F inside a segment.

A more advanced approach would be to use Metadata. Basically you create a Metadata class and override the method that returns the lerped value. You then can add Metadata classes to your CP's and use Spline API to get interpolated values with ease, "error"-handling (like CP's without Metadata attached etc.) included.

See the Metadata example, and examine the metadata class used for the ship's height as well as the custom controller to apply the height. You can adapt that with ease to return a vector3 or quaternion instead of a float.
Reply


Messages In This Thread
Control point rotation - by hoesterey - 03-16-2016, 08:32 PM
RE: Control point rotation - by Jake - 03-18-2016, 08:23 PM
RE: Control point rotation - by hoesterey - 03-20-2016, 10:01 PM
RE: Control point rotation - by Jake - 03-22-2016, 10:03 PM
RE: Control point rotation - by hoesterey - 03-23-2016, 04:46 PM
RE: Control point rotation - by Jake - 03-26-2016, 08:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting Distance from a World Point zorksox 3 5 04-16-2024, 07:30 PM
Last Post: _Aka_
  Get position of all control points for a spline gekido 1 6 03-28-2024, 10:08 PM
Last Post: _Aka_
  Avoiding runtime GC allocations on control point position change Ell223 8 18 02-24-2024, 10:43 AM
Last Post: _Aka_
Exclamation bad rotation aloriza 5 14 11-29-2023, 09:52 AM
Last Post: _Aka_

Forum Jump: