mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-09 21:52:11 +02:00
Merge pull request #2151 from ey6es/master
Fix for head rotation tweaking.
This commit is contained in:
commit
35606c87ad
3 changed files with 10 additions and 6 deletions
|
@ -74,9 +74,9 @@ public:
|
|||
void tweakYaw(float yaw) { _tweakedYaw = yaw; }
|
||||
void tweakRoll(float roll) { _tweakedRoll = roll; }
|
||||
|
||||
float getTweakedPitch() const;
|
||||
float getTweakedYaw() const;
|
||||
float getTweakedRoll() const;
|
||||
virtual float getTweakedPitch() const;
|
||||
virtual float getTweakedYaw() const;
|
||||
virtual float getTweakedRoll() const;
|
||||
|
||||
void applyCollision(CollisionInfo& collisionInfo);
|
||||
|
||||
|
|
|
@ -91,9 +91,9 @@ QByteArray AvatarData::toByteArray() {
|
|||
destinationBuffer += packFloatRatioToTwoByte(destinationBuffer, _targetScale);
|
||||
|
||||
// Head rotation (NOTE: This needs to become a quaternion to save two bytes)
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->_yaw);
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->_pitch);
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->_roll);
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->getTweakedYaw());
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->getTweakedPitch());
|
||||
destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _headData->getTweakedRoll());
|
||||
|
||||
|
||||
// Head lean X,Z (head lateral and fwd/back motion relative to torso)
|
||||
|
|
|
@ -43,6 +43,10 @@ public:
|
|||
float getRoll() const { return _roll; }
|
||||
void setRoll(float roll) { _roll = glm::clamp(roll, MIN_HEAD_ROLL, MAX_HEAD_ROLL); }
|
||||
|
||||
virtual float getTweakedYaw() const { return _yaw; }
|
||||
virtual float getTweakedPitch() const { return _pitch; }
|
||||
virtual float getTweakedRoll() const { return _roll; }
|
||||
|
||||
glm::quat getOrientation() const;
|
||||
void setOrientation(const glm::quat& orientation);
|
||||
|
||||
|
|
Loading…
Reference in a new issue