mirror of
https://github.com/overte-org/overte.git
synced 2025-07-24 11:04:07 +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,14 +379,16 @@ WebTablet.prototype.mousePressEvent = function (event) {
|
||||||
WebTablet.prototype.cameraModeChanged = function (newMode) {
|
WebTablet.prototype.cameraModeChanged = function (newMode) {
|
||||||
// reposition the tablet, after a small delay.
|
// reposition the tablet, after a small delay.
|
||||||
// This allows HMD.position to reflect the new camera mode.
|
// This allows HMD.position to reflect the new camera mode.
|
||||||
var self = this;
|
if (HMD.active) {
|
||||||
Script.setTimeout(function () {
|
var self = this;
|
||||||
var NO_HANDS = -1;
|
Script.setTimeout(function () {
|
||||||
var tabletProperties = {};
|
var NO_HANDS = -1;
|
||||||
// compute position, rotation & parentJointIndex of the tablet
|
var tabletProperties = {};
|
||||||
self.calculateTabletAttachmentProperties(NO_HANDS, tabletProperties);
|
// compute position, rotation & parentJointIndex of the tablet
|
||||||
Entities.editEntity(self.tabletEntityID, tabletProperties);
|
self.calculateTabletAttachmentProperties(NO_HANDS, tabletProperties);
|
||||||
}, 10);
|
Entities.editEntity(self.tabletEntityID, tabletProperties);
|
||||||
|
}, 10);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function rayIntersectPlane(planePosition, planeNormal, rayStart, rayDirection) {
|
function rayIntersectPlane(planePosition, planeNormal, rayStart, rayDirection) {
|
||||||
|
|
Loading…
Reference in a new issue