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
  Debug message when moving over CP not working. funkd 5 248 07-12-2019, 11:15 AM
Last Post: _Aka_
  Spline events not working in IL2CPP build (Android) callen_mrez 6 657 06-04-2019, 09:24 PM
Last Post: _Aka_
  Adding a Control point Not working as espected UsernameHed 1 297 05-19-2019, 01:43 PM
Last Post: _Aka_
  Move SplineController in rhythm of song electricpunch 10 1,065 05-16-2019, 09:02 PM
Last Post: _Aka_

Forum Jump: