Class RayPerceptionSensorComponentBase
A base class to support sensor components for raycast-based sensors.
Inheritance
Inherited Members
Namespace: Unity.MLAgents.Sensors
Assembly: solution.dll
Syntax
public abstract class RayPerceptionSensorComponentBase : SensorComponent
Fields
| Name | Description |
|---|---|
| m_AlternatingRayOrder | |
| m_UseBatchedRaycasts |
Properties
| Name | Description |
|---|---|
| AlternatingRayOrder | Determines how the rays are ordered. By default the ordering is as follows: middle ray is first; then alternates outward adding rays to the left and right. If set to false, then the rays are ordered from left to right (viewed from above) which is more amenable to processing with conv nets. This property will be deprecated with the next major version update and the left to right ordering will be used thereafter. |
| DetectableTags | List of tags in the scene to compare against. Note that this should not be changed at runtime. |
| MaxRayDegrees | Cone size for rays. Using 90 degrees will cast rays to the left and right. Greater than 90 degrees will go backwards. |
| ObservationStacks | Whether to stack previous observations. Using 1 means no previous observations. Note that changing this after the sensor is created has no effect. |
| RayLayerMask | Controls which layers the rays can hit. |
| RayLength | Length of the rays to cast. |
| RaySensor | Get the RayPerceptionSensor that was created. |
| RaysPerDirection | Number of rays to the left and right of center. Note that this should not be changed at runtime. |
| SensorName | The name of the Sensor that this component wraps. Note that changing this at runtime does not affect how the Agent sorts the sensors. |
| SphereCastRadius | Radius of sphere to cast. Set to zero for raycasts. |
| UseBatchedRaycasts | Determines whether to use batched raycasts and the jobs system. Default = false. |
Methods
| Name | Description |
|---|---|
| CreateSensors() | Returns an initialized raycast sensor. |
| GetCastType() | Returns the RayPerceptionCastType for the associated raycast sensor. |
| GetEndVerticalOffset() | Returns the amount that the ray end is offset up or down by. |
| GetRayPerceptionInput() | Get the RayPerceptionInput that is used by the RayPerceptionSensor. |
| GetStartVerticalOffset() | Returns the amount that the ray start is offset up or down by. |