So i started to learn the MLAgents Package. I wanted to make a little 2D Space game with an AI which detects the environment (Player, other AIs, Asteroids etc.) through Rays.
I figured out that you can add a Ray Perception Sensor 2D Component to your agent. I understand how it works, but i cannot find anything on how to USE it with your code.
I just want to let the agent fly around and give it a Reward and shoot at it´s Target when it finds something with the Ray. Like => if (ray.tag == target) then shoot() and Reward(+1);