mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:13:09 +02:00
fix is facing avatar
This commit is contained in:
parent
e6dca8de86
commit
755ce183e0
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ bool Billboardable::pointTransformAtCamera(Transform& transform, glm::quat offse
|
||||||
// use the referencial from the avatar, y isn't always up
|
// use the referencial from the avatar, y isn't always up
|
||||||
glm::vec3 avatarUP = DependencyManager::get<AvatarManager>()->getMyAvatar()->getOrientation()*Vectors::UP;
|
glm::vec3 avatarUP = DependencyManager::get<AvatarManager>()->getMyAvatar()->getOrientation()*Vectors::UP;
|
||||||
|
|
||||||
glm::quat rotation(conjugate(toQuat(glm::lookAt(billboardPos, cameraPos, avatarUP))));
|
glm::quat rotation(conjugate(toQuat(glm::lookAt(cameraPos, billboardPos, avatarUP))));
|
||||||
|
|
||||||
transform.setRotation(rotation);
|
transform.setRotation(rotation);
|
||||||
transform.postRotate(offsetRotation);
|
transform.postRotate(offsetRotation);
|
||||||
|
|
Loading…
Reference in a new issue