Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Agents fly in the air sometimes

Discussion in 'ML-Agents' started by betike, Jan 2, 2021.

  1. betike

    betike

    Joined:
    May 28, 2019
    Posts:
    18
    Hello,

    Can someone explain why agents get off the ground sometimes? Is it because of too much velocity? I am using foodcollector example as base environment.

    I am using Unity version 2019.4.10f1 and ML-agents version 1.0.4

    Thanks,
    Happy new year!!
     
    Last edited: Jan 2, 2021
  2. seyyedmahdi69

    seyyedmahdi69

    Joined:
    Dec 2, 2020
    Posts:
    25
    Hi. Happy new year. depending on your script, you might wanna check if you're applying any force / making the agent move in the y axis when making a decision. also if the goal is not to fly off the ground, I would freeze rotation on x axis and z axis on the agent's rigid body, causing the agent only to be able to rotate on the y axis (turn left or right as opposed to up and down).

    freezing x and z rotation on the agent's rigidbody and checking the force applied to y axis in the script should fix the problem, unless there is some other factor that one would be unaware of.
     
    betike likes this.
  3. betike

    betike

    Joined:
    May 28, 2019
    Posts:
    18
    thank you for your answer !!