# Ray(ロブロックス データ型) > Represents a line with a starting point that casts infinitely in a specific direction. - URL:https://roblox.minecraft-okinawa.com/reference/datatypes/Ray/ - 公式:https://create.roblox.com/docs/reference/engine/datatypes/Ray ## コンストラクター - `Ray.new(Origin: Vector3, Direction: Vector3)`:Returns a Ray with the given Origin and Direction. ## プロパティ - `Ray.Unit: Ray`:The Ray with a normalized direction (the direction has a magnitude of 1). - `Ray.Origin: Vector3`:The position of the origin. - `Ray.Direction: Vector3`:The direction vector of the Ray. ## メソッド - `Ray:ClosestPoint(point: Vector3): Vector3`:Returns a Vector3 projected onto the ray so that it is within the Ray line of sight. - `Ray:Distance(point: Vector3): number`:Returns the distance between the given point and the closest point on the Ray. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)