Manual     Reference     Scripting  
  
Scripting > Runtime Classes > Ray   
  • Menu
  • Overview
  • Runtime Classes
  • Attributes
  • Enumerations
  • Editor Classes
  • Attributes
  • Enumerations
  • History
  • Index
  • Ray
  • All Members
  • Variables
  • direction
  • origin
  • Constructors
  • Ray
  • Functions
  • GetPoint
  • ToString

Ray.GetPoint  

function GetPoint (distance : float) : Vector3

Description

Returns a point at distance units along the ray.

JavaScript
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 Example() {
print(r.GetPoint(10));
}
}

import UnityEngine
import System.Collections

class example(MonoBehaviour):

public r as Ray

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