Struct RayPerceptionInput
Contains the elements that define a ray perception sensor.
Inherited Members
Namespace: Unity.MLAgents.Sensors
Assembly: solution.dll
Syntax
public struct RayPerceptionInput
Fields
| Name | Description |
|---|---|
| Angles | List of angles (in degrees) used to define the rays. 90 degrees is considered "forward" relative to the game object. |
| CastRadius | Radius of the sphere to use for spherecasting. If 0 or less, rays are used instead - this may be faster, especially for complex environments. |
| CastType | Whether to perform the casts in 2D or 3D. |
| DetectableTags | List of tags which correspond to object types agent can see. |
| EndOffset | Ending height offset of ray from center of agent. |
| LayerMask | Filtering options for the casts. |
| RayLength | Length of the rays to cast. This will be scaled up or down based on the scale of the transform. |
| StartOffset | Starting height offset of ray from center of agent |
| Transform | Transform of the GameObject. |
| UseBatchedRaycasts | Whether to use batched raycasts. |
Methods
| Name | Description |
|---|---|
| OutputSize() | Returns the expected number of floats in the output. |
| RayExtents(int) | Get the cast start and end points for the given ray index/ |