Skip to content
Discussion options

You must be logged in to vote

im not sure if this is correct. useAnimation is an abstraction to cast clips into actions, it needs a root (2nd arg) or else the clips aren't valid, see: https://github.com/pmndrs/drei#useanimations

  const { scene, animations } = useGLTF("/psyko.glb")
  const { actions } = useAnimations(animations, scene)

  useEffect(() => {
    //if (clips[0]) {
      //console.log(actions)
      actions["Armature|Armature|Psyko_Armature|Armature|Psyko_Armature"].play()
      //actions["dance"] = mixer.clipAction(clips[0])
      //actions["dance"].play()
    //}
  }, [actions])

the file only contains one clip named "Armature|Armature|Psyko_Armature|Armature|Psyko_Armature" and it plays. it looks to me …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mwmwmw
Comment options

Answer selected by mwmwmw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants