Esempio n. 1
0
 public override bool GetGroundPosition(Vector3 screenPosition, ref Vector3 groundPosition)
 {
     if (this.unityCamera.enabled)
     {
         Vector3 position = this.unityCamera.transform.position;
         return(CameraUtils.GetGroundPositionHelper(this.unityCamera, screenPosition, position, this.distanceFromEyeToScreen, base.GroundOffset, ref groundPosition));
     }
     return(false);
 }
Esempio n. 2
0
        private Vector3 ScreenPointToGroundAnchor(Vector3 screenPoint)
        {
            Transform  transform     = this.camera.transform;
            Vector3    localPosition = transform.localPosition;
            Quaternion rotation      = transform.rotation;

            transform.localPosition = this.physicalCamera.Anchor;
            transform.LookAt(this.lookatPoint.Anchor);
            Vector3 zero   = Vector3.zero;
            Vector3 anchor = this.physicalCamera.Anchor;

            CameraUtils.GetGroundPositionHelper(this.unityCamera, screenPoint, anchor, this.distanceFromEyeToScreen, base.GroundOffset, ref zero);
            transform.localPosition = localPosition;
            transform.rotation      = rotation;
            return(zero);
        }
Esempio n. 3
0
        public override bool GetGroundPosition(Vector3 screenPosition, ref Vector3 groundPosition)
        {
            Vector3 rayOrigin = (base.GroundOffset != 0f) ? this.unityCamera.transform.position : this.physicalCamera.Position;

            return(CameraUtils.GetGroundPositionHelper(this.unityCamera, screenPosition, rayOrigin, this.distanceFromEyeToScreen, base.GroundOffset, ref groundPosition));
        }