Esempio n. 1
0
        public Island GetLookedAtIsland()
        {
            var r   = new IslandRaycastingService(level);
            var ray = TW.Data.Get <CameraInfo>().GetCenterScreenRay();

            return(r.RaycastWalkplaneReturnIsland(ray));
        }
Esempio n. 2
0
        public Vector3?GetLookedAtIslandSurfacePoint()
        {
            var r    = new IslandRaycastingService(level);
            var ray  = TW.Data.Get <CameraInfo>().GetCenterScreenRay();
            var dist = r.RaycastWalkplane(ray);

            if (dist == null)
            {
                return(null);
            }
            return(ray.GetPoint(dist.Value));
        }