mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:49:12 +02:00
cleaned up code for squatty fix
This commit is contained in:
parent
14fb7e1d44
commit
96da9b7e54
3 changed files with 5 additions and 6 deletions
|
@ -53,7 +53,7 @@ Item {
|
||||||
ListView {
|
ListView {
|
||||||
width: firstCol.width
|
width: firstCol.width
|
||||||
height: root.animStateMachines.length * 15
|
height: root.animStateMachines.length * 15
|
||||||
visible: root.animStateMachines.length > 0;
|
visible: root.animStateMchines.length > 0;
|
||||||
model: root.animStateMachines
|
model: root.animStateMachines
|
||||||
delegate: StatText {
|
delegate: StatText {
|
||||||
text: {
|
text: {
|
||||||
|
|
|
@ -4074,6 +4074,7 @@ bool MyAvatar::FollowHelper::shouldActivateHorizontalCG(MyAvatar& myAvatar) cons
|
||||||
glm::vec3 currentHeadPosition = currentHeadPose.getTranslation();
|
glm::vec3 currentHeadPosition = currentHeadPose.getTranslation();
|
||||||
float anatomicalHeadToHipsDistance = glm::length(defaultHeadPosition - defaultHipsPosition);
|
float anatomicalHeadToHipsDistance = glm::length(defaultHeadPosition - defaultHipsPosition);
|
||||||
if (!isActive(Horizontal) &&
|
if (!isActive(Horizontal) &&
|
||||||
|
(!isActive(Vertical)) &&
|
||||||
(glm::length(currentHeadPosition - defaultHipsPosition) > (anatomicalHeadToHipsDistance + (DEFAULT_AVATAR_SPINE_STRETCH_LIMIT * anatomicalHeadToHipsDistance)))) {
|
(glm::length(currentHeadPosition - defaultHipsPosition) > (anatomicalHeadToHipsDistance + (DEFAULT_AVATAR_SPINE_STRETCH_LIMIT * anatomicalHeadToHipsDistance)))) {
|
||||||
myAvatar.setResetMode(true);
|
myAvatar.setResetMode(true);
|
||||||
stepDetected = true;
|
stepDetected = true;
|
||||||
|
@ -4112,9 +4113,8 @@ bool MyAvatar::FollowHelper::shouldActivateVertical(MyAvatar& myAvatar, const gl
|
||||||
void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix,
|
void MyAvatar::FollowHelper::prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix,
|
||||||
const glm::mat4& currentBodyMatrix, bool hasDriveInput) {
|
const glm::mat4& currentBodyMatrix, bool hasDriveInput) {
|
||||||
|
|
||||||
qCDebug(interfaceapp) << "in sitting state: " << myAvatar.getIsInSittingState();
|
if (myAvatar.getHMDLeanRecenterEnabled() &&
|
||||||
|
qApp->getCamera().getMode() != CAMERA_MODE_MIRROR) {
|
||||||
if (myAvatar.getHMDLeanRecenterEnabled() && qApp->getCamera().getMode() != CAMERA_MODE_MIRROR) {
|
|
||||||
if (!isActive(Rotation) && (shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
|
if (!isActive(Rotation) && (shouldActivateRotation(myAvatar, desiredBodyMatrix, currentBodyMatrix) || hasDriveInput)) {
|
||||||
activate(Rotation);
|
activate(Rotation);
|
||||||
myAvatar.setHeadControllerFacingMovingAverage(myAvatar.getHeadControllerFacing());
|
myAvatar.setHeadControllerFacingMovingAverage(myAvatar.getHeadControllerFacing());
|
||||||
|
|
|
@ -1713,7 +1713,6 @@ private:
|
||||||
bool shouldActivateVertical(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix, const glm::mat4& currentBodyMatrix) const;
|
bool shouldActivateVertical(MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix, const glm::mat4& currentBodyMatrix) const;
|
||||||
bool shouldActivateHorizontal(const MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix, const glm::mat4& currentBodyMatrix) const;
|
bool shouldActivateHorizontal(const MyAvatar& myAvatar, const glm::mat4& desiredBodyMatrix, const glm::mat4& currentBodyMatrix) const;
|
||||||
bool shouldActivateHorizontalCG(MyAvatar& myAvatar) const;
|
bool shouldActivateHorizontalCG(MyAvatar& myAvatar) const;
|
||||||
bool shouldActivateHorizontalSitting(MyAvatar& myAvatar) const;
|
|
||||||
void prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& bodySensorMatrix, const glm::mat4& currentBodyMatrix, bool hasDriveInput);
|
void prePhysicsUpdate(MyAvatar& myAvatar, const glm::mat4& bodySensorMatrix, const glm::mat4& currentBodyMatrix, bool hasDriveInput);
|
||||||
glm::mat4 postPhysicsUpdate(const MyAvatar& myAvatar, const glm::mat4& currentBodyMatrix);
|
glm::mat4 postPhysicsUpdate(const MyAvatar& myAvatar, const glm::mat4& currentBodyMatrix);
|
||||||
bool getForceActivateRotation() const;
|
bool getForceActivateRotation() const;
|
||||||
|
@ -1803,7 +1802,7 @@ private:
|
||||||
ThreadSafeValueCache<float> _sprintSpeed { AVATAR_SPRINT_SPEED_SCALAR };
|
ThreadSafeValueCache<float> _sprintSpeed { AVATAR_SPRINT_SPEED_SCALAR };
|
||||||
float _walkSpeedScalar { AVATAR_WALK_SPEED_SCALAR };
|
float _walkSpeedScalar { AVATAR_WALK_SPEED_SCALAR };
|
||||||
bool _isInWalkingState { false };
|
bool _isInWalkingState { false };
|
||||||
bool _isInSittingState{ false };
|
bool _isInSittingState { false };
|
||||||
|
|
||||||
// load avatar scripts once when rig is ready
|
// load avatar scripts once when rig is ready
|
||||||
bool _shouldLoadScripts { false };
|
bool _shouldLoadScripts { false };
|
||||||
|
|
Loading…
Reference in a new issue