Issue with Specific Animation Root in Three.js

Hello, I’m working with Three.js and facing a specific issue with animation targeting. I’m trying to animate a model by referencing a specific root using action = this.mixer.clipAction( e, this.modelContainer.getObjectByName("body_lower") ); . However, I encounter an error when the animation track targets a child node that isn’t a direct descendant of the specified root. The error message is:

Character.ts:238 THREE.PropertyBinding: No target node found for track: leg_lowerR002.scale.

This seems to be happening because the root I provided isn’t the parent of the node being animated. Additionally, this issue is causing problems with the action.fadeOut() method not functioning correctly.

Has anyone encountered this issue before, and could you suggest any modifications to correctly reference the node or restructure the parent-child relationship for the animation to work properly? Any help or guidance would be greatly appreciated!

I think you have to specify a parent that contains all nodes that will be animated by the animation.

You can edit the animationClip in your code to remove tracks you don’t wan’t applied.

https://threejs.org/docs/?q=Animation#api/en/animation/AnimationClip.tracks

https://threejs.org/docs/?q=Animation#api/en/animation/KeyframeTrack

It sounds like you’re trying to implement partial animation, like only applying animation to the legs for instance?

You may want to

let lowerAnimation = fullAnimation.clone();

then iterate through lowerAnimation.tracks and remove the tracks that you don’t want.

The animation track data is pretty malleable.

Thank you very much! Playing around with the animation tracks really solved my issue.

1 Like