9 private Transform mainCameraTransform;
11 public float Height = 1.4f;
13 public bool UseARLocationConfig =
true;
15 public Transform UseGameObjectHeight;
17 private float configY;
18 private bool useGOHeight;
23 if (Camera.main !=
null) mainCameraTransform = Camera.main.transform;
25 configY = -
ARLocation.Config.InitialGroundHeightGuess;
27 useGOHeight = UseGameObjectHeight !=
null;
33 var cameraPos = mainCameraTransform.position;
35 var y = useGOHeight ? UseGameObjectHeight.position.y : (UseARLocationConfig ? (cameraPos.y + configY) : (cameraPos.y - Height));
37 var transform1 = transform;
38 transform1.position =
new Vector3(