|
@@ -91856,6 +91856,9 @@ var BABYLON;
|
|
this.attachedMesh.computeWorldMatrix();
|
|
this.attachedMesh.computeWorldMatrix();
|
|
BABYLON.Quaternion.FromRotationMatrixToRef(this._tmpMatrix, this._rootMesh.rotationQuaternion);
|
|
BABYLON.Quaternion.FromRotationMatrixToRef(this._tmpMatrix, this._rootMesh.rotationQuaternion);
|
|
}
|
|
}
|
|
|
|
+ else if (this._rootMesh.rotationQuaternion) {
|
|
|
|
+ this._rootMesh.rotationQuaternion.set(0, 0, 0, 1);
|
|
|
|
+ }
|
|
if (this.updateGizmoPositionToMatchAttachedMesh) {
|
|
if (this.updateGizmoPositionToMatchAttachedMesh) {
|
|
this._rootMesh.position.copyFrom(this.attachedMesh.absolutePosition);
|
|
this._rootMesh.position.copyFrom(this.attachedMesh.absolutePosition);
|
|
}
|
|
}
|
|
@@ -93143,8 +93146,10 @@ var BABYLON;
|
|
*/
|
|
*/
|
|
set: function (value) {
|
|
set: function (value) {
|
|
if (value) {
|
|
if (value) {
|
|
- this.gizmos.positionGizmo = this.gizmos.positionGizmo || new BABYLON.PositionGizmo();
|
|
|
|
- this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
|
|
|
+ if (!this.gizmos.positionGizmo) {
|
|
|
|
+ this.gizmos.positionGizmo = new BABYLON.PositionGizmo();
|
|
|
|
+ this.gizmos.positionGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
|
+ }
|
|
this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
|
|
this.gizmos.positionGizmo.attachedMesh = this._attachedMesh;
|
|
}
|
|
}
|
|
else if (this.gizmos.positionGizmo) {
|
|
else if (this.gizmos.positionGizmo) {
|
|
@@ -93164,8 +93169,10 @@ var BABYLON;
|
|
*/
|
|
*/
|
|
set: function (value) {
|
|
set: function (value) {
|
|
if (value) {
|
|
if (value) {
|
|
- this.gizmos.rotationGizmo = this.gizmos.rotationGizmo || new BABYLON.RotationGizmo();
|
|
|
|
- this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
|
|
|
+ if (!this.gizmos.rotationGizmo) {
|
|
|
|
+ this.gizmos.rotationGizmo = new BABYLON.RotationGizmo();
|
|
|
|
+ this.gizmos.rotationGizmo.updateGizmoRotationToMatchAttachedMesh = false;
|
|
|
|
+ }
|
|
this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
|
|
this.gizmos.rotationGizmo.attachedMesh = this._attachedMesh;
|
|
}
|
|
}
|
|
else if (this.gizmos.rotationGizmo) {
|
|
else if (this.gizmos.rotationGizmo) {
|
|
@@ -96005,7 +96012,7 @@ var BABYLON;
|
|
var wasPresenting = this._webVRpresenting;
|
|
var wasPresenting = this._webVRpresenting;
|
|
// A VR display is connected
|
|
// A VR display is connected
|
|
this._webVRpresenting = vrDisplay.isPresenting;
|
|
this._webVRpresenting = vrDisplay.isPresenting;
|
|
- if (wasPresenting && !this._webVRpresenting)
|
|
|
|
|
|
+ if (wasPresenting && !this._webVRpresenting && this.isInVRMode)
|
|
this.exitVR();
|
|
this.exitVR();
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
@@ -96123,6 +96130,13 @@ var BABYLON;
|
|
this.updateButtonVisibility();
|
|
this.updateButtonVisibility();
|
|
if (this._interactionsEnabled) {
|
|
if (this._interactionsEnabled) {
|
|
this._scene.unregisterBeforeRender(this.beforeRender);
|
|
this._scene.unregisterBeforeRender(this.beforeRender);
|
|
|
|
+ this._cameraGazer._gazeTracker.isVisible = false;
|
|
|
|
+ if (this.leftController) {
|
|
|
|
+ this.leftController._gazeTracker.isVisible = false;
|
|
|
|
+ }
|
|
|
|
+ if (this.rightController) {
|
|
|
|
+ this.rightController._gazeTracker.isVisible = false;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
// resize to update width and height when exiting vr exits fullscreen
|
|
// resize to update width and height when exiting vr exits fullscreen
|
|
this._scene.getEngine().resize();
|
|
this._scene.getEngine().resize();
|