Playback options

Previous section < Simple setup & testing

Next section > Main Controllers

Supported options

Playback options were added in version 2.1 of the MvtPlayer. They are used to alter, to some extent, the playback of the sequence at the very moment it is starting. Currently three options are supported. More could be added in the future if there is some demand and technical feasibility.

Scale

Scaling in this context means that by setting this option you will alter the size of the motion scale by a given factor. It affects both smooth movement (keyframed motion) and immediate movement. The normal (default) value is 1, which means the sequence is played back without alterations in size or direction (just as it was recorded).

  • Values larger than 1.0 will enlarge the movement (2=twice as big, etc.)

  • Values between 0.0 and 1.0 will reduce the motion size (0.5=half size, etc.)

  • Negative values will reverse (go in the opposite direction, as in a mirror) the motion, maybe with size alterations : -1=reverse direction without rescaling, -2=reverse direction and twice as large as in the recording, etc.

It is worth noting that:

  • the MvtPlayer cannot guarantee that the resulting (computed) new motion is doable at all: if you try to multiply all sizes by 1000000 I can predict the sim will not agree ! Similarly too small movements may not work at all. This is beyond MvtPlayer's control.

  • For a smooth movement, the time devoted to the motion step is not changed either, resulting effectively in a speed change: if you want to travel 2 meters instead of 1 meter in 1 second you will effectively have to go twice as fast... And as before it is possible that motions too fast cause problems with the sim.

Speed

Similarly, speed can be acted on at playback time by setting this option. This affects both smooth movement (keyframed motion) and pauses. The normal (default) value is 1, which means the times set during the recording will be obeyed without change.

  • Values larger than 1.0 will speed things (reduce the time for smooth motions and pauses): 2=twice as fast (half much time) ...

  • Values between smaller than 1.0 will slow things (increase the time for smooth motions and pauses): 0.5=half as fast (twice the duration)...

  • Negative values are NOT supported.

Again, beware of unreasonable values. Values resulting in a motion that is too fast will cause an unpredictable error from the keyframed-motion engine.

Volume

Normally sounds played in a "sound step" are played at full volume (which is 1.0). You can change this with the volume playback option, by setting it to a value between 0.0 and 1.0:

  • 1.0 is full volume

  • 0.0 is mute (sounds cannot be heard at all)

  • 0.5 if half volume, 0.33 one third, etc.

Of course, remember that in SL sound volume is affected by the distance between the viewer and the sound source, and of course it also depends on the intrinsic volume of the sound as imported into SL.

Accessing playback options

It is the controller script's responsibility to define the playback options when it starts the sequence. Of course this controller script can allow you to set them through a menu or any other means. Please refer to the MVTP_GeneralController script for an example about this.

Required technical details are available on the Scripting reference page.