A AnimContext class was introduced. This context is passed into every node during evaluation/overlay.
It holds non-animVar "global" data passed from the application.
(cherry picked from commit a028d3ba58)
A AnimContext class was introduced. This context is passed into every node during evaluation/overlay.
It holds non-animVar "global" data passed from the application.
interpType defines how the interpolation between two states is performed.
* SnapshotBoth: Stores two snapshots, the previous animation before interpolation begins and the target state at the
interTarget frame. Then during the interpolation period the two snapshots are interpolated to produce smooth motion between them.
* SnapshotPrev: Stores a snapshot of the previous animation before interpolation begins. However the target state is
evaluated dynamically. During the interpolation period the previous snapshot is interpolated with the target pose
to produce smooth motion between them. This mode is useful for interping into a blended animation where the actual
blend factor is not known at the start of the interp or is might change dramatically during the interp.
MyAvatar: refactored updateFromHMDSensorMatrix() a bit by splitting it into several methods, because
it was getting quite large and becoming hard to follow.
* beginStraighteningLean() - can be called when we would like to trigger a re-centering action.
* shouldBeginStraighteningLean() - contains some of the logic to decide if we should begin a re-centering action.
for now it encapulates the capsule check.
* processStraighteningLean() - performs the actual re-centering calculation.
New code was added to MyAvatar::updateFromHMDSensorMatrix() to trigger re-centering when the avatar speed rises
over a threshold.
Secondly the Rig::computeMotionAnimationState() state machine for animGraph added a state change hysteresis
of 100ms. This hysteresis should help smooth over two issues.
1) When the delta position is 0, because the physics timestep was not evaluated.
2) During re-centering due to desired motion, the avatar velocity can fluctuate causing undesired animation state fluctuation.
Now triggers 7 states.
Idle, WalkFwd, WalkBwd, StrafeLeft, StrafeRight, TurnLeft & TurnRight.
As well as variable speed walking to match current velocity.