Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 2.75 KB

File metadata and controls

44 lines (29 loc) · 2.75 KB

CodeMiner Task

Try it on itch.io

Project Description

With this project you can walk in game world while walking in real life. Simulating the movement of a character/object correctly within a 3D environment based on coordinate changes obtained from GPS and location systems. The location that player's see in the project represents a real-world area of 10,000 m².

This is a Unity-based mobile application that creates an navigation experience using real-world GPS data. The project features a player character that moves and rotates smoothly on a 3D map based on the device's live location. It includes a functional GPS system that converts latitude and longitude into in-game coordinates, a minimap and a text that shows player's cardinal direction.

Features of this project

  • It updates your GPS data every 3 seconds, converts this data relative to the Unity world, and updates the position and rotation on the scene.
  • Smooth player movement and rotation based on physical movement.
  • Interactive minimap with live direction tracking (North, NorthEast, East, etc.).
  • User interface for monitoring GPS status, accuracy, and coordinates.

How it Works?

  • Initialization & Permissions:
    • Project opens with information panel about permissions.
    • If you agree, the GPS system initializes and attempting to access the device's location services.
  • Setting Spawn Point:
    • There is a arrow in the game map and it is the spawn point of the game.
    • Once the game is loaded, the player's position and rotation will be the same as the arrow in the level. It will be centered there.
    • System captures your initial GPS coordinates (latitude and longitude).
  • Position Update:
    • The system has an update loop that runs every 3 seconds.
    • On each update:
      • Data check: System takes user's new GPS data, including current latitude, longitude, and horizontal accuracy.
      • Converting Data: The new GPS coordinates are converted into a 3D position (X, Z) in the Unity world. This conversion uses precise geographical ratios (meters per degree) to ensure the virtual distance traveled matches the real distance you've walked.
  • User Interface:
    • Mini-map tracks the player's position and field of view from above and provides a live compass readout. There is a text under the minimap that shows player's cardinal direction (North, NorthEast, etc.).
    • The UI panels display all GPS data (coordinates, the accuracy of the GPS signal (in meters), and the system status).

Screenshots

Image

Image