Animation Dont exist Error while Launching [SOLVED]

Hi Guys,
I am new to playcanvas, please correct me if I make any errors.
Imported character animations from mixamo, each animation is separately imported but am getting an error saying: “Trying to play animation ‘Idle’ which doesn’t exist”. I renamed the animation JSON filenames after importing. I have no clue what’s happening with the animation please guide me to fix this issue. Also here am posting a link to the project, please feel free to check it.
Note: The code is taken from the internet.
Thank you.

Hi @Shank and welcome,

The animations in editor seem to preview/play quite fine. The issue is in your code, you need to append the .json extension, since that’s your animations’ full name.

You can easily do so by changing the following method to this:

PlayerAnimationHandler.prototype.setDirection = function (direction) {
    this.direction = direction; + '.json', this.blendTime);

Thanks, Man Appreciate your help. :raised_hands:
Issue Solved.

1 Like