You should now be able to grab that cube and pull yourself around.
Now attach this script to your and drag in your hands and set your steamVR actions, Now for that last option (ClimberHandle) create an empty and add a configurable joint to it, set your rigidbody to kinematic and set all the configurable joint linear drives to 5000.Īfter that try it out by creating a default cube and tagging it as Climbable. If (ToggleGripButton.GetStateDown (Hand.Hand)||abbing)Ĭ = ĬnnectedBody = GetComponent()
If (ToggleGripButton.GetStateUp(Hand.Hand)) If (Climbing & Hand = ActiveHand)//if is the hand used for climbing check if we are letting go. Public SteamVR_Action_Boolean ToggleGripButton ĬlimberHandle.targetPosition = //update collider for hand movment Now let’s create our main Climber script: using UnityEngine Now attach your script to both Hands and set the SteamVR input source to the correct hand.
#THE CLIMB VR VIVE PLUS#
Let’s call it ClimberHand: using UnityEngine Īll this does is tell our main script whether or not our hand is overlapping a climbable object plus giving us a way to access the hand gameObject. Just a note this builds upon my walking tutorial, if you don’t want to read that just attach a rigidbody and collider to your camera rig.įirst we create a script to attach to our hands to keep track of them. If that’s too much complication for you, copy and paste. It works is by checking if our hand is inside a grabbable object and we are grabbing and if it is, we move a kinematic empty with a configurable joint to the position of our hand and connect it to our camera rig and offset it by Our ActiveHand’s local position. My system uses tagged colliders so you can specify what parts of your models you can grab. (Or they just make everything climbable). Most VR games that include a climbing mechanic make use of a system where certain objects are grabbable and others are not. If you pay attention you’ll notice that things that look more climbable, are more climbable. The method I came up with was inspired by Apex Legends and how I imagine their clambering mechanic to work. (I personally want to do the real thing but I’m poor) But that’s enough of that let’s start coding. Rock climbing is one of those things like skydiving that people want to do, but don’t want to. If you have a VR headset, you have a climbing app. It seems like climbing in VR has become a given.