Fallout VR is one of the biggest AAA game announcements for VR yet! With the game launching soon, the FusedVR team decided to build a prototype of the VATS mechanic. Slow time. Line up your shots. Enjoy!
Before we dive into the details, let’s clarify our prototype approach.
Slowing time can be accomplished by changing the Time.timeScale value. We called ToggleVats on the press of the touchpad and learned a timeScale value of 0.05f-0.1f works great for VATS.
The next challenge was highlighting body parts. That’s where VRTK, a Unity VR interaction toolkit developed by the Stone Fox, really shined. To summarize, all we really had to do was add the VRTK_InteractableObject component to a GameObject and call ToggleHighlight at the right time. Check out our video for a step-by-step walkthrough.
Shooting bullets required spawning a GameObject and adding a force. To get Bloody Mess to work, we created a basic rig then applied an explosion force at random if a bullet hit. For a complete VATS implementation, only colliders on the targeted body should be subject to the explosion force.
We used the default code for adding an explosion force, which you can find on Unity's online docs. Configuring the explosion force depends on the rig and rigidbodies you use but, once you’re set, the results look great!
If we kept working on our prototype, we’d consider explosions, bullet trails, and more physics tweaks. We would also give the percentage system a try. Originally, we believed the percentage system would remove the joy in lining up a shot. Why aim only to miss?
On second thought, the percentage system definitely adds valuable suspense. If you want to try a percentage system, here’s a simple approach:
Our prototype was further evidence of a lesson we’ve seen over and over. Playing with physics and time in VR is a very simple way to create a fun experience. We’re not sure why but we have some guesses:
It’s never easy to take on a beloved mechanic, but the process is a blast! Check out our tutorial, share your thoughts on how VATS should work in VR, and let us know if you create any extensions so we can showcase your work. Happy building!