Motion Playback #
The basic way to play motions is to give a model a motion file (.vmd). This section explains the basic messages used for motion playback.
Starting Motion Playback #
Send a MOTION_ADD message specifying the motion file (.vmd) you want to play to start playback. (model alias) is the alias name of the target model, and (motion_alias) is the alias to assign to the new motion.
If the model does not exist, the system will output a Warning and take no action.
If a motion with the specified motion alias is already playing, that motion will be overwritten by the new one.
When playback starts, the following MOTION_EVENT_ADD event message is emitted.
When the motion finishes playing, it is automatically removed and a MOTION_EVENT_DELETE message is emitted.
Interrupting Playback #
Use the MOTION_DELETE message to interrupt a motion that is currently playing.
When a motion is interrupted and deleted, a MOTION_EVENT_DELETE message is emitted.
Switching to Another Motion #
Use MOTION_CHANGE to replace a currently playing motion with another motion. After the replacement, the new motion will start playing.
If the replacement succeeds, a MOTION_EVENT_CHANGE is emitted and the new motion will start playing from the beginning.
Rewinding #
Use MOTION_RESET to rewind a motion that is playing and restart it from the beginning.