Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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.