location = new AR.GeoLocation(47.77317, 13.069929); instead of location = new AR.RelativeLocation(null, -12, -20, -13);
Also, you need to ensure to use location nearby, otherwise it will not be renderred. You can also refer to this documentation and check the cullingDistance
Thanks
Eva
Hi,
I have a similar problem where AR.GeoObject does not behave relative to AR.GeoLocation. Instead, it continues to behave relative to my location. Here is my code:
var location = new AR.GeoLocation(12.68743737037239, -110.0108072183216);
//var location = new AR.RelativeLocation(null, 1, 1);
var geoObject = new AR.GeoObject(location, {
drawables: {
cam: videoDrawable
}
});
any pointers is appreciated.
Thanks.
Behdad
Hi Behdad,
When you are using GeoLocation then you must make sure that the latitude and longitude you are setting are pointing to a location that is near to you. I believe that you have not set these numbers correctly and this is why you are having issues. You can use this url http://www.latlong.net/ to help you get the coordinates of the position you specify.
Thanks
Eva
Hi Eva,
This is my entire code. The transparent video runs fine. The problem I am facing is that the video travels as I walk with my device. For example:
1) I place my device on the ground, the video moves to the ground. The correct behavior, I suspect, should be for the video to stay at the geo location I assigned it to and not move.
2) I walked 2000 meters away from the geo location and the video traveled with me and stayed the same size.
3) I walk to 8 meters of the geo location and the video travels with me, and is the same size. The correct behavior should be for the video to stay where it is and scale as I get closer or farther from it.
My Environment:
Cordova version 6.1
Wikitude Plugin 5.3.1
iPhone with iOS 10.1.1
My Code:
AR.context.scene.minScalingDistance = 1; AR.context.scene.maxScalingDistance = 10; AR.context.scene.scalingFactor = 0.5; var videoDrawable = new AR.VideoDrawable("assets/transparentVideo.mp4", 0.7, { offsetX: -0.2, offsetY: -0.12, isTransparent: true, onLoaded: function onLoadedFn() { videoDrawable.play(-1); //-1 : infinite loop } }); videoDrawable.play(-1); videoDrawable.pause(); // Create a button to open a website in a browser window after a click this.imgButton = new AR.ImageResource("assets/wwwButton.jpg"); this.pageOneButton = this.createWwwButton("http://www.amazon.com", 0.1, { offsetX: -0.05, offsetY: 0.2, zOrder: 1 }); // Latitude and Longitude are provided by www.latlong.net and iPhone compass var location = new AR.GeoLocation(33.688140, -118.012993); var geoObject = new AR.GeoObject(location, { drawables: { cam: [videoDrawable, this.pageOneButton] }, onEnterFieldOfVision: function onEnterFieldOfVisionFn() { videoDrawable.resume(); }, onExitFieldOfVision: function onExitFieldOfVisionFn() { videoDrawable.pause(); } });
I hope you find something in the above code that can help you solve this for me.
Thanks,
Behdad
The issue you describe is related to the location service. Appears as if your movements are not registered by the application's location.
You may test your experience using the Wikitude Application by entering the "Developer" section in the main menu, log in and scroll down to enter the path to your remote index.html file (Ensure to host content on https).
Also check out Wikitude Application's sample Worlds, like Wikipedia, so see if your movements are registered there.
Hope this helps
Hi Andreas,
Thanks for your reply. I will check that. In the meantime, what is the solution if my movements are not registered by the app's location?
thanks,
behdad
In case it matters, App's Location Service on my device is set to ON "While Using the App".
Location fetching is implemented in a common way in the samples.
Please have a look at the implementation of the SDK Sample application "Browsing POIs" and also test on different devices.
Hope this helps
FRY cedric