Tutorial Recap: Grappling Arrow Live Stream

Vasanth Mohan
FusedVR
Published in
3 min readMay 31, 2017

What do you get when you cross a bow and arrow with a grappling hook in VR? A super exciting way to move around a virtual environment! Huge shout out to Ben Lang for mentioning this idea on Twitter!

Implementation

In the past, we made a tutorial on how to implement your own bow and arrow with the HTC Vive. But to speed up implementation of this mechanic, we looked to the SteamVR Interaction System, which includes an open source, highly polished Bow and Arrow that happens to also have been used in The Lab.

Bow and Arrow from The Lab

Using this as base, we simply needed to tweak their implementations by adding some C# events that we could listen to in the Arrow.cs script.

3 lines of code added to Arrow.cs
Screenshot of Line Renderer

With these events called in the right place, we could then write our own script to listen and handle the behavior of our grappling hook. Specifically, when the arrow is released, we want to start drawing the line for our chain. And when the arrow lands, we want to teleport along the path the arrow took. To do this, we created a Line Renderer for each arrow that is released and every frame we add the position of the arrow to the Line Renderer, so that it can appropriately draw the chain

And 50 lines of code later, we are now able to teleport anywhere in our scene!

Hooking from Tree to Tree

Future Improvements

  1. If we hook a small object, bringing that object towards us instead of teleporting (as mentioned in Ben’s tweet)
  2. Using an FOV limiter like in Eagle Flight to mitigate motion sickness.
  3. Tweakable stopping distance to mitigate vergence-accommodation issues.

To Conclude

Of course, this movement scheme is not for the faint of heart. But if motion sickness is not a factor for you, then by all means have fun pretending you are the Green Arrow as you move around the forest! Something I also learned on Twitter is that an FOV limiter will not mitigate eye strain issues from quickly moving to big objects, which is a result of the vergence- accommodation conflict. So that is another thing to keep in mind if you easily get eye-strain in VR.

If you are interested in building this for yourself, check out the edited recording of our live stream below, where we will be walking you through step-by-step on how to build it yourself.

Happy Building!

--

--