Legacy Documentation: Version 5.2
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Ray.GetPoint

Switch to Manual
public Vector3 GetPoint(float distance);

Parameters

Description

Returns a point at distance units along the ray.

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour { public Ray r; void Example() { print(r.GetPoint(10)); } }