Every year Archer Group holds the Archer Open, where employees create their own mini-golf holes then compete for prizes and glory. Each year it seems that the holes get more intricate and creative. Since I’ve been getting into VR all year, I decided to create a virtual golf hole as part of my nefarious scheme to get everyone at the company to try VR (whether they want to or not).

Tools

For this project, I used Unity 3D, which is a popular game engine that has been used in the overwhelming majority of VR titles. For creating 3d models, we used Blender, which is a free, Open Source modeling program. Our VR headset is the HTC Vive. The Vive supports ‘Room Scale’ VR meaning you can walk around within a 6ft by 6ft volume, and you have 3d tracked controllers. VR systems like the Vive are able to report the 3d position and orientation of the controllers and your head with millimeter accuracy. I would be zip-tying a real golf club to a controller to help increase the sense of immersion in the virtual world.

Design

VR presents unique challenges not faced by other mediums. People can move around, but not very far. Typically with mini-golf people take a swing, walk to the place where the ball ends up, then take another swing until they score. That might present issues in VR, since you’d likely be able to hit it outside of your 6’x6’ box. Games typically solve this problem by allowing you to teleport to places outside of your reach. But this would require educating each user about the controls and brings us to the next design consideration: This event lasts about two hours and involves 70+ employees taking their turn at each of the 18 holes, which means each person is only going to get a couple minutes at most at the VR Golf Hole. So, this means we need to make speed a design goal. People will need to be able to put on the headset, figure out what they’re doing and do it in a short period of time.

To address these issues, I settled on having a golf course where you would not need to teleport to advance the ball — in fact, you would either score on each swing or not. Visually I decided on the theme of floating islands with floating rings in place of golf holes. If you miss, your ball falls into the ocean and you lose a swing. If you successfully get the ball through the ring, you win. As a side goal, I also wanted to make sure that the golf course looked great, since this would be many people’s first time using VR.

I played with the idea of doing multiple ring-courses, increasing in difficulty, but even just successfully hitting the ball through one ring proved challenging enough that it was unnecessary. Plus, expecting someone to complete a longer golf course in under a couple minutes wasn’t feasible.

Getting the physics right was my next challenge. Game physics is notoriously inaccurate and silly (just check youtube if you don’t believe me) and attempting to use ‘out of the box’ physics in unity was no different. Probably the worse issue was just that if you swing the golf club at a reasonable speed, it’s possible that your club may go right through the ball without even triggering a collision. So instead of relying on physics collision events, I do my own collision checks each frame. To determine how much force to apply to the ball on a collision, I use a combination of the club’s speed, the direction the club is angled and some other factors. This was a reasonable enough approximation to feel good and make good gameplay.

Next, I wanted to make sure that players had enough UI prompts that they could figure out what to do whether I told them or not. I used a combination of floating text saying things like “Pick up the golf club” and arrow lines to direct their attention where it was needed. I also needed to figure out what the states of the game were so that it could naturally know when one player was starting out and when they had finished their turn. So I split the game into several steps. First you have to pick up the club, then you take a bunch of swings until you either score or run out of swings, then you put the club back in a specific place. Figuring out the exact states of the game allowed me to figure out when to show the correct instructional text and ensured that the score would be reset for each new player, etc. In practice it mostly worked.

Addressing all these issues and settling on the final design ended up taking about a week with a decent amount of trial and error.

Here’s a video from the VR experience:

Lessons Learned

For the actual event I decided to be on hand to man the VR Golf Hole. For VR, it always helps to have someone to assist with putting on headsets and telling people where to look etc. Plus there are usually unforeseen technical issues. You should consider this a requirement if you’re looking to put on your own VR demo.

The biggest issue became immediately evident: people were accidentally knocking the ball off the tee quite frequently. When you’re wearing a VR headset, your Field of View is limited, and the most important side effect of that is you can’t see what’s at your feet unless you make an effort to look down. This lack of peripheral vision should definitely be taken into account when designing experiences.

People would knock the ball off the tee when they first picked up their golf club, and they would accidentally knock it off when the ball re-appeared after a missed swing. In retrospect, I could have mitigated this if I coded the game so that the ball would not appear until you moved your club out of the way. This shows the importance of user testing!

The other issue was that the hit box for the club was slightly bigger than the actual club, and a lot of people held their club right next to the ball before taking a swing, which lead to many accidental hits. This emphasizes the importance of getting measurements and scales correctly in VR. Even small discrepancies will be noticeable.

To roll with the punches, I made sure to warn each person about accidentally hitting the ball and offered extra swings to people who accidentally hit it.

Overall, people were pretty excited by the VR golf hole and the reaction was positive. We got everyone in the company to try it. One person had to abstain due to extreme motion sickness and we had only one instance of accidentally unplugging the headset with a wild golf swing, and no broken monitors or TV’s 😀

It did not win Best Hole, but it got a few votes and a lot of smiles. It also introduced a lot of people to VR for the first time. Here’s looking forward to next year. ⛳️

If you’re interested in designing for VR, you may want to check out this article:

Our past VR articles: