mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 10:28:22 +02:00
Rotation fix.
This commit is contained in:
parent
052c8246fa
commit
14dfa72284
1 changed files with 3 additions and 4 deletions
|
@ -578,10 +578,9 @@ glm::vec3 MyAvatar::getUprightHeadPosition() const {
|
|||
}
|
||||
|
||||
glm::vec3 MyAvatar::getEyeLevelPosition() const {
|
||||
const float EYE_UP_OFFSET = 0.36f;
|
||||
glm::vec3 up = getWorldAlignedOrientation() * IDENTITY_UP;
|
||||
return _position + _skeleton.joint[AVATAR_JOINT_TORSO].rotation *
|
||||
(up * _scale * BODY_BALL_RADIUS_HEAD_BASE * EYE_UP_OFFSET + glm::vec3(0.0f, _pelvisToHeadLength, 0.0f));
|
||||
const float EYE_UP_OFFSET = 0.36f;
|
||||
return _position + getWorldAlignedOrientation() * _skeleton.joint[AVATAR_JOINT_TORSO].rotation *
|
||||
glm::vec3(0.0f, _pelvisToHeadLength + _scale * BODY_BALL_RADIUS_HEAD_BASE * EYE_UP_OFFSET, 0.0f);
|
||||
}
|
||||
|
||||
float MyAvatar::getBallRenderAlpha(int ball, bool lookingInMirror) const {
|
||||
|
|
Loading…
Reference in a new issue