Skip to content

API Reference

BasicCrunchyRollAnimPlayer


.CreateAnimator

Constructs an AnimPlayer.

BasicCrunchyRollAnimPlayer.CreateAnimator(
    rig: Crunchyroll.Rig,
    motor6Ds: {Motor6D}?
) -> AnimPlayer

AnimPlayer


Properties

Rig [ Rig ]

The crunchyroll rig that is being used.


LimbCFrames [ {[string]: CFrame} ]

Equal to rig.result_coordinate_frames. The CFrames are in world space.


PlayingAnims [ {[AnimationAsset]: AnimationPlayData} ]

The list of currently playing animations. Imagine it as Animator:GetPlayingAnimationTracks(). Not meant to be written into.


Methods

:GetLimbWorldCFrames(rootCF: CFrame)

Returns self.LimbCFrames.


:UpdateLiveLimbCFrames(rootCF: CFrame)

Uses the passed Motor6Ds to update the .C1 of every limb to the current AnimPlayer.LimbCFrames.

rootCF should be the HumanoidRootPart.CFrame.


:StepForward(dt: number, rootCF: CFrame, updateLiveToo: boolean?)

Steps forward every animation by dt. Stops every animation when its done, unless .Looped is true.


:SetLimbCFramesInstantly(newLimbWorldCFrames: {[string]: CFrame}, rootCF: CFrame, updateLiveToo: boolean)

Immediately sets self.LimbCFrames to the provided newLimbWorldCFrames table, and optionally also updates Motor6D.C1s if updateLiveToo is true.


:StartPlayingAnimation(animAsset: AnimationAsset, playData: AnimationPlayData

Begins playing an animation by inserting it in self.PlayingAnims.

animAsset can be retrieved by calling crunchyroll.load_keyframe_sequence(keyframe_sequence)


:StopPlayingAnimation(animAsset: AnimationAsset)

Immediately stops playing an animation by removing it from self.PlayingAnims.