Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
curvy:documentation:controllers [2016/06/29 16:04] Jakedocumentation:controllers [2018/06/07 12:32] – [Events] _Aka_
Line 25: Line 25:
 Whether to use cached values when appropriate or not Whether to use cached values when appropriate or not
 ====Cross Position==== ====Cross Position====
-//VolumeController only// +//VolumeController only.// This section defines the lateral starting position:
- +
-This section defines the lateral starting position +
-:+
 == Cross Range == == 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 [[.:generator:modules:shapeextrusion#Shift]]. Defines the range within the cross section the controller uses. The base point (the point '0' refers to) can be altered by using [[.:generator:modules:shapeextrusion#Shift]].
Line 53: Line 50:
   * **AbsolutePrecise** - using calculated distance   * **AbsolutePrecise** - using calculated distance
 ==Speed== ==Speed==
-The speed, using the above modeor delta (if animated)+The speed of the controlled objectas long as the Animate property (described belowis false.
 <note important>Note that speed changes the movement direction **only** if it was "0" before!</note> <note important>Note that speed changes the movement direction **only** if it was "0" before!</note>
 ==Clamping== ==Clamping==
-Determines what to do when the source' end is reached:+Determines what to do when the source'end is reached:
   * **Clamp** - controller will stop   * **Clamp** - controller will stop
   * **Loop** - controller will start over at the opposite   * **Loop** - controller will start over at the opposite
Line 66: Line 63:
  
 ==Animate== ==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 +If enabled, the controller position will be defined by the Animation curve bellow.
-==Animation== +
-The animation curve to applyX axis reflects the duration (% of Time Scale) while Y axis reflects the delta value to set (Speed %)+
 ==Time Scale== ==Time Scale==
 The duration in seconds a single animation sequence takes The duration in seconds a single animation sequence takes
 +==Animation==
 +The animation curve to apply. Defines how the controller is moved through time from it's initial position.\\
 +X axis has values between 0 and 1. A value of x means a time in the animation of x * "Time Scale". For example, if "Time Scale" is equal to 3, and a point on the curve has an x of 0.5, then that points reflects the animation at a time of 1.5s.\\
 +On the Y axis, a value of y means that the controller is moved from it's initial position by a distance of y * the absolute value of Speed.
 ==Single Shot== ==Single Shot==
 If enabled, the animation will only play once, then the controller stops If enabled, the animation will only play once, then the controller stops
Line 100: Line 99:
  
 ====Events==== ====Events====
-//(Spline Controller only)// +You can react to certain events by adding a handler to the following [[https://docs.unity3d.com/Manual/UnityEvents.html|UnityEvents]]: 
-See [[.:controllers:events]]+ 
 +==OnInitialized== 
 +//Available for all controllers// 
 + 
 +Called when the controller is initialized. You usually don't need to wait for the controller to initialize before setting its properties. 
 + 
 +==OnControlPointReached== 
 +//Available for SplineController and UITextSplineController only// 
 + 
 +Called when moving over a Control Point 
 +==OnEndReached== 
 +//Available for SplineController and UITextSplineController only// 
 + 
 +Called when the end (or startof the source spline is reached 
 +==OnSwitch== 
 +//Available for SplineController and UITextSplineController only// 
 + 
 +Called when switching between splines. 
 +<note important>When you add an event handler by code, be sure to call BindEvents() afterwards! Please support our [[https://feedback.unity3d.com/suggestions/unityevent-make-unityeventbase-dot-count-public-or-add-a-way-to-determine-if-any-listener-is-set-at-all|request]] to being able to check for event handlers without feeding the GC!</note>
  
 ====Preview==== ====Preview====
 Lets you preview the movement in the editor! Lets you preview the movement in the editor!