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'
usingKinetix;//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 =newAnimationTimeRange(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.
usingKinetix;//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 animationAnimationTimeRange timeRange =newAnimationTimeRange(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'
usingKinetix;//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 =newAnimationTimeRange(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.
usingKinetix;//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 =newAnimationTimeRange(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'
usingKinetix;//Get the remote player's character componentKinetixCharacterComponentRemote KCCRemote =KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )//Play emote from time '3:00' to time '5:00'AnimationTimeRange timeRange =newAnimationTimeRange(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.
usingKinetix;//Get the remove player's character componentKinetixCharacterComponentRemote KCCRemote =KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )//Play emote from time '3:00' to time '5:00'AnimationTimeRange timeRange =newAnimationTimeRange(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:
usingKinetix;//Register npc (only use it if your NPC wasn't registered)string avatarID =KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )//Pause the Kinetix AnimatorKinetixCore.Animation.SetPauseOnAvatar(avatarID,true);//Resume the Kinetix AnimatorKinetixCore.Animation.SetPauseOnAvatar(avatarID,false);
voidKCCRemote.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:
usingKinetix;//Get the remote player's character componentKinetixCharacterComponentRemote KCCRemote =KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )//Pause the Kinetix AnimatorKCCRemote.SetPause(true);//Resume the Kinetix AnimatorKCCRemote.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.
usingKinetix;//Register npc (only use it if your NPC wasn't registered)string avatarID =KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )//Set the elapsed time to 10 secondsKinetixCore.Animation.SetElapsedTimeOnAvatar(avatarID,10);
voidKCCRemote.SetElapsedTime(float _ElapsedTime)
Example:
usingKinetix;//Get the remote player's character componentKinetixCharacterComponentRemote KCCRemote =KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )//Set the elapsed time to 10 secondsKCCRemote.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.
usingKinetix;//Register local player (only use it if player wasn't registered)KinetixCore.Animation.RegisterLocalPlayerAnimator( /* Arguments */ );//Play the animation two times fasterKinetixCore.Animation.SetPlayRateOnLocalPlayer(2);//Play backwardKinetixCore.Animation.SetPlayRateOnLocalPlayer(-1);
usingKinetix;//Register npc (only use it if your NPC wasn't registered)string avatarID =KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )//Play the animation two times fasterKinetixCore.Animation.SetPlayRateOnAvatar(avatarID,2);//Play backwardKinetixCore.Animation.SetPlayRateOnAvatar(avatarID,-1);
voidKCCRemote.SetPlayRate(float _PlayRate)
Example:
usingKinetix;//Get the remote player's character componentKinetixCharacterComponentRemote KCCRemote =KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )//Play the animation two times fasterKCCRemote.SetPlayRate(2);//Play backwardKCCRemote.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)
usingKinetix;//Register npc (only use it if your NPC wasn't registered)string avatarID =KinetixCore.Animation.RegisterAvatarAnimator( /* Arguments */ )//Enable loopingKinetixCore.Animation.SetLoopAnimationOnAvatar(avatarID,true)
voidKCCRemote.SetLoopAnimation(bool _Looping)
Example:
usingKinetix;//Get the remote player's character componentKinetixCharacterComponentRemote KCCRemote =KinetixCore.Network.GetRemoteKCC( "MyPlayerID" )//Enable loopingKCCRemote.SetLoopAnimation(true)