Search Unity

Issues with water in an AR environment

Discussion in 'AR/VR (XR) Discussion' started by kpegan, Jan 24, 2019.

  1. kpegan

    kpegan

    Joined:
    Feb 26, 2018
    Posts:
    2
    Hi all, I am currently working with Vuforia to create a scene which heavily uses water, and I am experiencing several issues which I am unsure how to approach.

    The main issue is that, since the scene is controlled by AR, instead of the camera moving around the scene it is the scene which moves around depending on the camera's orientation. For almost all objects, this is not an issue at all. However with water, due to the way the shader works, when the water object is moved / rotated it appears to be moving along with the camera.

    The intended effect I am looking for can be achieved by just rotating the camera around a static scene, but, due to the nature of AR, I am unable to keep the scene static, since everything needs to move in accordance with the image tracking.

    If anyone has any suggestions on how approach this, I am all ears! I have a feeling the solution would lie in editing the vertex shader (FXWaterPro.shader), but I'm not too well versed in vertex shaders, and also can't wrap my head around what I would even need to change.
     
  2. olivier1232

    olivier1232

    Joined:
    Jun 13, 2017
    Posts:
    2
    Same problem
     
  3. kpegan

    kpegan

    Joined:
    Feb 26, 2018
    Posts:
    2
    If you, or anyone else, is still looking for a fix to the problem:
    I was able to solve the issue by changing the world center mode setting on the Vuforia Behaviour Script from DEVICE to SPECIFIC_TARGET