The VR Interaction Framework makes it easy to create your own interactable objects and be productive quickly.
Current features include :
Physical Grabbing and Throwing of objects with adjustable force and averaged velocities. Lots of customization options to work with.
Grabbable Events - Easily respond to events that happen to a Grabbable object, from player input to more advanced events like hovering or remote grabbing. Lots of examples are included to show you how to leverage this to quickly create your own interactive objects.
Buttons, Levers, Sliders, Joysticks, and other physically activated objects.
Teleportation, Smooth Locomotion, and Snap Turn examples.
Two-Handed Climbing : Use both hands to climb up any collider marked as Climbable. The character’s height is adjusted during climb so you can vault over objects more easily.
Bow and Arrow Physics (Arrows can be picked up and re-shot)
Gun Handling / Physics. Highly customizable with (optional ) physical interactions such as reloading, weapon charging, clip eject, and more.
Simple Damage / Health system .
Hand Jet (like a jetpack, but in your hands!)
Grappling Hook mechanic
Slow Motion : Affects the sound around you and works in conjunction with the weapon system. Great for testing physics as well!
IK Arm example
A basic Hand Tracking Demo : Pinch to pick up objects, or draw in the air using your fingers. Hand Tracking is still in Beta, so this is really meant as a quick place for you to get started experimenting with the feature.
There’s lots more to come. I’m just getting started
Looks solid, but lacks few features I’d like to see. Do you plan 2 handed grabbing support ? Shotgun like weapons support? More melee weapon support ? Maybe you have roadmap you can share ?
Yes, all of those features are planned and are in the works. I’m currently wrapping up UI and “Snap Zone” features, then will be looking at 2-handed weapons and hand poses.
I don’t have a roadmap to share just yet, as sometimes the plan changes. I am using the framework in professional projects, so some of these may get moved around or added to as the need arises.
Here’s a rough idea, though :
Higher Priority :
UI Examples (done)
Snap Zones / Inventory (done, but can be expanded upon in future updates)
Hand Pose support for Grabbables (done)
Better throwing forces (sometimes compound rigidbodies do weird things)
Two-Handed weapons - Shotgun (done) or Assault Rifle Example. Maybe a “Stretchy” gun
More Locomotion and Motion Sickness options
Medium Priority :
Rotatable Example (ex : a steering wheel)
Door with doorknob example
Desk Drawer with sound example (done)
Xylopohone (I mean why not?)
Third Person example
Nice to haves / somewhere down the line :
Melee puncture system - I’ve been playing a bit of Saints and Sinners lately and would love to implement a system like this. Super fun and feels great in VR.
Very simple Enemy with Ragdoll Example
Basic Multiplayer Support (via Photon, as that’s what I’m most familiar with). Don’t hold me to this, but I am keeping multiplayer in mind in general.
Did I miss anything?
Sure is! Pretty much just import the Oculus SDK then import the VR Interaction Framework and you’re good to go! Quest has a couple of extra steps since it’s Android. I updated the docs to reflect this as well.
Good question. The arm length doesn’t change, but the arms will move forward with the hands, so that you can have long or short arms. If you’ve ever used Unity’s stock IK system with VR you’ll quickly notice the hands won’t go far enough out if the character’s arms aren’t long enough. Either the hands don’t match the controller, or they break off at the wrists. Here I’ve set my controller down on my desk and walked back to show this exaggerated :
What I do is use Unity’s IK system, but then hide the character’s IK arms as I’m just using that for positional reference. Then I have the arms pieces attached to the hand models at the wrist and point towards the elbow, then the next piece start at the elbow point at the shoulder. I’d call this setup a “poor man’s arm IK”, but it’s actually pretty convincing and handles the condition where a user has really long arms, or sets the controllers on the floor, etc. If the hands are really far away you can disconnect the arms at the shoulder, or stretch the model :
In the above screenshot the right arm is disconnected at the shoulder, and the left is just connected via LineRenderer to fixed shoulder points. It looks kind of crazy in the editor view, but in person I think it works quite well.
I’d recommend trying out the demo on SideQuest (or APK here if you prefer) and you can see how it looks in person.
Another option would be something like FinalIK. I haven’t tried their setup yet, but it looks promising.
Hopefully that explains the idea behind it. Let me know if anything is unclear!
Hi there. Just purchased the Framework and built demo scene Quest and physics is very laggy. Timestep is set as per your documentation. Just can’t figure out why. Unity version 2019.3.0f6.
Hi there. The demo scene should be running ~72fps on the Quest. I would recommend disabling shadows, and setting Pixel Light Count to 1 (Edit → Project Settings → Quality). Anti Aliasing can be 2x or 4x. You might also try Single Pass vs MultiPass.
Give that a shot. If that doesn’t work then there may be something else going on.
Quick question, when I add an object into the scene and give it a grabbable, the object rotates 90 degrees and snaps in my hand, when I add a grab offset and make it grab correctly as I want it to and release, the released state make it go to the state before grab offset change where its in the 90 degrees state, how to fix that?
Hi ghafri, I believe you’ve found a bug in the rotation offset drop logic! When you release the object that offset should be reapplied, but it looks like it isn’t. I will get that patched for the next update. For now, instead of using Rotation Offset just rotate your model to face the direction you want it to be held in.
//disconnect all joints and set the connected object to null
removeConfigJoint();
So it should look like this :
//disconnect all joints and set the connected object to null
removeConfigJoint();
// If something called drop on this item we want to make sure the parent knows about it
// Reset's Grabber position, grabbable state, etc.
if (droppedBy) {
droppedBy.DidDrop();
}
First off, I just wanted to say that all of the support around this asset has been amazing. I’ve been in touch with a lot of great people who have provided invaluable feedback and encouragement. What an awesome community to be a part of!
While we wait for v1.1 to be approved by Unity, I thought I would post some more in-depth notes regarding this update, as well as some notes regarding wha’ts next in the roadmap.
Here we go!
V1.1 :
Added Snap Points. These allow you to snap grabbables to in place to a given trigger area. These are super useful and modular. In the demo I’ve setup a couple of examples on the player : holsters for weapons / items, (including shoulder slots), a backpack that demonstrates how you can scale items within snap zones, and the new shotgun has a few slots to put shells as well. You can configure what can and cannot be added to a snap point. You could use this for a weapon attachment feature, inventory, puzzles - all kinds of things. They seem simple, but I think this is a very powerful feature not to be overlooked.
Weapons can now be held with 2-hands. Added a pump-action shotgun as an example. I plan on expanding upon this in future releases with things like spread and weight.
Added a bonus Ammo Dispenser script. In the demo if you equip a gun you’ll see an ammo box show up on your waist. Grabbing this will dispense the proper ammo type depending on if you have a pistol or shotgun equipped.
Added a “Bullet Insert” component that allows bullets to be inserted directly into a weapon instead of by using a clip.
UI Example with sliders and scrolling. This currently relies on using the OVRGazePointer, but I’d like to expand on this to support dual pointers.
Better Arm IK : Elbows now bend a bit better.
Helper Rings can now fade out if both hands are holding an item.
Grapple Shot now pulls Grabbables to you. If the object is kinematic or static then you grapple to it.
Hand Collision : Make a fist or point you index finger to enable hand collision. This allows you to punch and poke objects. Check out HandCollision.cs for more info.
Added a Reset Button to the demo that will move all of the items back to their starting positions.
Added a couple of black pistols to the demo that have infinite ammo .
Miscellaneous performance improvements
Next up :
Add some Tooltips Objects
Simulate “Heavy Objects”. For example,if you grab the shotgun with one hand you can wave it around like it doesn’t weigh anything. I’d like to add a setting that allows the front end of a grabbable to lag behind a bit, simulating weight.
Hand Pose support with an example
Desk drawer or filing cabinet example with sound and haptics
Door with Hinge example
Those are the main items. I’ll post again once I see v1.1 has been approved.
Hello thank you for that. Gave it a go and still slowing down. Slows down almost exclusively when a collision takes place. ie: Pick up a pistol and knock over the cartridges or the initial grabbing of an object, it lags at those particular points. Looking around and movement is fine frame rate wise. Defo something to do with the physics I think. I am using the new XR Management system 3.0.5. That’s the only difference I can find between your set-up and my own. I can post screen grabs of my player and quality settings if you think that could help?
Hmm… I haven’t really used the XR Management system, but I suppose there could be some overlap / issues there. You may want to try a fresh project with just Unity 2019.2, Oculus Integration, and VRIF and then work your way up from there. I’m running it on 2019.3 just fine, but I have noticed 2019.2 to be a bit more stable.
If the slow downs are only happening during things like collisions, then there could be some errors being thrown that you’re not seeing when it’s running on the Quest. Try running the demo scene in the editor, move / bump some things around and see if any errors come up. Maybe a collision sound is trying to play but the audio spatializer plugin isn’t working quite right or something like that.
Are you using any of the rendering pipelines - URP or HDRP? I’d also try upping your physics timestep back to 0.02 just to see if that makes a difference. Lastly, you can always run the profiler to see what’s taking up all that time during physics interactions. Just keep in mind that your game will run a little slower when the profiler is running and game window isn’t maximized.
Also, feel free to email me at beardedninjagames@gmail.com with any screenshots or info and we can continue this conversation there if you’d like.