mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 23:33:26 +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++) {
|
||||
var localPosition = this.playAreaSensorPositions[i];
|
||||
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
|
||||
- this.playAreaCenterOffset.y / 2; // Position on the floor.
|
||||
- this.playAreaCenterOffset.y / 2;
|
||||
Overlays.editOverlay(this.playAreaSensorPositionOverlays[i], {
|
||||
dimensions: Vec3.multiply(this.playAreaScaleFactor * avatarScale, this.PLAY_AREA_SENSOR_OVERLAY_DIMENSIONS),
|
||||
parentID: this.playAreaOverlay,
|
||||
|
|
Loading…
Reference in a new issue