Search Unity

Has anyone used AirSim in Unity? Having issues with collisions at high(ish) speeds

Discussion in 'Getting Started' started by paigepeck73, Dec 27, 2019.

  1. paigepeck73

    paigepeck73

    Joined:
    Apr 4, 2018
    Posts:
    6
    Hey all,

    I am stuck, and I could use some guidance. I have been working on a bug with AirSim on the Unity side ( https://github.com/Microsoft/AirSim/tree/master/Unity ) for the past couple weeks, and I have gotten nowhere. I thought I had a decent understanding of Unity, but this has made me question that.

    My issue is that at certain speeds and angles, the AirSim drone will fly through the ground and objects if it collides a few times. It does a stuttering type of movement then just goes through. I have tried MANY different things like messing with drag, the rigidbody, added RayCasts to detect the collision, etc. but I can't figure it out. On the Unreal side, the drone will almost slide across the object without going through, and I figure this would be a good thing to replicate on the Unity side. Any tips from people who have either run into this issue before or (even better) specifically used AirSim on the Unity side that can give tips on where I should look / what I should try. Thanks all!
     
    ynyn33301 likes this.
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
  3. paigepeck73

    paigepeck73

    Joined:
    Apr 4, 2018
    Posts:
    6
    Thanks for the reply! I should have put this in my original message, but continuous detection has already been turned on, and I have tried decreasing the fixed time step but it doesn't appear to do much for this specific issue. Got any other suggestions?
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    I'm not sure. It sounds like it at least does detect an impact at least once before pushing through, so you could try resetting the velocity to zero when that occurs, or not allowing the player to further tell the drone to go downward if within a certain distance of the ground? You could also try changing the physics material on the drone so it produces more friction.
     
  5. paigepeck73

    paigepeck73

    Joined:
    Apr 4, 2018
    Posts:
    6
    Thanks! I'll give those a try.
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    AirSim uses it's own physics engine, I helped to port the version from Unreal to Unity. There is an Airsim facebook group that is fairly active. Unfortunately I wouldn't know the answer to your question.