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.

using Camera Culling masks with ARkit

Discussion in 'AR' started by sahArt, Oct 20, 2017.

  1. sahArt

    sahArt

    Joined:
    Aug 17, 2013
    Posts:
    11
    I have been trying to implement culling masks to my model with the ARkit plugin, I have managed to set up the model using the standard UnityARkitScene, but for some reason when I deploy my own script to switch between different layers, the model moves to a new location in the AR scene every time I switch off layers in the program.
    I am using the UnityARHitTestExample script to position my model in the scene, but I cannot figure out why the position of the model changes when i run my own script below??

    this is connected to a button:
    if (siteModelVisible==false){
    cam.GetComponent.<Camera>().cullingMask = 1 << 10| 1<< 11;
    }
    please could someone help me figure out why the model position in AR is impacted by switching off layers?

    Many Thanks
     
  2. sahArt

    sahArt

    Joined:
    Aug 17, 2013
    Posts:
    11
    Ok so it appears touching the screen to press the buttons was actually moving the model to the location of the buttons.