Unity-Technologies / ml-agents

The Unity Machine Learning Agents Toolkit (ML-Agents) is an open-source project that enables games and simulations to serve as environments for training intelligent agents using deep reinforcement learning and imitation learning.
https://unity.com/products/machine-learning-agents
Other
17.18k stars 4.16k forks source link

RayCast Observations get stopped by agents collider #3176

Closed Laporasus closed 4 years ago

Laporasus commented 4 years ago

I'm trying to train some agents using the RayPerceptionSensorComponent2D. After checking the example given in the WallJump Environment, i thought it would suffice to add only the tags of objects, that the ray should actually be able to detect, to the detectable tags. However the rays always stop and "detect" their origin (so the middle of the Agent). When I disable the collider, the raycast works fine, the agent just falls through the stage.

Does anyone know, how to solve this issue? The agent has a different tag, which should not be detected.

Here's a screenshot of the Agent and the small red indicator, that the raycast hit something. Unity_2020-01-07_18-36-22 Please ask, if you need additional information, I'm not sure what would be helpful here.

surfnerd commented 4 years ago

Hi @Laporasus, A quick google search revealed this solution to a similar problem. Please let me know if that helps.

Laporasus commented 4 years ago

Yes, that worked perfectly! I only searched through the recent issues in here, since i thought this might be a MLAgents-only issue. Thank you!

github-actions[bot] commented 3 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.