no double scaling and comments

This commit is contained in:
luiscuenca 2017-11-17 13:40:22 -07:00
parent bbf5e3b023
commit df51d66f60

View file

@ -212,8 +212,7 @@
buttonPosition; buttonPosition;
var sensorScaleFactor = isOnHMD ? MyAvatar.sensorToWorldScale : 1.0; var sensorScaleFactor = isOnHMD ? MyAvatar.sensorToWorldScale : 1.0;
// Notification plane positions // Notification plane positions
// y, NOTIFICATION_3D_SCALE and noticeHeight need to be scaled by sensorScaleFactor; noticeY = -sensorScaleFactor * (y * NOTIFICATION_3D_SCALE + 0.5 * noticeHeight);
noticeY = -sensorScaleFactor * (y * NOTIFICATION_3D_SCALE * sensorScaleFactor + 0.5 * noticeHeight);
notificationPosition = { x: 0, y: noticeY, z: 0 }; notificationPosition = { x: 0, y: noticeY, z: 0 };
buttonPosition = { x: 0.5 * sensorScaleFactor * (noticeWidth - NOTIFICATION_3D_BUTTON_WIDTH), y: noticeY, z: 0.001 }; buttonPosition = { x: 0.5 * sensorScaleFactor * (noticeWidth - NOTIFICATION_3D_BUTTON_WIDTH), y: noticeY, z: 0.001 };