"Cannot read properties of undefined (reading 'reset')" while using new animation.glb file

Original Discord Post by sofiafc | 2024-10-17 20:57:08

Hello, I’m building a demo using RPM-Lipsync repo, preserving the original components and adding components upon. I used the file Anita.jsx and changed both model and animation successfuly.

Now I’m trying to change, again, the animations of my character. I want to set it to the “Neutral Idle” animation from mixamo and I want it to be continuous (on repeat), and don’t want to switch between animations, but when I do the same process (replacing the file name) I get the following error:

Cannot read properties of undefined (reading 'reset')
TypeError: Cannot read properties of undefined (reading 'reset')
    at http://localhost:3000/main.7200cdca45ab34e4729c.hot-update.js:61:24
    at commitHookEffectListMount (http://localhost:3000/static/js/bundle.js:355872:30)
    at commitPassiveMountOnFiber (http://localhost:3000/static/js/bundle.js:357435:17)
    at commitPassiveMountEffects_complete (http://localhost:3000/static/js/bundle.js:357406:13)
    at commitPassiveMountEffects_begin (http://localhost:3000/static/js/bundle.js:357396:11)
    at commitPassiveMountEffects (http://localhost:3000/static/js/bundle.js:357386:7)
    at flushPassiveEffectsImpl (http://localhost:3000/static/js/bundle.js:359679:7)
    at flushPassiveEffects (http://localhost:3000/static/js/bundle.js:359639:18)
    at commitRootImpl (http://localhost:3000/static/js/bundle.js:359598:9)
    at commitRoot (http://localhost:3000/static/js/bundle.js:359398:9)

From this useEffect:

useEffect(() => {
        actions[animation]
            .reset()
            .fadeIn(mixer.stats.actions.inUse === 0 ? 0 : 0.5)
            .play();
        return () => actions[animation].fadeOut(0.5);
    }, [animation]);

Any idea of what I may be missing?
Thanks in advance :+1:

Reply by k3kalinix | 2024-10-18 07:53:32

<@368669084952428554>

Reply by saurav0037 | 2024-10-21 10:18:28

<@1063549978582188154> add a ? here actions[animation]?.fadeOut(0.5);

This conversation happened on the Convai Discord Server, so this post will be closed.