Is there a reason why Geolocation API isn’t working in Gdevelop?
When I checked if geolocation was in navigation it returned true.
But I haven’t been able to get the method navigator.geolocation.getCurrentPosition to return any useful coordinates.
I really don’t want to use Construct, so I’m hoping that I can get this to work.
I got it to work!
It only works on the exported version.
can you explain how it works or when I can read about it??
Cool, you know Js can be powerful in GD i use it too
What use want to do with Geolocation, a Niantic game like ?
How can i show the source code? I didn’t know it is possible
I’m building a GPS scavenger hunt and have been struggling to get this part of the project working.
I used the GeoNavigation API which is built into browsers. You can read about it here.
I shared a picture of my code. The top one is checking if geonavigation exsists in navigation. And it returns true. After this test I was pretty confident I could get it to work. The final one works on mobile because I added buttons instead of key presses to update the location and then a second button to print the text to screen. I have a scene variable called Scvar and a text object in the scene.
When the A button is pressed the geonav code gets the device’s location and stores it in the scene variable Scvar
I press Q to update the text object with the value held in Scvar.
Amazing bro I love your work i remember my first time with Vuforia in Unity it was so awesome feeling never crossed my mind the AR with GDevelop maybe we can establish it in GDevelop and make AR games possible.
would you mind sharing the json file??