Rajawali / RajawaliVuforia

Rajawali + Vuforia Augmented Reality
Other
227 stars 108 forks source link

show multiple models with image multiple targets? #9

Closed Tommyx closed 11 years ago

Tommyx commented 11 years ago

I have two image targets and the corresponding models for the targets. But the renderer only shows one or the other. How to display em both if both targets are recognised?

@Override protected void foundImageMarker(String trackableName, Vector3 position, Quaternion orientation) {

            if(trackableName.equals("SengirVampire"))
    {

        enemy[0].setVisible(true);
        enemy[0].setPosition(position.x,position.y,position.z);
        sLight1.setPosition(position.x,position.y-5,position.z+5);
        sLight1.setDirection(position);
        enemy[0].setOrientation(orientation);
    }

    if(trackableName.equals("SerraAngel"))
    {
        enemy[1].setVisible(true);
        enemy[1].setPosition(position);
        sLight2.setDirection(position);
        enemy[1].setOrientation(orientation);
    }

}

MasDennis commented 11 years ago

Check this example: https://github.com/MasDennis/RajawaliVuforia/blob/master/RajawaliVuforiaExample/src/com/example/rajawalivuforiaexample/RajawaliVuforiaExampleRenderer.java

Multiple models are visible when multiple markers are visible.

Tommyx commented 11 years ago

Yes but there are two Frame Markers but only one TrackableMarker .. it's the case that if one trackable is found the other disapears & viseversa.

And how does Vuforia know where to put the objects for the frameMarker? what´s the image, this orange thingy? Is this standard or could i use any kind of quadratic image?

by the way thank you for your fast answer. =)

MasDennis commented 11 years ago

Not sure what the orange thingy is. Could you post a screenshot?

MasDennis commented 11 years ago

Closing this issue as stale. Please reopen if you still have this problem.