UnityEngine.AI.NavMeshAgent.Raycast C# (CSharp) Method

Raycast() public method

public Raycast ( Vector3 targetPosition, NavMeshHit &hit ) : bool
targetPosition Vector3
hit NavMeshHit
return bool
        public bool Raycast(Vector3 targetPosition, out NavMeshHit hit)
        {
            return INTERNAL_CALL_Raycast(this, ref targetPosition, out hit);
        }

Usage Example

 static public int Raycast(IntPtr l)
 {
     try {
         UnityEngine.AI.NavMeshAgent self = (UnityEngine.AI.NavMeshAgent)checkSelf(l);
         UnityEngine.Vector3         a1;
         checkType(l, 2, out a1);
         UnityEngine.AI.NavMeshHit a2;
         var ret = self.Raycast(a1, out a2);
         pushValue(l, true);
         pushValue(l, ret);
         pushValue(l, a2);
         return(3);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
All Usage Examples Of UnityEngine.AI.NavMeshAgent::Raycast