mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 10:17:40 +02:00
Add alternative code to position Oculus sensors at correct elevation
This commit is contained in:
parent
57da0fef63
commit
29dbc01361
1 changed files with 8 additions and 1 deletions
|
@ -263,8 +263,15 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
for (var i = 0; i < this.playAreaSensorPositionOverlays.length; i++) {
|
for (var i = 0; i < this.playAreaSensorPositionOverlays.length; i++) {
|
||||||
var localPosition = this.playAreaSensorPositions[i];
|
var localPosition = this.playAreaSensorPositions[i];
|
||||||
localPosition = Vec3.multiply(avatarScale, localPosition);
|
localPosition = Vec3.multiply(avatarScale, localPosition);
|
||||||
|
/*
|
||||||
|
// Position at the correct elevation. Tracking origin is at eye height.
|
||||||
|
localPosition.y = MyAvatar.getEyeHeight() + localPosition.y
|
||||||
|
- avatarScale * this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS.y / 2
|
||||||
|
- this.playAreaCenterOffset.y / 2;
|
||||||
|
*/
|
||||||
|
// Position on the floor.
|
||||||
localPosition.y = avatarScale * this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS.y / 2
|
localPosition.y = avatarScale * this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS.y / 2
|
||||||
- this.playAreaCenterOffset.y / 2; // Position on the floor.
|
- this.playAreaCenterOffset.y / 2;
|
||||||
Overlays.editOverlay(this.playAreaSensorPositionOverlays[i], {
|
Overlays.editOverlay(this.playAreaSensorPositionOverlays[i], {
|
||||||
dimensions: Vec3.multiply(this.playAreaScaleFactor * avatarScale, this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS),
|
dimensions: Vec3.multiply(this.playAreaScaleFactor * avatarScale, this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS),
|
||||||
parentID: this.playAreaOverlay,
|
parentID: this.playAreaOverlay,
|
||||||
|
|
Loading…
Reference in a new issue