Our SDK allows comprehensive control over user-generated emotes with features such as trimming animations, pausing/resuming, setting elapsed time, modifying play rates, and looping animations. Note that these features are not automatically networked; you must send the relevant information over your network layer and call the appropriate methods using our "Remote implementation."
Feature list
Quick description
Remove a part of the start of the animation.
Remove a part of the end of the animation.
Or both simultaneously.
Pause the playing of the animation, freezing the avatar in place
Go to a specific point of the animation (in seconds)
Speed at which animation is played. Can be set to negative in order to play the animation backward
Enable or Disable the loop mode of
the Kinetix-Animator
Please note that these features aren't automatically networked. You have to send the information over your network layer, and call the relevant methods via our "Remote implemenation"
Trimming animation
Trimming animation allows you to choose a part of the emote to be played, instead of playing the whole one.
Remove a part of the start of the animation, at the end of the animation or both simultaneously.
Let's say the emote is 10 seconds long and you want to play the animation from '3:00' to '5:00'
using Kinetix;
//Register local player (only use it if player wasn't registered)
KinetixCore.Animation.RegisterLocalPlayerAnimator( /* Arguments */ )
//Play emote from time '3:00' to time '5:00'
AnimationTimeRange timeRange = new AnimationTimeRange(3, 5);
KinetixCore.Animation.PlayAnimationOnLocalPlayer("my-Emote-ID", timeRange);
Example 2:
Let's say the emote is 10 seconds long and you want to play the animation from 3:00 to the end of the animation.
using Kinetix;
//Register local player (only use it if player wasn't registered)
KinetixCore.Animation.RegisterLocalPlayerAnimator( /* Arguments */ );
//Play animation from time '3:00' to the end of the animation
AnimationTimeRange timeRange = new AnimationTimeRange(3);
KinetixCore.Animation.PlayAnimationOnLocalPlayer("my-Emote-ID", timeRange);
Let's say the emote is 10 seconds long and you want to play the animation from '3:00' to '5:00'
using Kinetix;
//Register npc (only use it if your NPC wasn't registered)
string avatarID = KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )
//Play emote from time '3:00' to time '5:00'
AnimationTimeRange timeRange = new AnimationTimeRange(3, 5);
KinetixCore.Animation.PlayAnimationOnAvatar(avatarID, "my-Emote-ID", timeRange);
Example 2:
Let's say the emote is 10 seconds long and you want to play the animation from 3:00 to the end of the animation.
using Kinetix;
//Register npc (only use it if your NPC wasn't registered)
string avatarID = KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )
//Play emote from time '3:00' to time '5:00'
AnimationTimeRange timeRange = new AnimationTimeRange(3, 5);
KinetixCore.Animation.PlayAnimationOnAvatar(avatarID, "my-Emote-ID", timeRange);
Let's say the emote is 10 seconds long and you want to play the animation from '3:00' to '5:00'
using Kinetix;
//Get the remote player's character component
KinetixCharacterComponentRemote KCCRemote = KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )
//Play emote from time '3:00' to time '5:00'
AnimationTimeRange timeRange = new AnimationTimeRange(3, 5);
KCCRemote.PlayAnimation("my-Emote-ID", timeRange);
Example 2:
Let's say the emote is 10 seconds long and you want to play the animation from 3:00 to the end of the animation.
using Kinetix;
//Get the remove player's character component
KinetixCharacterComponentRemote KCCRemote = KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )
//Play emote from time '3:00' to time '5:00'
AnimationTimeRange timeRange = new AnimationTimeRange(3, 5);
KCCRemote.PlayAnimation("my-Emote-ID", timeRange);
Resume / Pause
Resume and pause the playing of an emote, freezing the player avatar.
The SDK will keep its state. (elapsed time, loop mode, play rate, animation timeline, etc...)
If _Paused is true, the SDK will pause the emote.
If _Paused is false, the SDK will resume the playing of the emote.
Example:
using Kinetix;
//Register npc (only use it if your NPC wasn't registered)
string avatarID = KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )
//Pause the Kinetix Animator
KinetixCore.Animation.SetPauseOnAvatar(avatarID, true);
//Resume the Kinetix Animator
KinetixCore.Animation.SetPauseOnAvatar(avatarID, false);
void KCCRemote.SetPause(bool _Paused)
If _Paused is true, the SDK will pause the emote.
If _Paused is false, the SDK will resume the playing of the emote.
Example:
using Kinetix;
//Get the remote player's character component
KinetixCharacterComponentRemote KCCRemote = KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )
//Pause the Kinetix Animator
KCCRemote.SetPause(true);
//Resume the Kinetix Animator
KCCRemote.SetPause(false);
Go to Time (Set Elapsed time)
Enables you to go to a certain time of the sampler.
The elapsed time is expressed in seconds.
using Kinetix;
//Register npc (only use it if your NPC wasn't registered)
string avatarID = KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )
//Set the elapsed time to 10 seconds
KinetixCore.Animation.SetElapsedTimeOnAvatar(avatarID, 10);
void KCCRemote.SetElapsedTime(float _ElapsedTime)
Example:
using Kinetix;
//Get the remote player's character component
KinetixCharacterComponentRemote KCCRemote = KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )
//Set the elapsed time to 10 seconds
KCCRemote.SetElapsedTime(10);
Variable playrate / Play backward
Modify the speed at which frames are read by the SDK.
A negative number will make the SDK play the emote backward.
The SDK depends on the UnityEngine.Time.timeScale
If the playrate is negative before playing an animation. The animation will start from the end.
using Kinetix;
//Register local player (only use it if player wasn't registered)
KinetixCore.Animation.RegisterLocalPlayerAnimator( /* Arguments */ );
//Play the animation two times faster
KinetixCore.Animation.SetPlayRateOnLocalPlayer(2);
//Play backward
KinetixCore.Animation.SetPlayRateOnLocalPlayer(-1);
using Kinetix;
//Register npc (only use it if your NPC wasn't registered)
string avatarID = KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )
//Play the animation two times faster
KinetixCore.Animation.SetPlayRateOnAvatar(avatarID, 2);
//Play backward
KinetixCore.Animation.SetPlayRateOnAvatar(avatarID, -1);
void KCCRemote.SetPlayRate(float _PlayRate)
Example:
using Kinetix;
//Get the remote player's character component
KinetixCharacterComponentRemote KCCRemote = KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )
//Play the animation two times faster
KCCRemote.SetPlayRate(2);
//Play backward
KCCRemote.SetPlayRate(-1);
Loop animation
Enable or disable loop mode for a player.
When loop mode is enabled, the SDK will loop back to the start / end of the animation (depending on the playrate's sign)
using Kinetix;
//Register npc (only use it if your NPC wasn't registered)
string avatarID = KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )
//Enable looping
KinetixCore.Animation.SetLoopAnimationOnAvatar(avatarID, true)
void KCCRemote.SetLoopAnimation(bool _Looping)
Example:
using Kinetix;
//Get the remote player's character component
KinetixCharacterComponentRemote KCCRemote = KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )
//Enable looping
KCCRemote.SetLoopAnimation(true)