اقرأ باللغة الإنجليزية تحرير

مشاركة عبر


RayStep Struct

Definition

Represents a raycast that is a portion of a longer raycast.

C#
[System.Serializable]
public struct RayStep
Inheritance
RayStep
Attributes

Constructors

RayStep(Vector3, Vector3)

Initializes a new instance of the RayStep struct.

Properties

Direction

Get the direction of the raycast step. This direction will be a normalized vector from the origin to the terminus.

Length

The length or magnitude of the raycast step. This is the distance from the origin to the terminus.

Origin

Get the origin position of the raycast step.

Terminus

Get the end position of the raycast step.

Methods

Contains(Vector3)

Test if the raycast step contain the specified point.

CopyRay(Ray, Single)

Copy the given ray structure to this raycast step, along with the specified length.

GetDirectionByDistance(RayStep[], Single)

Returns a direction along an array of RaySteps by distance

GetPoint(Single)

Get a point along the raycast, at a specified distance from the origin.

GetPointByDistance(RayStep[], Single)

Returns a point along an array of RaySteps by distance

GetStepByDistance(RayStep[], Single, Single)

Returns a RayStep along an array of RaySteps by distance

UpdateRayStep(Vector3, Vector3)

Update the ray step with new origin and terminus points.

Operators

Implicit(RayStep to Ray)

Create a copy of the given raycast step.

Applies to

منتج الإصدارات
MRTK3 Core Definitions 3.0, 3.1, 3.2