Use fixed distance for service and dialog

This commit is contained in:
Santiago Lo Coco 2024-11-19 01:31:20 +01:00
parent e9c07eac9c
commit 922cde69a8
2 changed files with 9 additions and 3 deletions

View File

@ -19952,9 +19952,9 @@ MonoBehaviour:
faceUserDefinedTargetTransform: 0 faceUserDefinedTargetTransform: 0
targetToFace: {fileID: 0} targetToFace: {fileID: 0}
pivotAxis: 7 pivotAxis: 7
minDistance: 0.3 minDistance: 0.55
maxDistance: 0.7 maxDistance: 0.55
defaultDistance: 0.5 defaultDistance: 0.55
maxViewHorizontalDegrees: 30 maxViewHorizontalDegrees: 30
maxViewVerticalDegrees: 20 maxViewVerticalDegrees: 20
reorientWhenOutsideParameters: 1 reorientWhenOutsideParameters: 1

View File

@ -1,5 +1,6 @@
using System; using System;
using Microsoft.MixedReality.Toolkit.UI; using Microsoft.MixedReality.Toolkit.UI;
using Microsoft.MixedReality.Toolkit.Utilities.Solvers;
using UnityEngine; using UnityEngine;
namespace WebViewStream namespace WebViewStream
@ -26,6 +27,11 @@ namespace WebViewStream
); );
if (dialog != null) if (dialog != null)
{ {
Follow follow = dialog.GetComponent<Follow>();
follow.MinDistance = 0.5f;
follow.DefaultDistance = 0.5f;
follow.MaxDistance = 0.5f;
dialog.OnClosed += (x) => dialog.OnClosed += (x) =>
{ {
if (x.Result == DialogButtonType.Yes) if (x.Result == DialogButtonType.Yes)