mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 12:15:30 +02:00
Use avatar position as orb position when head position not available
This commit is contained in:
parent
afd7993152
commit
a2ac43289c
1 changed files with 5 additions and 1 deletions
|
@ -64,7 +64,11 @@ void OtherAvatar::removeOrb() {
|
||||||
void OtherAvatar::updateOrbPosition() {
|
void OtherAvatar::updateOrbPosition() {
|
||||||
if (!_otherAvatarOrbMeshPlaceholderID.isNull()) {
|
if (!_otherAvatarOrbMeshPlaceholderID.isNull()) {
|
||||||
EntityItemProperties properties;
|
EntityItemProperties properties;
|
||||||
properties.setPosition(getHead()->getPosition());
|
glm::vec3 headPosition;
|
||||||
|
if (!_skeletonModel->getHeadPosition(headPosition)) {
|
||||||
|
headPosition = getWorldPosition();
|
||||||
|
}
|
||||||
|
properties.setPosition(headPosition);
|
||||||
DependencyManager::get<EntityScriptingInterface>()->editEntity(_otherAvatarOrbMeshPlaceholderID, properties);
|
DependencyManager::get<EntityScriptingInterface>()->editEntity(_otherAvatarOrbMeshPlaceholderID, properties);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue