Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SplineController.AbsolutePosition or SplineController.RelativePosition to WorldPos?
#2
Let me explain:

When you change RelativePosition or AbsolutePosition of a controller, it's TF is changed. The actual position is applied to the transform in the next call to Refresh() then. To get the resulting position immediately after changing the position, use the source spline with RelativePosition, e.g. SplineController.Spline.Interpolate(SplineController.RelativePosition).

Alternatively, add this to CurvyController.cs (currently untested, but should do the trick):

Code:
/// <summary>
/// Applies the current position to the transform
/// </summary>
/// <remarks>Use this to immediately set the transform after changing AbsolutePosition or RelativePosition!</remarks>
public virtual void Apply()
{
      applyPositionAndRotation(mTF);
}

This will be added to 2.0.5
Reply


Messages In This Thread
RE: SplineController.AbsolutePosition or SplineController.RelativePosition to WorldPos? - by Jake - 01-05-2016, 06:28 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Play() does not cause SplineController to produce expected behaviour ConCat 8 1,409 02-08-2026, 11:54 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,474 07-29-2025, 09:15 PM
Last Post: _Aka_
Wink In SplineController OnPositionReachedList Event is missing shimizu 2 1,818 02-07-2022, 12:47 PM
Last Post: shimizu
  best way to rotate, change offset, and inset position of splinecontroller object smackledorf 1 1,736 01-17-2022, 01:39 PM
Last Post: _Aka_

Forum Jump: