Download com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponent3D.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 1.76 kB
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponent3D.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponent3D.cs
-
curl -L -o RayPerceptionSensorComponent3D.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Runtime/Sensors/RayPerceptionSensorComponent3D.cs
1.76 kB
| using UnityEngine; | |
| using UnityEngine.Serialization; | |
| namespace Unity.MLAgents.Sensors | |
| { | |
| /// <summary> | |
| /// A component for 3D Ray Perception. | |
| /// </summary> | |
| [] | |
| public class RayPerceptionSensorComponent3D : RayPerceptionSensorComponentBase | |
| { | |
| [] | |
| [] | |
| [] | |
| float m_StartVerticalOffset; | |
| /// <summary> | |
| /// Ray start is offset up or down by this amount. | |
| /// </summary> | |
| public float StartVerticalOffset | |
| { | |
| get => m_StartVerticalOffset; | |
| set { m_StartVerticalOffset = value; UpdateSensor(); } | |
| } | |
| [] | |
| [] | |
| [] | |
| float m_EndVerticalOffset; | |
| /// <summary> | |
| /// Ray end is offset up or down by this amount. | |
| /// </summary> | |
| public float EndVerticalOffset | |
| { | |
| get => m_EndVerticalOffset; | |
| set { m_EndVerticalOffset = value; UpdateSensor(); } | |
| } | |
| /// <inheritdoc/> | |
| public override RayPerceptionCastType GetCastType() | |
| { | |
| return RayPerceptionCastType.Cast3D; | |
| } | |
| /// <inheritdoc/> | |
| public override float GetStartVerticalOffset() | |
| { | |
| return StartVerticalOffset; | |
| } | |
| /// <inheritdoc/> | |
| public override float GetEndVerticalOffset() | |
| { | |
| return EndVerticalOffset; | |
| } | |
| } | |
| } | |