mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 10:49:33 +02:00
Don't reset head when we come back.
This commit is contained in:
parent
2accccef9e
commit
dc7d6d470d
3 changed files with 6 additions and 4 deletions
|
@ -234,7 +234,7 @@ QByteArray MyAvatar::toByteArray(bool cullSmallChanges, bool sendAll) {
|
||||||
return AvatarData::toByteArray(cullSmallChanges, sendAll);
|
return AvatarData::toByteArray(cullSmallChanges, sendAll);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MyAvatar::reset(bool andRecenter, bool andReload) {
|
void MyAvatar::reset(bool andRecenter, bool andReload, bool andHead) {
|
||||||
|
|
||||||
if (QThread::currentThread() != thread()) {
|
if (QThread::currentThread() != thread()) {
|
||||||
QMetaObject::invokeMethod(this, "reset", Q_ARG(bool, andRecenter));
|
QMetaObject::invokeMethod(this, "reset", Q_ARG(bool, andRecenter));
|
||||||
|
@ -247,7 +247,9 @@ void MyAvatar::reset(bool andRecenter, bool andReload) {
|
||||||
if (andReload) {
|
if (andReload) {
|
||||||
_skeletonModel->reset();
|
_skeletonModel->reset();
|
||||||
}
|
}
|
||||||
getHead()->reset();
|
if (andHead) { // which drives camera in desktop
|
||||||
|
getHead()->reset();
|
||||||
|
}
|
||||||
setThrust(glm::vec3(0.0f));
|
setThrust(glm::vec3(0.0f));
|
||||||
|
|
||||||
if (andRecenter) {
|
if (andRecenter) {
|
||||||
|
|
|
@ -94,7 +94,7 @@ public:
|
||||||
AudioListenerMode getAudioListenerModeCamera() const { return FROM_CAMERA; }
|
AudioListenerMode getAudioListenerModeCamera() const { return FROM_CAMERA; }
|
||||||
AudioListenerMode getAudioListenerModeCustom() const { return CUSTOM; }
|
AudioListenerMode getAudioListenerModeCustom() const { return CUSTOM; }
|
||||||
|
|
||||||
Q_INVOKABLE void reset(bool andRecenter = false, bool andReload = true);
|
Q_INVOKABLE void reset(bool andRecenter = false, bool andReload = true, bool andHead = true);
|
||||||
void update(float deltaTime);
|
void update(float deltaTime);
|
||||||
virtual void postUpdate(float deltaTime) override;
|
virtual void postUpdate(float deltaTime) override;
|
||||||
void preDisplaySide(RenderArgs* renderArgs);
|
void preDisplaySide(RenderArgs* renderArgs);
|
||||||
|
|
|
@ -93,7 +93,7 @@ void OverlayConductor::updateMode() {
|
||||||
_mode = FLAT; // Seems appropriate to let things reset, below, after the following.
|
_mode = FLAT; // Seems appropriate to let things reset, below, after the following.
|
||||||
// All reset of, e.g., room-scale location as though by apostrophe key, without all the other adjustments.
|
// All reset of, e.g., room-scale location as though by apostrophe key, without all the other adjustments.
|
||||||
qApp->getActiveDisplayPlugin()->resetSensors();
|
qApp->getActiveDisplayPlugin()->resetSensors();
|
||||||
myAvatar->reset(true, false);
|
myAvatar->reset(true, false, false);
|
||||||
}
|
}
|
||||||
if (_wantsOverlays) {
|
if (_wantsOverlays) {
|
||||||
setEnabled(!nowDriving, false);
|
setEnabled(!nowDriving, false);
|
||||||
|
|
Loading…
Reference in a new issue