My how time flies in the summer. I've been out of town the last three weekends in a row, including the long 4th of July weekend, so I haven't had as much time as I'd like to work on VR development, let alone write a long blog post. Since my last post I worked on my Matrix chair a bit, splitting it into multiple parts rather than modeling a single shape. It took me a couple evenings to get where I am with it, but honestly I lost patience with it. It became clear that making the chair photo-realistic was going to be a real challenge for me without a lot of reward. Here's the state it's been sitting in for a couple weeks now.
I think it looks pretty good, but I was getting antsy to start something that could actually turn into a real game. Something that I'd want to share with the world. I began thinking about what kind of game I might like to make. My top two favorite games of all time are Halo and Ocarina of Time, so naturally I started there. The problem with a Halo style game in VR is that in my experience, First Person Shooter controls cause serious motion sickness. It's also too fast paced for virtual reality at this stage. Ocarina of Time seemed more interesting and has a slower pace, but I wanted to do something a little different. I had an idea.
What if instead of playing as Link, you played as Navi? What if instead of playing as Master Chief, you played as 343 Guilty Spark? This seemed to be much more compatible with VR input and it would be different. So I began prototyping.
I started out with a really simple sphere and tried to follow the pattern set forth by a space flight tutorial I was doing on Digital Tutors to get a view from behind my orb. It took a VERY long time to get the orb to lock perfectly to head movements. The problem I was running into was that while the orb was a fixed distance from the camera and orbited the origin correctly, it was not a fixed distance from the Oculus HMD in the game world. It turns out that the camera and HMD have different positions when you lean forward, backward, or side to side. After spending several hours wrestling with this problem, I did end up solving it… and promptly decided I didn't like it.
In case you're also struggling with this problem, here's how I solved it. In my Blueprint, I had a Camera centered at the origin and an Arrow pointing forward from it. I made sure the rotation and position of the Arrow lined up with the HMD with the following graph.
I suppose I didn't really need the arrow, but it helped me tremendously for debugging. Once the Arrow was positioned correctly, I updated the position of the orb (which was a static mesh) with the following graph.
This made the orb lock into the center of my screen, 50 cm away from me. It was exactly what I was trying to do, but the collisions were weird, having the orb swing around me was weird, and it felt weird to have something in the middle of the screen while I flew around. In short, I didn't like it and instead I'm planning to have a "first person" view where you see what the orb would see. It solves a bunch of problems.
After making that decision, I decided to model a nicer looking orb. Here's where I'm at with that. No idea how much I'll iterate on it from here, but it's a cool start. I'll add materials in Unreal Engine to bring it to life.
Thanks for reading!