Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented Apr 11, 2017

Description:

Fix all hand animations to work. Including cross-fade gestures.

Changes proposed:

  • Change .animateGesture to pass in current and last gesture. If there was a gesture and now there is no gesture, then configure .playAnimation to reverse the last gesture (.playAnimation('fist', 'fist', true)). If we're going from gesture to gesture then it'd pass in .playAnimation('fist', 'pointing', false).
  • Fix .playAnimation to play the animation in reverse by setting clipAction.loop = THREE.PingPong and setting clipAction.repetitions to 0.
  • Crossfade from gesture-to-gesture without returning to the default pose. TODO. Currently, the mixer will stop all current clip actions which restores to open pose an then it'll go to the next clip. Need to crossfade it smoothly. UPDATE: I was able to crossfade smoothly by stopping all action, setting a low weight on the previous gesture, playing both previous/current clip action, then calling clip actipn's crossFadeTo.

Clean ups:

  • Remove the animation mappings which was causing another layer of indirection of strings to strings. Just refer to the model's animation strings.
  • Move model URLs into an object keyed by hand, removes LOC from update()
  • Add more comments
  • Move some stuff from a method to a function that doesn't need to be a method
@ngokevin
Copy link
Member Author

Now ready for review. All gestures now animation.

Few magic numbers in there, but I can make variables for those.

@dmarcos dmarcos merged commit 73a98c3 into aframevr:master Apr 12, 2017
@ngokevin ngokevin changed the title [WIP] fix hand controls blend character animations (fixes #2445) Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants