Ray.GetPoint

Unity · Версия 2020.3 LTS · Scripting · Ray

Ray.GetPoint

Объявление

public Vector3 GetPoint(float distance);

Описание

Возвращает точку на distance в единицах вдоль луча.

using UnityEngine;

public class Example : MonoBehaviour
{
    void Start()
    {
        Ray r = new Ray();
        print(r.GetPoint(10)); // a point 10 units along the ray
    }
}

Обновлено 17 ноября 2026 г.