Log in or register to post comments

Problems deactivating AR from script

July 12, 2011 - 5:40pm #1

Hi everyone!

I'm currently trying to have the AR as an option for our game (for weaker phones) and I'm struggling a bit. This is what I've done so far:

In each scene I have an AR Camera and a Main Camera.

The AR Camera has the "camera" and "TrackerBehaviour" disabled by default.

When the game starts there is a test to see if the AR option is on or not. If the AR option is on, then we check to see if we are on Android or iOS. If we are on Android, we disable the Main Camera and turn on the camera and TrackerBehaviour components of the AR Camera (ir we are on iOS, we keep the main camera active and turn on the scripts from that Other SDK...)

Everything works fine if I turn on the Augmented Reality option, however if I disable it the level loads but the screen image is corrupted, off-color, and split up into six overlapping mirror images. I've attached a screenshot to show you what I mean...

Any idea what I'm doing wrong? Is it because I have both AR plugins (QCAR and that other one that runs on iOS...) in my project? Is it because I have two cameras in the same scene? Do I need to invoke a command from CameraDeviceBehaviour? Is there some documentation on how to turn QCAR on/off from inside Unity? Help me Obi-wan, you're my only hope! :-)

Thanks!

PS If I *don't* turn off TrackerBehaviour when I want to deactivate AR, I see a different type of corruption: my level appears in the center of the screen, but I see the phone's camera image appear in two bands on either side of the screen. Also, my avatar isn't visible (though the attached shadow is...weird).

Log in or register to post comments