Traveling between parallel universes has become more frequent in the recent years. Based on our research, the excessive and abnormal energy left behind of a jump between two universes attracts an exterritorial creature called YAMI who usually found in the void between dimensions. It was first discovered by our agent in Japan, hence the name, YAMI are generally not harmful to humans. However, the various energy they digested including ones that were from other universes might cause temporary imbalance which could lead to potential disasters. Your mission is to survey the area for YAMI and send them back to the void with our handheld device.
The alternative controller:
This is inspired by one of my favorite handheld electronic game called Treasure Gausts (トレジャーガウスト) and I thought it will work nicely as an AR experience on smart phones. I built a quick demo which allows the player to follow and capture a YAMI.
Demo Video: https://www.instagram.com/p/CgIHxNNAjcM/
STYLY demo: https://gallery.styly.cc/scene/0835a582-33fe-4413-bcd2-53e33a2f13c7
Now I want more game mechanics than just tapping on the phone screen.
After a few quick sketches, I went on to Thingiverse to look for a smart phone mount. I started out by modifying jakejake’s Universal Phone Tripod Mount (https://www.thingiverse.com/thing:2423960). The design of this mount is brilliant, and it holds up pretty well. I then built out the rest of device piece by piece. I wanted some kind of switch at the bottom of this device in order for the player to “send YAMIs back to the void”, like an action that the player can do to initial the send back. This reminds me of the Tenketsu (天穴, Heavenly hole) in the anime Kekkaishi (結界師).
I created a ring like contraption at the bottom of the grip. When a giest is weaken, the player pulls down the ring to initiate the interdimensional suction. For the rest of the inputs, I had originally wanted to use a Dual Button unit, but I found out they shared the same pin (GPIO36) with OP 90 unity on M5 FIRE.
The other game mechanic that I wanted to add to the controller is spell casting. I want magic rings! I quickly prototype some wearable rings with RFID embedded. The player has to choose which ring to use during the capture.
Development notes:
Left or Right of the forward vector:
This is one of those topics that sounds pretty simple at first but it take some advanced vector math to figure it out. The original solution was found here written in C#:
https://forum.unity.com/threads/left-right-test-function.31420/
using UnityEngine; using System.Collections; public class LeftRightTest : MonoBehaviour { public Transform target; public float dirNum; void Update () { Vector3 heading = target.position – transform.position; dirNum = AngleDir(transform.forward, heading, transform.up); } float AngleDir(Vector3 fwd, Vector3 targetDir, Vector3 up) { Vector3 perp = Vector3.Cross(fwd, targetDir); float dir = Vector3.Dot(perp, up); if (dir > 0f) { return 1f; } else if (dir < 0f) { return -1f; } else { return 0f; } } }I translated it line by line using Playmaker and it worked like magic.
Looping Audio in Playmaker:
Another one that sounds easy but takes some very specific steps to make it work in Playmaker. The best answer is from this thread:
https://hutonggames.com/playmakerforum/index.php?topic=5428.0