Search Unity

How to create a room inside Cuboid ?

Discussion in 'Vuforia' started by fkcsarkis, Jul 30, 2019.

  1. fkcsarkis

    fkcsarkis

    Joined:
    Apr 24, 2019
    Posts:
    1
    Dear Unity Community,

    in the last weeks I´ve got a problem which won´t let me continue my project.
    I have a cuboid which is saved in Vuforia database and loaded in unity (Multi-Target + AR Camera).
    I´d like to make the cuboid work as a room, which allow me to place 3D objects inside. Currently I am not able to lay some room over the cuboid. The result is, that the cuboid is always been seen and sometimes it hides other 3D objects. I´ve made some investigation and found something on the net. Here is a perfect example on how to create a room, which is built inside the cube:
    https://www.androidcentral.com/site...es/2018/02/school_merge _6_.jpg?itok=ur4jIaTQ(244 kB)
    https://www.androidcentral.com/site...es/2018/02/school_merge _6_.jpg?itok=ur4jIaTQ
    As you can see, the cuboid is not seen, because another layer is displayed over the cuboid.And here you can see a screenshot of my current project:
    https://prnt.sc/om22ouI am using Unity 2019.1.10f + Vuforia 8.3. When I try to create a box, it just create a wall where i can not look through.I hope someone can help me out. That would be great.Thanks in advance and best regardsSarkis
     

    Attached Files:

  2. Sika_MC

    Sika_MC

    Vuforia

    Joined:
    Jul 17, 2019
    Posts:
    9
    Hi,

    In order to achieve the desired outcome you will need to play with occlusion. You will need to deactivate the MeshRenderer on the Multitarget->childtargets. ( ex. cube.left,cube.right, cube.etc, preferably through a script.

    In addition in my testing (using the Vuforia Core Samples) I noticed that after tracking is lost and re-established the Meshrenderer for the childtargets is being reactivated. Don't know if this happens only with the Core samples but the logic for your script should be done in accordance to the status of the tracking to avoid this kind of small hiccups.

    Good luck!

    Vuforia Engine Support
     
    fkcsarkis likes this.