Ml-agents: What are the ways to cast Ray Perception Sensor Component 2D forward?

Created on 19 Jan 2020  路  2Comments  路  Source: Unity-Technologies/ml-agents

Aside from rotating the transform to -90 degrees, is their another way to effective cast the sensor forward?

image

discussion

Most helpful comment

You can do this by adding a GameObject as a child of the agent, rotate the child 90 degrees in the appropriate direction and then add a raycast script to the child. In the BehaviorParameters script on the agent, check the box "Use Child Sensors." This way, the agent will use observations collected by its children too.

All 2 comments

You can do this by adding a GameObject as a child of the agent, rotate the child 90 degrees in the appropriate direction and then add a raycast script to the child. In the BehaviorParameters script on the agent, check the box "Use Child Sensors." This way, the agent will use observations collected by its children too.

@andrewcoh Thank you so much, it made things so much easier

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GeriBP picture GeriBP  路  3Comments

Hongsungchan picture Hongsungchan  路  3Comments

GuntherFox picture GuntherFox  路  3Comments

jlanis picture jlanis  路  4Comments

green4you picture green4you  路  4Comments