Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Working with, around, or against SplineController
#1
Are there guidelines anywhere on how to work with the SplineController? Besides being consistent with the relative/absolute mode, it seems like there are other steps (i.e., update timing) about how to write code that doesn't fight with whatever the SplineController is doing behind the scenes.

For example, I'm trying to apply an ease-in/out curve to the movement using RelativePosition, and the way I'm doing it obviously is fighting with the SplineController's attempts to set the RelativePosition. 

So is there a guide/example somewhere of the right way to augment/extend the splineController?

Or is there a "dumb" version of the SplineController that doesn't try to apply some default settings, so you can fully script the inputs?

Thanks, JJ
Reply
#2
Hi,

There are no proper guidelines defined, but here are some advises if you need to setup your own controller behavior:
  • Avoid modifying CurvyController: inherit from the class instead, and modify whatever aspect you need by overriding the available methods. This will avoid you handling conflicts if CurvyController is modified in an upcoming update.
  • ComputeTargetPositionAndRotation is the method to override if you want to have a custom orientation logic.
  • If you have your own logic to define the controller's position (like the easing you want to implement), you should make sure that the controller doesn't update the position too. You can do this by simply setting the controller speed to 0, or by overriding Advance (and SimulateAdvance if you use the OffsetCompensation feature)
  • The method to override if you want to drastically change the controller's behavior is InitializedApplyDeltaTime.
Did these points answer your question?
Have a nice day.
Please consider leaving a review for Curvy. This will help a lot keeping Curvy relevant in the eyes of the Asset Store algorithm.
Reply
#3
Yep, that's the kind of advice I'm looking for, Thanks!
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  how do I position a splineController on a spline in runtime to an exact position? hawken 8 1,572 01-19-2018, 12:01 PM
Last Post: _Aka_
  Feature request: SplineController.Position as inspector property syscrusher 4 744 01-19-2018, 06:00 AM
Last Post: syscrusher
  SplineController questions PETzz 1 584 08-16-2017, 06:59 PM
Last Post: Jake
  [Question] Going backwards (SplineController) Warow 1 661 11-25-2016, 08:15 PM
Last Post: Jake

Forum Jump: