기술 자료

Unity Engine

Unity Engine

Ray(Vector3, Vector3)

Creates a ray starting at origin along direction.
읽는 시간 1분최근 업데이트: 한 달 전

Definition

  • Type: Constructor
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public Ray(Vector3 origin, Vector3 direction)

Parameters

origin


direction

Examples

using UnityEngine;public class ExampleClass : MonoBehaviour{ void Start() { // Create a ray from the transform position along the transform's z-axis Ray ray = new Ray(transform.position, transform.forward); }}