mirror of
https://github.com/overte-org/overte.git
synced 2025-04-18 07:56:25 +02:00
Fix leaning not using center-of-gravity model in mode 'Allow avatar to stand: When I'm standing'.
computeHipsInSensorFrame was accidentally setting useCenterOfGravityModel to false if !getHMDCrouchRecenterEnabled. Now it sets it to true if !getHMDCrouchRecenterEnabled. So if artificial standing is disabled, it uses center-of-gravity regardless of the user's sit/stand state.
This commit is contained in:
parent
44324584b4
commit
a95d29d327
1 changed files with 5 additions and 3 deletions
|
@ -65,11 +65,13 @@ static AnimPose computeHipsInSensorFrame(MyAvatar* myAvatar, bool isFlying) {
|
|||
return result;
|
||||
}
|
||||
|
||||
// Use the center-of-gravity model if the user and the avatar are standing, unless flying or walking.
|
||||
// If artificial standing is disabled, use center-of-gravity regardless of the user's sit/stand state.
|
||||
bool useCenterOfGravityModel =
|
||||
myAvatar->getCenterOfGravityModelEnabled() && !isFlying && !myAvatar->getIsInWalkingState() &&
|
||||
!myAvatar->getIsInSittingState() && myAvatar->getHMDLeanRecenterEnabled() &&
|
||||
(myAvatar->getAllowAvatarLeaningPreference() != MyAvatar::AllowAvatarLeaningPreference::AlwaysNoRecenter) &&
|
||||
myAvatar->getHMDCrouchRecenterEnabled();
|
||||
(!myAvatar->getHMDCrouchRecenterEnabled() || !myAvatar->getIsInSittingState()) &&
|
||||
myAvatar->getHMDLeanRecenterEnabled() &&
|
||||
(myAvatar->getAllowAvatarLeaningPreference() != MyAvatar::AllowAvatarLeaningPreference::AlwaysNoRecenter);
|
||||
|
||||
glm::mat4 hipsMat;
|
||||
if (useCenterOfGravityModel) {
|
||||
|
|
Loading…
Reference in a new issue