Beispiel #1
0
        /// <summary>
        /// Reports all edges intersecting specified ray while ISegmentCast.RegisterCollision returns true.
        /// Collisions are reported in order of their distance from rayCast.Origin.
        /// </summary>
        /// <param name="segmentCast">Cast data</param>
        /// <param name="allocator">Allocator used to create internal buffers</param>
        public static void CastRay <T>(this Navmesh.Navmesh navmesh, T rayCast, Allocator allocator) where T : IRayCast
        {
            var open = new NativeList <IntPtr>(allocator);

            navmesh.CastRay(rayCast, open);
            open.Dispose();
        }
Beispiel #2
0
 public void Execute()
 {
     Navmesh.CastRay(Input, Allocator.Temp);
 }