Attempt to fix finding the focused display
This commit is contained in:
parent
0aa41a912b
commit
f13699bbc2
|
|
@ -29,10 +29,11 @@ Node {
|
|||
function updateFocus(smoothFollowEnabledChanged = false) {
|
||||
const orientations = smoothFollowEnabled ? effect.smoothFollowOrigin : effect.poseOrientations;
|
||||
if (orientations && orientations.length > 0) {
|
||||
const posePosition = effect.posePosition.times(breezyDesktop.fovDetails.fullScreenDistancePixels);
|
||||
let focusedIndex = -1;
|
||||
const lookingAtIndex = displays.findFocusedMonitor(
|
||||
displays.eusToNwuQuat(orientations[0]),
|
||||
displays.eusToNwuVector(effect.posePosition),
|
||||
displays.eusToNwuVector(posePosition),
|
||||
breezyDesktop.monitorPlacements.map(monitorVectors => monitorVectors.centerLook),
|
||||
breezyDesktop.focusedMonitorIndex,
|
||||
smoothFollowEnabled,
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ Item {
|
|||
property real clipNear: 10.0
|
||||
property real clipFar: 10000.0
|
||||
|
||||
property int sampleCounter: 0
|
||||
|
||||
function ratesOfChange(orientations) {
|
||||
const e0 = orientations[0].toEulerAngles();
|
||||
const e1 = orientations[1].toEulerAngles();
|
||||
|
|
@ -69,12 +67,6 @@ Item {
|
|||
if (!effect.poseHasPosition) lensVector = orientations[0].times(lensVector);
|
||||
|
||||
camera.position = position.times(fovDetails.fullScreenDistancePixels).plus(lensVector);
|
||||
|
||||
sampleCounter += 1;
|
||||
if (sampleCounter === 60) {
|
||||
sampleCounter = 0;
|
||||
console.log(`Breezy - Camera position: ${camera.position.x.toFixed(2)}, ${camera.position.y.toFixed(2)}, ${camera.position.z.toFixed(2)}; rotation: ${camera.eulerRotation.x.toFixed(2)}, ${camera.eulerRotation.y.toFixed(2)}, ${camera.eulerRotation.z.toFixed(2)}`);
|
||||
}
|
||||
}
|
||||
|
||||
// how far to look ahead is how old the pose data is plus a constant that is either the default for this device or an override
|
||||
|
|
|
|||
Loading…
Reference in New Issue