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 helps immensely. Thank you.
Available for freelance work—feel free to reach out.
Reply
#3
Yep, that's the kind of advice I'm looking for, Thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Bug Issues when working with in-place prefabs Sacryn 4 7 02-27-2024, 04:08 PM
Last Post: _Aka_
Photo Position in Input Spots not working on all directions. Mike Danielsson 2 11 09-03-2022, 02:22 PM
Last Post: Mike Danielsson
Wink In SplineController OnPositionReachedList Event is missing shimizu 2 14 02-07-2022, 12:47 PM
Last Post: shimizu
  best way to rotate, change offset, and inset position of splinecontroller object smackledorf 1 27 01-17-2022, 01:39 PM
Last Post: _Aka_

Forum Jump: