Description
Moves the objects animated by a timeline to the given point of the timeline. For every curve of the timeline (see BIS_fnc_timeline_getSimulatedCurves) the function:
- modifies alpha according to the timeline's interpolation mode (see BIS_fnc_timeline_setInterpMode): linear, cubic, ease in/out, hermite, berp, bounce or quintic
- evaluates the curve at the resulting alpha and moves all its simulated objects (BIS_fnc_richCurve_getSimulatedObjects) there with setPosASL
- rotates the objects with setVectorDirAndUp according to the curve's orientation mode (see BIS_fnc_richCurve_setOrientationMode): orientation stored in the keys, looking at the curve's look-at position, or following the direction of movement; the rotation is smoothed over deltaTime
- sets the field of view of simulated cameras (objects of kind "Camera_F") with BIS_fnc_camera_setFOV
In the Eden Editor, it also refreshes the curve's 3D drawing (BIS_fnc_richCurve_edenTick) and, if 3D icons are visible, draws an icon at the current position. Outside of Eden, once the curve reaches a key, the code stored in the key's "Event" variable is executed and the key's "reached" scripted event handler is called; each key does so only once (until the timeline loops).
The function is used internally by BIS_fnc_timeline_tick, which calls it every frame while the timeline is playing and not paused.
Syntax
[timeline, alpha, deltaTime] call BIS_fnc_timeline_simulateCurves
Parameters:
timeline: Object - the timelinealpha: Number - (Optional, default 0) current position of the timeline, normalised to the range 0..1deltaTime: Number - (Optional, default 0) time since the last frame, in seconds; used to smooth the orientation
Returns: Nothing
Examples
Example 1
[myTimeline, 0.5, 0] call BIS_fnc_timeline_simulateCurves; // moves the timeline's objects to the middle of the timeline
See also
BIS_fnc_timeline_tick · BIS_fnc_timeline_play · BIS_fnc_timeline_getSimulatedCurves · BIS_fnc_timeline_setInterpMode · BIS_fnc_richCurve_setOrientationMode