Unity provides standard spline asset,
use BGCurve only if Unity spline misses some feature
TRS [Component]
Description
This component allows you to translate, rotate and scale some object. This component has all the basic functions of other 5 components (Cursor+CursorLerp+MoveByCursor+TranslateByCursor+ScaleByCursor)
Parameters
objectToManipulate
Object to move/rotate/scale
distance
Distance in standard Unity units along the spline. if distance overflows spline's length (<0 or > totalDistance), it will be clamped.
distanceRatio
Normalized distance [Range(0,1)]. 0- start of the spline, 1- end.
useFixedUpdate
Use Unity's FixedUpdate instead of Update callback to move the cursor
cursorChangeMode
How cursor position should be updated. 1) Constant- move cursor with constant speed (speed parameter is used) 2) LinearField- speed value for each section is stored in float point field 3) LinearFieldInterpolate- like LinearField, but the final speed value is interpolation (based on distance) between 2 points values
speedField
Custom field to get values for speed (for LinearField and LinearFieldInterpolate modes). It should be a float field.
speed
Speed for moving cursor. Final speed is determined as speed*Time.deltaTime. This parameter is active only for 'Constant' cursor change mode.
overflowControl
Action, taken then cursor overflows spline's length. Cycle - cursor moves to opposite end and start moving with the same speed. PingPong - speed changes to opposite and cursor starts moving back with the same speed. Stop - speed is set to zero.
moveObject
Should object be moved or not. True by default.
rotateObject
Should object be rotated or not. False by default.
offsetAngle
Constant euler angles to be added to final rotation.
rotationField
Custom rotation point field to be used instead of tangent. It should be a Quaternion field.
rotationInterpolation
Rotation interpolation (between current rotation and tangent rotation). By lowering this parameter you will make rotation slower. Lerp - Linear. Slerp - Spherical linear.
lerpSpeed
speed for Lerp interpolation. Final interpolation is calculated as Quaternion.Lerp(from,to, lerpSpeed * Time.deltaTime)
slerpSpeed
speed for Slerp interpolation. Final interpolation is calculated as Quaternion.Slerp(from,to, slerpSpeed * Time.deltaTime)
scaleObject
Should object be scaled or not. False by default.
scaleField
Custom field to take values from. It should be of type Vector3.
showHandles
This component supports handles in Scene View. Enable this flag to show handles. Handles are not interactive.