Now, I can turn on the cammera, but when I write the code from the video that you refer me, the image never appears, this is my code:
<script> loaded = false; function locationChanged(lat, lon, alt, acc) { if (!loaded) { var marker_image = new AR.ImageResource("elviolin.gif"); var marker_loc = new AR.GeoLocation(lat + 0.05, lon, alt); var marker_drawable = new AR.ImageDrawable(marker_image, 8); var marker_object = new AR.GeoObject(marker_loc, { drawables: { cam: [marker_drawable] } }); loaded = true; } } AR.context.onLocationChanged = locationChanged; </script>
<script> loaded = false; function locationChanged(lat, lon, alt, acc) { if (!loaded) { var marker_image = new AR.ImageResource("elviolin.gif"); var marker_loc = new AR.GeoLocation(lat + 0.05, lon, alt); var marker_drawable = new AR.ImageDrawable(marker_image, 8); var marker_object = new AR.GeoObject(marker_loc, { drawables: { cam: [marker_drawable] } }); loaded = true; } } AR.context.onLocationChanged = locationChanged; </script>
Hi Eva, Thanks for help me. I need to do something similar like Pokemon Go, when a pokemon appears. I mean the next:
1. Start the camera.
2. Put an image in the center of the device screen.
3. When I move the camera, the image should be apper or disappear, depending on the movement.
I try to use ezar, an other technologies, but I can not do it. So, I'm trying using wikitude.
Luis Sánchez
Hi.. I am a beginner with wikitude.
I need to start the camera, how can I do it?