Start a new topic

GameObject 'Trackable' changing camera position in game mode

 Just got Wikitude and I have been following a tutorial on youtube but I have come to a problem they didnt have.
When I use game mode the non-UI objects on screen disappear. They are still in the scene though and moving. I found out that in game mode my WikitudeCamera changes position to some crazy location. Through debugging and switching things off I have found this problem occurs when the Trackable object (child of InstantTracker) is active. Furthermore, deactivating the Behaviour script which is part of the prefab makes no difference.
Hence, I dont think it has anything to do with the script I wrote. Maybe its to do with the setup?

What might be going wrong here?

Hello Richard,

Could you please provide further details on the issue:
  • Which version of the SDK are you using?
  • Are you using the JS API?
  • Are you using any of our Extensions (Titanium, Cordova, Xamarin, Unity)? If yes, which version are you using?
  • What device does this happen with (os Version and model)?
  • Is this happening with the sample app or in your own app? If it happens with your own app, does the sample app work on your device




Sorry for the late reply. Ive been busy.

Wikitude 2.1.0 for Unity
I use C#
No extensions
Windows 10
It is my own script but closely based on a tutorial i saw on youtube.
I can get the sample app to run but nothing but a white image and gridlines appear on the screen



From your question I'm guessing you are using Instant Tracking. I will try to briefly explain what happens during runtime, but first I need to mention that tracking in the Editor isn't currently implemented and you need to build on a device to actually test.

There are three components that the Wikitude SDK controls at runtime that you need to be aware of. The InstantTracker controls the overall tracking, the Trackable controls what is displayed on the screen, and the WikitudeCamera controls how the virtual camera is positioned relative to the Trackable. In Unity, the Trackable is never moved in world space and the WikitudeCamera changes its position and orientation to match what the real camera is seeing. If, for example, you are tracking the floor, the Trackable corresponds to the floor and the WikitudeCamera corresponds to the phone.

As I mentioned before, tracking isn't implemented in the Editor yet, but there is still a simple simulation mode that approximates what happens during runtime. And that is why you are seeing the camera move, because that is what would happen during runtime as well.

To get it to work, I would suggest moving all your non-UI objects, which I assume are augmentations you want to display during tracking, as children to the Trackable object with a local position close to 0. You can also have the Tracker and Trackable at position 0, as it makes it easier to work with when everything is close to world space origin. When hitting play the WikitudeCamera will point to the Trackable object and you should be able to see your objects.

Best regards,


Login or Signup to post a comment