This is an old revision of the document!


Controllers

Controllers are used to align or move GameObjects to Curvy Splines and Curvy Generator data like extrusion volumes or paths.

The following controllers are shipped with Curvy:

Use the Spline Controller to align or move GameObjects to Curvy Splines.

This controller works with Curvy Generator Paths

This controller works with Curvy Generator Volumes

All controllers share the same base parameters:

Update In

Determines when the controller is updated: Update, LateUpdate or FixedUpdate

Space

Whether to use world space or the object's local space

Use Cache

Whether to use cached values when appropriate or not

VolumeController only

This section defines the lateral starting position :

Cross Range

Defines the range within the cross section the controller uses. The base point (the point '0' refers to) can be altered by using Shift.

Cross Initial Position

Defines the initial position within the defined Cross Range

Cross Clamping

Defines what to do when trying to move over the defined range

This section defines the starting position

Position Mode

Whether the starting position is entered in world unit distance or relative.

For splines, relative position means TF while for paths and volumes it means percentage
Initial Position

The starting position, using the above mode

Move mode

Determines how to move:

  • Relative - using either TF (splines) or percentage (Paths,Volumes)
  • AbsoluteExtrapolate - using (faster) extrapolated distance (splines)
  • AbsolutePrecise - using calculated distance
Speed

The speed, using the above mode, or delta (if animated)

Note that speed changes the movement direction only if it was “0” before!
Clamping

Determines what to do when the source' end is reached:

  • Clamp - controller will stop
  • Loop - controller will start over at the opposite
  • PingPong - controller switches direction
Play automatically

When enabled, the controller will start playing after it's initialization

Adapt on change

Internally, all controllers store the position relative (TF or percentage). So if you dynamically change the length of the source (e.g. by adding Control Points to a spline), the controlled object “warps” to a new position. Enabling this option prevents this by restoring the distance from start when the source changes.

Animate

If enabled, the controller uses the speed value as a delta that will be applied over a period of time using the below options

Animation

The animation curve to apply. X axis reflects the duration (% of Time Scale) while Y axis reflects the delta value to set (Speed %)

Time Scale

The duration in seconds a single animation sequence takes

Single Shot

If enabled, the animation will only play once, then the controller stops

Reset On Stop

If enabled, the controller will reset to it's initial position when the animation sequence ends

Orientation Mode

Determines how set set orientation:

  • None - no rotation is applied
  • Tangent - the tangent (direction) is used
  • Orientation - orientation (Up-Vector) is used
Orientation Axis

Determines the rotation axis to apply the above value to

Damping Direction

Adds a damping to the Tangent/Direction vector

Damping Up

Adds a damping to the Up/Orientation vector

Ignore direction

If enabled, only the forward direction will be considered, even if the object is moving with negative speed. Otherwise the object will switch direction when moving backwards

The below Offset parameters are available only if OrientationMode is set to 'Tangent' or 'Orientation'
Offset Angle

The Angle (-180 to 180) starting from the Up vector, defining the direction to offset

Offset Radius

The distance to offset

Compensate Offset

If enabled, curve distance deviation will be compensated

(Spline Controller only) See events

Lets you preview the movement in the editor!