Search Unity

Physics messed up with cardboard scene

Discussion in 'AR/VR (XR) Discussion' started by tosi, Jan 12, 2016.

  1. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    I am in the process of putting together an app using the Google Cardboard SDK. The user will be able to use the app with or without cardboard. So, there is a switch button inside the app, that activates and deactivates stereo rendering. The app also uses the Vuforia SDK to track image targets. If a specific target is recognized, some 3D objects above the target and a particle system starts to emit particles.
    Everything works fine in non-stereo mode. Particles are emitted and falling correctly as intended. They should simulate snow. Also if the user turns the image target to an angle, the 3D objects above fall down.
    When switching to stereo mode, the physics are messed up completely. The snow particles are not falling anymore, they seem to "teleport" around the screen. Also the 3D objects do fall upwards, with a really heavy negative gravity. Timescale seems multiplied several times, but is not - I double checked that. Gravity also does not change when switching between non-stereo and stereo rendering.
    Everything works fine in Unity Editor in both modes. It only appears on the device, which is an iPhone 5.
    Cardboard SDK is version 0.52, which is the newest.
    Vuforia is 5.0.10, which is the latest version.
    Unity is version 5.3.1 (Pro).

    I double checked gravity and timescale, which are not changing when switching between modes. I have a hard time figuring out what might cause the physics to mess up.

    Any help is highly appreciated.
    Thanks in advance.
     
  2. tosi

    tosi

    Joined:
    Jul 5, 2012
    Posts:
    45
    I managed to get my setup right again. Unfortunately I did not find the source of the weird behavior. But By deleting the Vuforia Prefab and the Cardboard Prefab and adding them again to the scene, the problem was solved.