ppo-SnowballTarget / com.unity.ml-agents /Runtime /Sensors /Reflection /QuaternionReflectionSensor.cs
Download com.unity.ml-agents/Runtime/Sensors/Reflection/QuaternionReflectionSensor.cs from ashish2244/ppo-SnowballTarget: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Runtime/Sensors/Reflection/QuaternionReflectionSensor.cs
- Command line
-
hf download hf://ashish2244/ppo-SnowballTarget/com.unity.ml-agents/Runtime/Sensors/Reflection/QuaternionReflectionSensor.cs
-
curl -L -o QuaternionReflectionSensor.cs https://huggingface.co/ashish2244/ppo-SnowballTarget/resolve/main/com.unity.ml-agents/Runtime/Sensors/Reflection/QuaternionReflectionSensor.cs
624 Bytes
| namespace Unity.MLAgents.Sensors.Reflection | |
| { | |
| /// <summary> | |
| /// Sensor that wraps a quaternion field or property of an object, and returns | |
| /// that as an observation. | |
| /// </summary> | |
| internal class QuaternionReflectionSensor : ReflectionSensorBase | |
| { | |
| public QuaternionReflectionSensor(ReflectionSensorInfo reflectionSensorInfo) | |
| : base(reflectionSensorInfo, 4) | |
| { } | |
| internal override void WriteReflectedField(ObservationWriter writer) | |
| { | |
| var quatVal = (UnityEngine.Quaternion)GetReflectedValue(); | |
| writer.Add(quatVal); | |
| } | |
| } | |
| } | |