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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Strange behavior of ArticulationBody.GetDriveForces when project has been built

Discussion in 'Physics' started by IngemarSkelanderHiab, Oct 27, 2022.

  1. IngemarSkelanderHiab

    IngemarSkelanderHiab

    Joined:
    Nov 15, 2021
    Posts:
    2
    Hi there.

    I'm having a strange problem with ArticulationBodys and the new inverse dynamics API.

    I am building a crane with stabiliser legs attached to the crane base. The crane base is attached to a truck that is the root of the articulation.

    Everything seem to work fine when running inside the editor, I get plausible force values on each joint, and the forces increase and decrease realistically on each joint based on the movement of the crane.

    The problem is when building the project. After it has been built, ArticulationBody.GetDriveForces returns much lower force values than when running inside the editor, and a lot of the forces values can swing to negative values when they absolutely should be positive.

    If I disable the stabiliser legs from the articulation and build the project, the remaining articulation behaves the same as when running inside the editor.

    I have attached a "very professional" sketch of the articulation setup.

    Is there any known limitations that might interfere with the way I have setup the articulations?

    Any help would be greatly appreciated.
     

    Attached Files:

  2. IngemarSkelanderHiab

    IngemarSkelanderHiab

    Joined:
    Nov 15, 2021
    Posts:
    2
    I have done some more testing and have discovered something. If i separate the stabiliser legs so that each has its own root, everything works fine. So the issue seem to be with having multiple trees of articulation connected to the same root.