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

Question Different physics in editor and build

Discussion in 'VR' started by X-TRI3, Jul 21, 2023.

  1. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    I have a vr game with gorilla tag based movement (using your hands to propel you) And everything is fine in the editor when im playtesting. However, when i build the game, in some parts of my map my body has a constant force pushing down on it? And if i try to move up i just get moved down. It never happens in the editor, so i dont know why it would do it in the build
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Is just just on quest native or also windows builds?
    Did you already check the logs for errors?
     
  3. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    I am building to the quest directly, so just apk. There are no errors or warnings in the logs either.
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    I suggest to test a windows build as well, to see if it's a build issue or android issue.
    And did you check logcat for the logs?
     
  5. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    Ok, I will test it on a windows build. When I installed unity though i didnt add anything but android sdk and the required components, do i need to install anything else? and does switching my project to windows change anything? I will make a backup just in case
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Use version control for backups
     
  7. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    I tested it when i built it to windows and it was fine. So the issue must be somehow with the android build, but i could not guess what it could be.
     
  8. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Did you check logcat?
     
  9. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    I searched it up but i do not know how i would access that if im playing it natively on the quest
     
  10. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Install the logcat package in unity
     
  11. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    I playtested the game and got errors in starting and exiting, they are as follows:

    Code (CSharp):
    1. 2023/07/22 17:26:18.419 11211 11234 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted
    2.  
    3. 2023/07/22 17:26:18.562 11211 11234 Error libprocessgroup set_timerslack_ns write failed: Operation not permitted
    4. (x16)
    5.  
    6. 2023/07/22 17:26:19.993 11211 11234 Error OVRMrcLib Unable to load OVRMrcLib
    7.  
    8. 2023/07/22 17:26:20.467 11211 11234 Error OVRPlugin [GetBoundaryGeometry] ovrpBoundary_Outer is not supported (arvr/projects/integrations/OVRPlugin/Src/Util/CompositorOpenXR.cpp:9360)
    9.  
    10. Exit:
    11.  
    12. 2023/07/22 17:28:27.932 11211 11211 Error BLASTBufferQueue [ViewRootImpl[UnityPlayerActivity]#0](f:0,a:1) Applying pending transactions on dtor 1
    13.  
    During the gameplay, I had no warning or error logs.
     
  12. X-TRI3

    X-TRI3

    Joined:
    Mar 29, 2022
    Posts:
    19
    Nevermind, I seem to have found the issue. I had not optimized the games fps for quest, and it was running around 30 before. Now it runs at 72, and there are no issues with the movement. Seems like the physics were tied to the fps for some reason. likely a lack of using time.deltatime.
     
    DevDunk likes this.
  13. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Then your code is setup poorly. If you use Movement data in Update() you might want to use DeltaTime to make it framerate indipendant