mirror of
https://github.com/lubosz/overte.git
synced 2025-04-26 09:15:25 +02:00
CR
This commit is contained in:
parent
07cf87749f
commit
b399420190
3 changed files with 20 additions and 7 deletions
|
@ -376,10 +376,9 @@ void Agent::executeScript() {
|
|||
static quint16 audioSequenceNumber{ 0 };
|
||||
Transform audioTransform;
|
||||
|
||||
auto avatarOrientation = scriptedAvatar->getOrientation();
|
||||
//glm::quat headOrientation = scriptedAvatar->getHeadOrientation(); // FIXME - should we be using head orientation of avatar orientation?
|
||||
auto headOrientation = scriptedAvatar->getHeadOrientation();
|
||||
audioTransform.setTranslation(scriptedAvatar->getPosition());
|
||||
audioTransform.setRotation(avatarOrientation);
|
||||
audioTransform.setRotation(headOrientation);
|
||||
|
||||
QByteArray encodedBuffer;
|
||||
if (_encoder) {
|
||||
|
|
|
@ -1010,7 +1010,7 @@ void Avatar::setSkeletonModelURL(const QUrl& skeletonModelURL) {
|
|||
|
||||
void Avatar::setModelURLFinished(bool success) {
|
||||
if (!success && _skeletonModelURL != AvatarData::defaultFullAvatarModelUrl()) {
|
||||
qWarning(interfaceapp) << "Using default after failing to load Avatar model: " << _skeletonModelURL;
|
||||
qCWarning(interfaceapp) << "Using default after failing to load Avatar model: " << _skeletonModelURL;
|
||||
// call _skeletonModel.setURL, but leave our copy of _skeletonModelURL alone. This is so that
|
||||
// we don't redo this every time we receive an identity packet from the avatar with the bad url.
|
||||
QMetaObject::invokeMethod(_skeletonModel.get(), "setURL",
|
||||
|
|
|
@ -384,9 +384,23 @@ public:
|
|||
lazyInitHeadData();
|
||||
return _headData->getOrientation();
|
||||
}
|
||||
void setHeadOrientation(const glm::quat& orientation) { if (_headData) _headData->setOrientation(orientation); }
|
||||
void setLookAtPosition(const glm::vec3& lookAtPosition) { if (_headData) _headData->setLookAtPosition(lookAtPosition); }
|
||||
void setBlendshapeCoefficients(const QVector<float>& blendshapeCoefficients) { if (_headData) _headData->setBlendshapeCoefficients(blendshapeCoefficients); }
|
||||
void setHeadOrientation(const glm::quat& orientation) {
|
||||
if (_headData) {
|
||||
_headData->setOrientation(orientation);
|
||||
}
|
||||
}
|
||||
|
||||
void setLookAtPosition(const glm::vec3& lookAtPosition) {
|
||||
if (_headData) {
|
||||
_headData->setLookAtPosition(lookAtPosition);
|
||||
}
|
||||
}
|
||||
|
||||
void setBlendshapeCoefficients(const QVector<float>& blendshapeCoefficients) {
|
||||
if (_headData) {
|
||||
_headData->setBlendshapeCoefficients(blendshapeCoefficients);
|
||||
}
|
||||
}
|
||||
|
||||
// access to Head().set/getMousePitch (degrees)
|
||||
float getHeadPitch() const { return _headData->getBasePitch(); }
|
||||
|
|
Loading…
Reference in a new issue