- Divided the option "Avatar leaning behavior" into two options that work more usefully: "Allow my avatar to stand" and "Allow my avatar to lean" (PreferencesDialog.cpp). Made the necessary fixes so that the avatar can be set to stand only when the user is standing (more details below).
- The logic controlling the direction of MyAvatar's action motor is now centralised in calculateScaledDirection (was previously split between there and updateMotors). calculateScaledDirection now returns a velocity in world space.
- CharacterController::FollowHelper now uses separate follow timers for rotation, horizontal and vertical (previously followed all three based on the longest of their follow times). Where appropriate, FollowHelper can now snap immediately to the desired rotation/horizontal/vertical independently (see FOLLOW_TIME_IMMEDIATE_SNAP).
- FollowHelper::FollowType has therefore moved to CharacterController::FollowType.
- MyAvatar::FollowHelper::postPhysicsUpdate: If MyAvatar is not allowed to stand when the user is sitting, this now avoids recentring the body based on the head height.
- Removed Q_PROPERTY(MyAvatar::SitStandModelType, as the sitting/standing/leaning model uses different enums now (see setAllowAvatarStandingPreference, setAllowAvatarLeaningPreference).
- Removed Q_PROPERTY(bool isSitStandStateLocked which is no longer used, because we now always track the user's real-world sit/stand state, regardless of what we're doing with it.
- MyAvatar::FollowHelper::shouldActivateHorizontal: If MyAvatar is not allowed to lean, this now returns true to recentre the footing if the head is outside the base of support.
- MyAvatar::FollowHelper::shouldActivateHorizontalCG: If MyAvatar is not allowed to lean, this now always returns true to recentre the footing. Rearranged to avoid computing values that weren't used depending on the conditions. Resolved some duplicated code.
- MyAvatar::setUserRecenterModel previously set HMDLeanRecenterEnabled based on the chosen mode, but it got reset when getting out of a sit. Now HMDLeanRecenterEnabled is only controlled by the scripts.
- Added Rig::getUnscaledHipsHeight (like getUnscaledEyeHeight). Refactored a little to avoid duplicated code. Added DEFAULT_AVATAR_HIPS_HEIGHT which is the value that Rig::getUnscaledHipsHeight returns when using the default avatar.
- Fix for recentring not behaving as requested by the user after getting up from click-to-sit (always behaving like 'Auto') : MyAvatar::endSit now passes false to centerBody for 'forceFollowYPos'.
- Fix for incorrect vertical position of the avatar and viewpoint after changing lean recentre mode while not standing in the real world: MyAvatar::setAllowAvatarStandingPreference now calls centerBody with false for 'forceFollowYPos'.
- computeHipsInSensorFrame: The code now matches the comments in that it only skips the dampening of the hips rotation if the centre-of-gravity model is being used.
This change will not actually be felt by users, because the speed was already effectively 2.0
(because the sprint speeds for Desktop and HMD were reversed).
Also, split getReactions() API into two calls
* getTriggerReactions() - lists all reactions that can be triggered with MyAvatar.triggerReaction().
* getBeginReactions() - lists all reactions that can be used with MyAvatar.beginReaction() and MyAvatar.endReaction().
* cameraInsideHead() check now uses detailed avatar collision when possible.
* head is now more constantly hidden in first person camera mode
* getEyeModelPositions() uses a better estimate when avatar eye joints are missing.
* moved findPointKDopDisplacement from Rig.cpp into AnimUtil.cpp
* added isPlayingOverrideAnimation() method to Rig class
Adds a new API to set this type, and an option to the Avatar App.
* "eye" - Match the user eyes with the avatar eyes. The previous default behavior.
If the avatar skull is larger then the user, it can cause the avatars body to lift off of the ground when the user looks down.
* "head" - Match the user head with the avatar head. The new default behavior.
This prevents the body from lifting off of the ground while wearing a large headed avatar. But can cause an offset between the users eyes and the avatars eyes.
Previously getCenterEyeCalibrationMat() would return the average eye position for an avatar, if the eyes are missing.
Now we fall back to using the HeadCalibrationMat() and adding an offset from the head to the center of the eyes.
This is more accurate for characters that don't quite have human proportions.
2.added step.js and cg_lean.js to the developer folder
3.added menu item for toggling the hips following between head and hips
4.added new function to return true if the root of MyAvatar is translating
to be under the head. Used to smooth the path of the hips
5.added computeCounterBalance to MyAvatar.h and cpp
6.added the menu item under developer/avatar to enable debug draw of the base of support in menu.h menu.cpp MyAvatar.h MyAvatar.cpp
7.added head yaw into the calculation of the hip rotation for the center
of gravity. This is already was happening in the deriveBodyFromHMD code
that is default
8.Changed Constants in Avatar constants for the base of support
9.fixed the over rotation of the shoulders
10.fixed scaling problem in cg computation
11.added room for going up on the toes without stretching
* Domain settings version has been bumped from version 2.0 to 2.1
* Old domain settings for avatar scale will be auto-converted to avatar height
* Avatar code has been changed so that limitDomainScale() works with the new height limits
* Avatar getUnscaledEyeHeight() was added to C++.
* MyAvatar.getHeight() was added to JS.