llSetKeyframedMotion

From Second Life Wiki
Revision as of 17:23, 28 August 2011 by Falcon Linden (talk | contribs) (Created page with "{{LSL_Function |func=llSetKeyframedAnimation |func_id=? |func_desc=Specify a list of times, positions, and orientations to be followed by an object. The object will be smoothly m…")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Summary

Function: llSetKeyframedAnimation( list keyframes, integer loop, list reserved );

Specify a list of times, positions, and orientations to be followed by an object. The object will be smoothly moved between keyframes by the simulator. Collisions with other nonphysical or keyframed objects will be ignored (no script events will fire and collision processing will not occur).

NOTE: This is a function proposal only. It has not yet been scheduled for development.

• list keyframes Strided keyframe list of the form:
  • float time (measured from time of function call)
  • vector position
  • rotation orientation

Each time value must be at least 0.1s greater than the previous call. Linear and angular velocities will be clamped to limits set by the simulator (values TBD). An empty list will terminate any keyframed animation currently playing.

• integer loop Whether or not the keyframes should be interpreted as a loop. If TRUE, the last keyframe must have the same position and orientation as the first keyframe. If FALSE, the object will be slowed to a stop such that it reaches the final keyframe with zero velocity at the specified time.
• list reserved Reserved for future compatibility. MUST be an empty list.

Caveats

  • This function can only be called on NON-physical objects. In the future it could be extended to support physical objects, but this is more complicated as collisions could prevent the object from reaching its goal positions on time.
  • This function can only be called on the root prim of a linkset.
  • All positions must be within the same simulator region.
All Issues ~ Search JIRA for related Bugs

Examples

Notes

Potential Use Cases:

  • Elevators
  • Moving platforms
  • Trains/Fixed-Track Vehicles
  • Moving doors/walls/gates
  • Windmills and other machines

Deep Notes

Search JIRA for related Issues

Signature

function void llSetKeyframedAnimation( list keyframes, integer loop, list reserved );