Log in or register to post comments

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 2, 2014 - 3:19am #1

Steps I've done:

1. Imported the image target samples

2. Tested with play mode and it works with teapot (fig. 1)

3. Tried to import 3D model and I see it in scene mode

4. In playmode I see only the teapot...

5. Tried also to create a simple Cube, but I dont' see in the play mode. (fig.2)

With Vuforia 2.6.x (not in play mode because I use the free version of unity) the above steps worked for me.

What I've miss? I've followed exactly the  "Compiling a simple project" sample.

Thank you !

AttachmentSize
Image icon fig1.png381.08 KB
Image icon fig2.png559.86 KB

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 4, 2014 - 9:55pm #8

Hi  dariocavada,

I get the picture. Cos I just update my unity to 4.3, with not  familiar for the child and parent in new method.

yes, I get it work.

Thanks dariocavada.

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 4, 2014 - 9:55pm #7

Hi  dariocavada,

I get the picture. Cos I just update my unity to 4.3, with not  familiar for the child and parent in new method.

yes, I get it work.

Thanks dariocavada.

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 4, 2014 - 2:31am #6

Hi Chew,

I've used many other objects and I've removed the if statement.

Now my code looks like the following and it works with all objects:

 private void OnTrackingFound()
    {
        isBeingTracked = true;
        Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
        Collider[] colliderComponents = GetComponentsInChildren<Collider>(true);

        // Enable rendering:
        foreach (Renderer component in rendererComponents)
        {
            component.enabled true;
        }

        // Enable colliders:
        foreach (Collider component in colliderComponents)
        {
             if(ImageTargetUIEventHandler.ExtendedTrackingIsEnabled)
                {
                    if(component.gameObject.name == "tower")
                    {
                         component.enabled = true;
                    }
                }
            else if(component.gameObject.name == "teapot")
            {
                component.enabled = true;
            }
        }

        Debug.Log("Trackable " + mTrackableBehaviour.TrackableName + " found");
    }

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 3, 2014 - 5:40pm #5

i m using unity4.3.2 with vuforia 2.8.7.

i face the same problem by only see the teapot. as what dariocavada do, for me it doesnt work..

1. i import the fbx done by blender.

2. i try to change the scripts as following:

else if(component.gameObject.name == "dinning")
            {
                component.enabled = true;
            }

my 3D object (dinning) is still invisible. even the tower...

there is any solution?

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 3, 2014 - 1:07am #4

Great.

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 2, 2014 - 5:07am #3

I've tried to copy the code, but there is another error, because the script depend on another script (ImageTargetUIEventHandler)

so I've simple added to ImageTargetTrackableEventHandler the following code:

 

  else if (component.gameObject.name == "cube")
  {
     component.enabled = true;
  }

 

because the name of my object is cube and it works. 

Now I've understood the underlying code. 

Thank you very much for your help!

Vuforia 2.8.7 - 3D Objects are not shown in playmode

January 2, 2014 - 3:35am #2

This is probably due to the new ImageTargetEventHandler used in the new sample in 2.8.7,

try replacing it with the a custom handler by copy-pasting the code from the DefaultTrackableEventHandler.cs

 

Log in or register to post comments