Is this a bug in rayperception sensor 3D?

Hello, I am a student working on a project using ml agent.

I completed the learning in this project using a rayperceptionsensor3D with 20 rays.
I used rayperceptionsensor3D, but I didn't know exactly what kind of observation I was collecting, so I tried to check it through an error message on the flip side.
Therefore, after applying the model, I lowered the number of rays and checked the error message, and it came out as follows.

9506350--1339429--upload_2023-12-2_14-34-11.png
9506350--1339432--upload_2023-12-2_14-34-27.png
In this situation, I have two questions.

  1. When Rays per direction was reduced to 0, the number of rays became 1, resulting in 5 shapes in error message. If so, I wonder what 5 observaions are.
  2. When rays per direction is 1, shape is 15. I think it should be 10, but I wonder why it's 15. (When the ray per direction went from 2 to 3, it increased by 10 as I expected)

I'd appreciate it if you could answer:)

each ray has 5 observations
when you set to 0 it's 1 ray straight ahead = 5 obs
when you set to 1 it's now 3 rays (the first and 1 either side) = 15 obs
when set to 2 it's now 5 rays (the first and 2 either side) = 25 obs
etc

as for what is being detected, you can check with the rayoutput
it checks
1. hit anything? (bool)
2. hit distance / fraction (float)
3. hit a tagged object? (bool)
4. tag index (int)
5. object hit (gameobject)

1 Like

I solved it, I set a Max Ray Degrees to 180, So It’s overlapped. thank you:)

Thank you for your answer. I read document you sent me.
9508348--1339738--upload_2023-12-3_14-21-21.png
I think the observation is

  1. hit anything? (0 : hit 1 : miss)
  2. normalized distance to the object hit (0~1)
  3. n one-hot vector (about tag)

Without an answer, I would never have solved it. Thank you so much.:smile: