CurvySpline

Reference

General

Interpolation

Defines the curve type: Linear, Bezier, Catmull-Rom or TCB

Restrict To 2D

When enabled, the default SceneView's Move tool is replaced by a 2D version that uses the local X/Y plane. If “Use Tiny 2D Handles” is enabled in the preferences, no tool is shown and you can drag the Control Point gizmos around directly.

Closed

Whether the spline should be closed, i.e. the last Control Point should form a segment to the first Control Point.

Auto End Tangents

(Open Catmull/TCB splines only)

When enabled, the very first/last Control Points are automatically calculated using spline direction.

Orientation

Determines how to calculate orientation:

  • None - No orientation at all
  • Static - use Control Point transform rotation
  • Dynamic - calculate a least angle, smooth orientation

Dynamic Orientation

In this mode a direction vector is smoothly transported between two orientation anchors with the least possible angle angle difference. To control the flow, you can enable the Orientation Anchor option at certain Control Points. Note that the first Control Point is automatically defined as an orientation anchor.

Global Bezier Options

(Bezier Curves only)

Default Distance %

Determines the default Bezier Handle length when using Auto Handles

Global TCB Options

(TCB curves only)

Tension

Determines global tension used by Control Points

Continuity

Determines global continuity used by Control Points

Bias

Determines global bias used by Control Points

Set Catmull/Cubic/Linear

Presets TCB parameters to “mimic” a certain curve type

Advanced Settings

Show Gizmos

Whether to show the spline in the SceneView or not

Color

Color used to draw the spline. Default value can be defined in the Editor Preferences

Active Color

Color used to draw the spline if selected. Default value can be defined in the Editor Preferences

Cache Density

Determines the cache density. See Caching for details about caching.

Use Pooling

If enabled, Control Points are disabled when deleting and reused when created instead of destroying and creating them. This prevents framerate glitches when adding and removing a lot of CP's at runtime. Pooled GameObjects are stored (invisible) by the _CurvyGlobal_ object.

Use Threading

If enabled, certain cache values are calculated simultaneous in multiple threads. Threads in general have a processing overhead, so this makes sense for splines with high Cache Point count only.

Check Transform

If enabled, all Control Point's transforms will be checked for changes each frame. Enable if you animate transforms or change them by code directly.

Check Update

Determine when the spline updates itself!

Events

You can react to certain spline related events by adding a handler to the following UnityEvents:

OnRefresh

CurvySplineEventArgs

Called each time after the spline has refreshed

OnAfterControlPointChanges

CurvySplineEventArgs

Called after one or more ControlPoints were added or deleted

OnBeforeControlPointAdd

CurvyControlPointEventArgs, Cancelable

Called before a Control Point is about to be added. Cancel this event to prohibit adding a CP

OnAfterControlPointAdd

CurvyControlPointEventArgs

Called after a Control Point is added

OnBeforeControlPointDelete

CurvyControlPointEventArgs, Cancelable

Called before a Control Point is about to be deleted. Cancel this event to prohibit deleting a CP

OnMoveControlPointReached

CurvySplineMoveEventArgs, Cancelable

Called by API methods that move along a spline when passing a Control Point

When you dynamically add an eventhandler for this event by code, be sure to use OnMoveControlPointReached.AddListenerOnce()

OnMoveEndReached

CurvySplineMoveEventArgs, Cancelable

Called by API methods that move along a spline when the end of the spline is reached

When you dynamically add an eventhandler for this event by code, be sure to use OnMoveEndReached.AddListenerOnce()

Discussion

Enter your comment:
S W D X I
 
Last modified: 2016/01/12 20:32 by Jake