I don't know what I am doing wrong, but I can't get AR objects to stick to a location. I am using the example 7.6 of the sample app as base code (the one where we show an earth model), using Cordova.
I tried using both RelativeLocation, but no matter what I do, the object always follows me. If I use GeoLocation, the object size won't change with distance, unless I close and reopen the app. Also, the object still moves around.
This should be something simple to implement with wikitude, so what am I missing?
Are you using Android? In that case, you need to provide with a location strategy as described in details here https://www.wikitude.com/external/doc/documentation/latest/android/setupguideandroidlocation.html#location.
As already stated, you need to make sure that the GPS provider is accurate enough and also make sure to calibrate your phone before start testing. Note that the distance calculation highly depends on the accuracy of your LocationProvider implementation. I recommend using GooglePlay Location Service to not rely on a manual GPS fetching approach.
I already tried the GeoLocation, it does not stick. I was outside, not inside, and in an open area.
How do I change the GPS provider?
If you are using RelativeLocation then the default behaviour is that the AR object will follow you. The RelativeLocation shows the objects relative to the user's location. So every time you (as a user) are moving, your location is updated and the object stays close to you.
If you want the object to be stick to a specific location then you need to go with GeoLocation.
Also, when testing with GeoLocation features please keep in mind that the results could be greatly influenced by these two factors: