File size: 765 Bytes
d353048
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#if UNITY_2020_1_OR_NEWER
using UnityEngine;

namespace Unity.MLAgents.Sensors
{
    [UnityEngine.Scripting.APIUpdating.MovedFrom("Unity.MLAgents.Extensions.Sensors")]
    public class ArticulationBodySensorComponent : SensorComponent
    {
        public ArticulationBody RootBody;

        [SerializeField]
        public PhysicsSensorSettings Settings = PhysicsSensorSettings.Default();
        public string sensorName;

        /// <summary>
        /// Creates a PhysicsBodySensor.
        /// </summary>
        /// <returns>Corresponding sensors.</returns>
        public override ISensor[] CreateSensors()
        {
            return new ISensor[] {new PhysicsBodySensor(RootBody, Settings, sensorName)};
        }
    }
}
#endif // UNITY_2020_1_OR_NEWER