Ray Perception Sensor 2D not showing collisions
Hello all,
I am still relatively new to the Unity environment and am currently working with reinforcement learning and ML agents. For this I wanted to add an agent to the 2D platformer.
I have attached two ray perception sensors to my agent. Unfortunately I can't get any hits with these sensors, at least they are not displayed as usual with a sphere in the gizmos.
The sensors are casting rays, but like you see in the image, they are not colliding.
The ray perception sensor are childs of the agent, defined in its prefab. I defined the sensors to collide with 4 tags: Untagged, ground, enemy and coin
I assigned the coin tag to the token, the enemy tag to the enemy and the ground tag to the tilemap forming the ground. The token has a circle collider, while the enemy has an capsule collider. On the tilemap there is a tilmap collider.
I would now expect the sensor to collide with the token, enemy and ground and display these hits in spheres, but it does not.
So, what am I doing wrong?
Your answer
Follow this Question
Related Questions
Making a GameObject follow the direction of a RayCast 1 Answer
2D Raycast Script 0 Answers
Shoot projectile towards the end of a raycast? 0 Answers
How do I destroy particles with raycast? 0 Answers
RayCast Rotation 1 Answer