mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:01:09 +02:00
Merge pull request #6214 from howard-stearns/goToPosition
Don't go to wrong position on startup/teleport.
This commit is contained in:
commit
ac1055c3e0
1 changed files with 5 additions and 0 deletions
|
@ -208,6 +208,11 @@ void MyAvatar::update(float deltaTime) {
|
||||||
setPosition(_goToPosition);
|
setPosition(_goToPosition);
|
||||||
setOrientation(_goToOrientation);
|
setOrientation(_goToOrientation);
|
||||||
_goToPending = false;
|
_goToPending = false;
|
||||||
|
// updateFromHMDSensorMatrix (called from paintGL) expects that the sensorToWorldMatrix is updated for any position changes
|
||||||
|
// that happen between render and Application::update (which calls updateSensorToWorldMatrix to do so).
|
||||||
|
// However, render/MyAvatar::update/Application::update don't always match (e.g., when using the separate avatar update thread),
|
||||||
|
// so we update now. It's ok if it updates again in the normal way.
|
||||||
|
updateSensorToWorldMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_referential) {
|
if (_referential) {
|
||||||
|
|
Loading…
Reference in a new issue