Ray.GetPoint Manual     Reference     Scripting  
Scripting > Runtime Classes > Ray
Ray.GetPoint

function GetPoint (distance : float) : Vector3

Description

Returns a point at distance units along the ray.

JavaScripts
var r : Ray;
print( r.GetPoint (10) ); // a point 10 units along the ray

using UnityEngine;
using System.Collections;

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

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public r as Ray

def Awake():
print(r.GetPoint(10))