I made a 3D Platformer in Unity where main character named Boy travels through different portals located on floating islands to find his dog named Doggo. The purpose of each level is to collect all cat-loaf (yeah, I like cats look like loafs and loafs look like cats) coins in order to open portal and travel to next level. When portal is open Doggo appears near it but as Doggo is very curious and always likes running from its owner Boy can’t catch it.
Click here or on screenshot to watch video:
!Important: this game requires support of AR so don’t forget to check if your device is supported or not here before build project and play.
Boy can run by moving joystick and jump by pushing jump button. The level can be scaled and rotated for easier and more comfortable playing experience. There are a few invisible checkpoints located in the level to save Boy’s position if he falls down.
It was a challenge to place a big scene in AR and make it not very difficult to travel through it. That’s why I decided to help player manipulate AR by scalling and rotating so basically he or she can just sit on the chair and play. No move around!
Second challenge was to make Boy always move and rotate in that direction a player wants. His movement is coordinated by AR camera like so:
Vector3 camForward = Camera.transform.forward; Vector3 camRight = Camera.transform.right; camForward.y = 0; camRight.y = 0; camForward = camForward.normalized; camRight = camRight.normalized; Vector3 horDirection = (Joystick.Horizontal + Input.GetAxis("Horizontal")) * camRight; Vector3 vertDirection = (Joystick.Vertical + Input.GetAxis("Vertical")) * camForward; _moveDirection = horDirection * 1f + vertDirection * 1f;
Implementation of rotation and the whole character script can be found in
All 3D objects (some of them I transformed for my needs) are made by different modellers from Sketchfab (all are CC BY 4.0):
Downtempo Maniac - Laidback Piano
Feel free to contact me if you have any questions/comments.
Thanks for attention!
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.