Issues with Skeleton.copyAnimationRange

I can’t get copyAnimationRange to work. Not sure what I’m doing wrong, or if it’s a bug.

Your bone3 has no animation, that’s why copyAnimationRange fails.

  1. How come that is a requirement?

  2. The documentation for copyAnimationRange makes you think it should return false if the operation fails. But in reality it throws an error.

  3. It would be nice if copyAnimationRange would work even if some bones don’t have animation.

  4. If 3) is not possible, perhaps the documentation for copyAnimationRange should be more clear, that all bones need to be animated.

  5. I tried removing bone3 as well as adding a dummy animation and got a new error. (babylon.js:1 Uncaught TypeError: e.copyToArray is not a function).

I don’t know much about animations, unfortunately, maybe @Drigax will know more.

@reimund please do PR to improve the tool. BJS is open source and it is on all of us to make it better :slight_smile:

1 Like