Fix position after rotation. May be fix rotation in HMD mode

This commit is contained in:
Vladyslav Stelmakhovskyi 2017-06-02 18:58:18 +02:00
parent b0e4b752d5
commit 8068e7201d

View file

@ -261,11 +261,10 @@ WebTablet.prototype.setLandscape = function(newLandscapeValue) {
return;
}
var tabletProperties = {};
tabletProperties.visible = true;
this.landscape = newLandscapeValue;
this.calculateTabletAttachmentProperties(NO_HANDS, false, tabletProperties);
Overlays.editOverlay(this.tabletEntityID, tabletProperties);
Overlays.editOverlay(this.tabletEntityID,
{ rotation: this.landscape ? Quat.multiply(Camera.orientation, ROT_LANDSCAPE) :
Quat.multiply(Camera.orientation, ROT_Y_180) });
Overlays.editOverlay(this.webOverlayID, {
resolution: this.getTabletTextureResolution(),
rotation: Quat.multiply(Camera.orientation, ROT_LANDSCAPE_WINDOW)