Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Feature Request Option to disable rotate with player on Raycast sensors

Discussion in 'ML-Agents' started by bornacvitanic, Jul 30, 2021.

  1. bornacvitanic


    Feb 28, 2017
    Would it be possible to add a checkbox, same as on the grid sensor, to ignore the agent rotation for raycast sensors?
    My agent needs to sense enemies with raycasts, for which his rotation does not matter because the attack direction is defined by the mouse position. His rotation matters for other actions like interaction.
    I currently made a KeepStartRotation script which takes the global rotation at start and sets it each frame for the child gameobject which carries the raycast sensor. If I saw correctly the Grid sensor does a similar thing, but sets the rotation to Quaternion.identity each frame.
  2. ruoping_unity


    Unity Technologies

    Jul 10, 2020
    This should be fairly easy to implement. I've added this feature request to our lists and hopefully we can get it out soon.