Search Unity

Physics issue after build

Discussion in 'AR/VR (XR) Discussion' started by PiersBishop, May 4, 2020.

  1. PiersBishop

    PiersBishop

    Joined:
    Mar 14, 2015
    Posts:
    4
    Hi there, I'll try and keep it short and to the point. Please tell me if this isn't on the right board so I canpost it in a more appropriate place.

    Context / Project
    I'm making a VR game. The main interaction is grabbing objects and throwing them around, nothing extravagant. The objects have rigidbodies and convex mesh colliders.

    Issue
    The game works 100% in the editor, but has issues when built. Most (but not all) of the grabable objects fall through the shelves, pedestals, or even default cubes, and through the floor after that. I have found no correlation, or common information, between which objects seem to fall through stuff and which don't.

    What I have tried
    Assuming it was a "first frame doesn't compute the physics the right way" kind of thing, I tried activating the gravity on the rigidbodies a few frames, even a whole second, after the start of the game, but the result was the same. I know it doen't "fix" anything but I thought it would be a good workaround. It's not. :(

    More Info
    I'm using Unity 2019.3.2f1 for this project, along with v2.5 (sdk 1.819) of the SteamVR plugin.


    If anybody has any ideas they might like to suggest, either as a solution or a workaround, please respond here. The project is now finished, but cannot be distributed because of this massive issue.

    Thank you
     
  2. PiersBishop

    PiersBishop

    Joined:
    Mar 14, 2015
    Posts:
    4
    I ended up figuring it out, so for anyone who ever ends up with a similar issue, here's the solution :

    The meshs used for the mesh colliders need to have a specific setting checked in the Import Settings : Read/Write Enabled.
    upload_2020-5-29_9-50-13.png

    Why there are no warnings anywhere about this, like there is for a similar parameter on textures, absolutely baffles me, but there you go !
     
    hessex likes this.