Trying to animate mesh with a gltf animation but getting error: next-dev.js:20 THREE.PropertyBinding: Trying to update node for track: cube.position but it wasn't found

I am trying to animate a mesh with an animation that I created in blender but I keep getting the error in the title along with two others that are the same except they are for cube.quaternion and cube.scale. The animation is just of a cube animating so I thought I would be easily transferable to a box geometry. Here is my code:

    const cube = new THREE.Mesh(
      new THREE.BoxGeometry(5, 5, 5),
      cubeTextures
    )

    scene.add(cube)

    const clock = new THREE.Clock()

    const gltfLoader = new GLTFLoader()
    
    let mixer
    
    gltfLoader.load('cube.glb', (gltf) => {
      mixer = new THREE.AnimationMixer(cube)
      const clip = gltf.animations[0]

      const action = mixer.clipAction(clip)
      mixer.update(clock.getDelta())
      action.loop = THREE.LoopRepeat
      action.play()
    })
1 Like