Trending
Opinion: How will Project 2025 impact game developers?
The Heritage Foundation's manifesto for the possible next administration could do great harm to many, including large portions of the game development community.
Featured Blog | This community-written post highlights the best of what the game industry has to offer. Read more like it on the Game Developer Blogs or learn how to Submit Your Own Blog Post
A summary of our livestream showing how to build a bow and arrow grappling hook for VR.
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!
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
If we hook a small object, bringing that object towards us instead of teleporting (as mentioned in Ben’s tweet)
Using an FOV limiter like in Eagle Flight to mitigate motion sickness.
Tweakable stopping distance to mitigate vergence-accommodation issues.
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!
Read more about:
Featured BlogsYou May Also Like