Quantcast
Channel: Questions in topic: "vuforia"
Viewing all articles
Browse latest Browse all 934

Combine Two or More Image Targets Simultaneously to Display a New 3D Object, Not Individually (Unity + Vuforia)

$
0
0
Hi all Unity, Vuforia, VR, and AR experts, I have asked the same question on the Vuforia developer forum and would love some advice: https://developer.vuforia.com/forum/object-recognition/combine-two-or-more-image-targets-create-third-3d-object Currently with Vuforia you can easily detect multiple image target simultaneously to display objects, but it's a one to one association. Meaning 1 image target will display 1 object upon detection, and the system can simultaneously detect multiple image targets, say 2 images, and display 2 separate objects. What I would like to accomplish is when 2 images are display at the same time, display a different object than that of object 1 (from image 1) or object 2 (from image 2) like in the following: if Image 1 is detected, then show 3D Object 1 if Image 2 is detected, then show Object 2 if Image 1 + 2 are both detected (at the same time), then show Object 3 It seems currently the way it works is if an object is found, display its child, which is the actual object. I thought I can make a list to capture when objects are found, and then look through the list for if all the image target names exist in the list then display the model (Object 3 in this case); however as I am doing it it doesn't make as much sense. Wondering if anyone know of a more elegant solution or any suggestions. Is this even the right idea? I am not much a developer, so any help is much appreciated! private void OnTrackingFound() { Renderer[] rendererComponents = GetComponentsInChildren(true); Collider[] colliderComponents = GetComponentsInChildren(true); // My addition: Declaring a list of strings List foundComponents = new List(); // Enable rendering: foreach (Renderer component in rendererComponents) { //My addition: Captured the names of the image targets that are found foundComponents.Add(mTrackableBehaviour.TrackableName); component.enabled = true; } // Enable colliders: foreach (Collider component in colliderComponents) { component.enabled = true; } Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found"); foreach( string component in foundComponents ) { Debug.Log( component ); } }

Viewing all articles
Browse latest Browse all 934

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>