A representation of positive infinity (Read Only).
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { void Update() { Debug.DrawLine(Vector3.zero, Vector3.forward * 100); if (Physics.Raycast(Vector3.zero, Vector3.forward, Mathf.Infinity)) print("There is something in front of the object!"); } }