This commit is contained in:
legop3
2025-12-27 03:24:16 -05:00
parent 3349120c0d
commit d4440a4f05
3 changed files with 9 additions and 8 deletions
+3 -2
View File
@@ -87,8 +87,9 @@ export function useDockIr(sensors, options = {}) {
const forceDetected = left.force || right.force || omni.force;
const leftColor = left.red || left.green;
const rightColor = right.red || right.green;
// Require either force field (close range) or both side colors to show the HUD, avoiding single stray hits.
const visible = forceDetected || (leftColor && rightColor);
const omniColor = omni.red || omni.green;
// Show when close (force field), or both sides see buoys, or a side + omni see buoy(s) (to surface sooner without single-stray triggers).
const visible = forceDetected || (leftColor && rightColor) || ((leftColor || rightColor) && omniColor);
const bias =
left.active && !right.active
? 'right'