mirror of
https://github.com/overte-org/overte.git
synced 2025-06-19 02:41:19 +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;
|
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 =
|
bool useCenterOfGravityModel =
|
||||||
myAvatar->getCenterOfGravityModelEnabled() && !isFlying && !myAvatar->getIsInWalkingState() &&
|
myAvatar->getCenterOfGravityModelEnabled() && !isFlying && !myAvatar->getIsInWalkingState() &&
|
||||||
!myAvatar->getIsInSittingState() && myAvatar->getHMDLeanRecenterEnabled() &&
|
(!myAvatar->getHMDCrouchRecenterEnabled() || !myAvatar->getIsInSittingState()) &&
|
||||||
(myAvatar->getAllowAvatarLeaningPreference() != MyAvatar::AllowAvatarLeaningPreference::AlwaysNoRecenter) &&
|
myAvatar->getHMDLeanRecenterEnabled() &&
|
||||||
myAvatar->getHMDCrouchRecenterEnabled();
|
(myAvatar->getAllowAvatarLeaningPreference() != MyAvatar::AllowAvatarLeaningPreference::AlwaysNoRecenter);
|
||||||
|
|
||||||
glm::mat4 hipsMat;
|
glm::mat4 hipsMat;
|
||||||
if (useCenterOfGravityModel) {
|
if (useCenterOfGravityModel) {
|
||||||
|
|
Loading…
Reference in a new issue