Struct RayPerceptionOutput.RayOutput
Contains the data generated from a single ray of a ray perception sensor.
Inherited Members
Namespace: Unity.MLAgents.Sensors
Assembly: solution.dll
Syntax
public struct RayPerceptionOutput.RayOutput
Fields
| Name | Description |
|---|---|
| EndPositionWorld | End position of the ray in world space. |
| HasHit | Whether or not the ray hit anything. |
| HitFraction | Normalized distance to the hit object. |
| HitGameObject | The hit GameObject (or null if there was no hit). |
| HitTagIndex | The index of the hit object's tag in the DetectableTags list, or -1 if there was no hit, or the hit object has a different tag. |
| HitTaggedObject | Whether or not the ray hit an object whose tag is in the input's DetectableTags list. |
| ScaledCastRadius | The scaled size of the cast. |
| StartPositionWorld | Start position of the ray in world space. |
Properties
| Name | Description |
|---|---|
| ScaledRayLength | The scaled length of the ray. |
Methods
| Name | Description |
|---|---|
| ToFloatArray(int, int, float[]) | Writes the ray output information to a subset of the float array. Each element in the rayAngles array determines a sublist of data to the observation. The sublist contains the observation data for a single cast. The list is composed of the following:
|