'What does the "RayPerceptionSensore3D" compocent observe?

I'm just learning about Unity ML-agent.

Does the "RayPerceptionSensor3D" component observe only tags and positions that have been hit by rays? Then, is it the same as adding the code below in the "CollectObservation" function?

for(int i = 0; i < numOfRays; i++) { 
   rayHits[i] = Physics.SphereCast(each direction...);
}

foreach(RayCastHit rayHit in rayHits) {
    sensor.AddObservation(rayHit.collider.tag); 
    sensor.AddObservation(rayHit.collider.transform.position);
}

 



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source