Search code examples
google-project-tango

Using Meshbuilder with AR


Is it possible to use the Meshbuilder with the AR camera? I'm using the Meshbuilder with AR but I don't see the mesh. Breakpoint so show the mesh is being built. My theory is the projection used for the AR camera doesn't match what's used for the depth camera and meshing.


Solution

  • I'd say take the world position of the mesh transform and calculate its yaw and pitch against the cameras look vector - if that angle is bigger than fieldofview/2, then the mesh is offscreen, otherwise something else is wrong - and you can always do lookat(mesh.transform.position) as well