mirror of
https://github.com/lubosz/overte.git
synced 2025-05-28 03:51:29 +02:00
Only reposition the tablet when camera mode changes, in HMD mode.
This commit is contained in:
parent
c147b9bec0
commit
008a58f9d7
1 changed files with 10 additions and 8 deletions
|
@ -379,6 +379,7 @@ WebTablet.prototype.mousePressEvent = function (event) {
|
|||
WebTablet.prototype.cameraModeChanged = function (newMode) {
|
||||
// reposition the tablet, after a small delay.
|
||||
// This allows HMD.position to reflect the new camera mode.
|
||||
if (HMD.active) {
|
||||
var self = this;
|
||||
Script.setTimeout(function () {
|
||||
var NO_HANDS = -1;
|
||||
|
@ -387,6 +388,7 @@ WebTablet.prototype.cameraModeChanged = function (newMode) {
|
|||
self.calculateTabletAttachmentProperties(NO_HANDS, tabletProperties);
|
||||
Entities.editEntity(self.tabletEntityID, tabletProperties);
|
||||
}, 10);
|
||||
}
|
||||
};
|
||||
|
||||
function rayIntersectPlane(planePosition, planeNormal, rayStart, rayDirection) {
|
||||
|
|
Loading…
Reference in a new issue