Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] VR Interaction Framework

Discussion in 'Assets and Asset Store' started by BeardedNinjaGames, Jan 28, 2020.

  1. ghafri

    ghafri

    Joined:
    Jan 12, 2020
    Posts:
    3
    Amazing Update! Solid work, although I added my own drawer interaction, I wanna ask does yours have physics interaction like when you apply force of pulling it towards you the objects inside the drawer move around?
     
  2. joz_nascimento

    joz_nascimento

    Joined:
    Oct 24, 2017
    Posts:
    29
    Great! I was trying make a drawer by myself, but i faced a bug. When i trying open the drawer in front of me, I jump into the drawer. You update came at a good time.
     
  3. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Weeellll.. Maybe I spoke too soon. The momentum seems to be working fine - try adding a Physics Material that has friction to your colliders to make the objects move along with the drawer. I also made the bottom collider of the drawer a little thicker to make sure items don't fall through.

    Unfortunately I'm seeing some weird issues on the Quest now, so I've disabled the drawer in the demo for now. It's still there in the scene, but the GameObject is disabled. If I pull up on the drawer handle, the items inside appear to have a force added to them, even though they aren't parented to the drawer. It's quite odd, and only happens on the Quest - Rift and S behave differently.



    @joz_nascimento to fix this, put the drawer on the "Grabbable" Layer, and make sure the Player and Grabbable Layers have collision disabled (Project Settings -> Physics -> Layer Collision Matrix). You generally don't want Grabbables to collide with the Player's Capsule Collider.
     
  4. FernandoXierra

    FernandoXierra

    Joined:
    Jan 12, 2020
    Posts:
    1
    Greetings,
    We have a problem with the teleportation system.
    When the player teleports there's a very annoying bounce effect. The camera goes up and down slightly and the experience becomes uncomfortable. The error is also in the demo scene and I can't find the solution.

    I hope you can help me correct the problem, thank you.
     
  5. ghafri

    ghafri

    Joined:
    Jan 12, 2020
    Posts:
    3
    I had similar issues before as you mentioned but with creating a custom joint helper script for the drawer I actually got it to work :)
     
  6. joz_nascimento

    joz_nascimento

    Joined:
    Oct 24, 2017
    Posts:
    29
    Worked fine. Thanks.
     
  7. ibompuis

    ibompuis

    Joined:
    Sep 13, 2012
    Posts:
    100
    Hi, nice Framework, possible to have "grab and move" (not climbing) functionality ?
     
  8. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Unfortunately no plans for that movement type at the moment.
     
  9. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Ah, I see what you mean. I have a fix in place now and will get a new version submitted. Send me an email if you need a patch sooner.
     
  10. LaCorbiere

    LaCorbiere

    Joined:
    Nov 11, 2018
    Posts:
    29
    Awesome update! Thank you.
     
    BeardedNinjaGames likes this.
  11. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Is there a slow motion when using weapons or just in general slow motion to add to combat type scenarios?
     
  12. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Right now I've just bound slow motion to the Y button, so you can press it at any time. I've found it useful for slowing down the game and testing physics interactions. Plus it's just fun :)

    There is a component on the Player called "Time Controller" you can use to slow / speed up time however you'd like. So if you only wanted it for weapons, or on an energy system, that would be easy to do. Just call SlowTime() or ResumeTime() as needed.
     
  13. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Just a quick update to everyone - I fixed the drawer issue I saw on the Quest. It works great now and I've spent a ridiculous amount of time on it o_O. Turns out drawers in VR can be tricky. I'm really happy with it now though - probably worth the price of the asset alone, hah!

    Anyways, I fixed that as well as an issue with the teleportation and just went ahead and resubmitted version 1.2 with those fixes. That means it'll probably push back when Unity approves this update, but I think it would be better to just go ahead and include these changes now.
     
    Last edited: Feb 21, 2020
    Mark_01, Abnormalia_ and BATTLEKOT like this.
  14. joz_nascimento

    joz_nascimento

    Joined:
    Oct 24, 2017
    Posts:
    29
    I say the same!

    For now, how can I get levers with more than 90 degrees? (-45 / +45)
    I tried to edit Hinge limits and Lever script but doesn't work. Percentage works fine and shows me that I dont reach 100% because rotate is limited 90 degrees.
     
  15. Sholms

    Sholms

    Joined:
    Nov 15, 2014
    Posts:
    84
    Hello, you have any video tutorials about how to create custom Ik hands / Body IK?
     
    Last edited: Feb 22, 2020
  16. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Should just be hinge limits and the lever script. I'm working on some door examples for next update, so should have some prefabs to work off of soon.

    For the hands / body IK you can mostly just replace what's there in the examples. I have a couple more core items to take care of for the framework, then will start doing more youtube videos on things like basic setup, hands / arms IK, and things like that. Don't quite have an eta for that yet, though.
     
    Mark_01 and sjm-tech like this.
  17. LaCorbiere

    LaCorbiere

    Joined:
    Nov 11, 2018
    Posts:
    29
    Hi there. How do you implement the Grapple script on something like a standard hand model?
     
  18. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    I'm not quite sure what you mean. Are you looking to make the Grapple script just a part of the player, as opposed to a Grabbable?
     
  19. LaCorbiere

    LaCorbiere

    Joined:
    Nov 11, 2018
    Posts:
    29
    Yes.
     
  20. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Each Grabber has a property called "Equip On Start" you could drag one of the grapple objects into. Then on the grapple gun you can set "Can Be Dropped" to false. Now the player will start with that object equipped, and will not be able to drop the item, so it will always stay on.

    @everyone - If anybody has an HTC Vive, or Windows Mixed Reality headset (or really any other OpenVR supported device), please message me as I could use a bit of help testing this on those devices. Thanks!
     
    ibyte and LaCorbiere like this.
  21. threebeerhonesty

    threebeerhonesty

    Joined:
    Feb 9, 2019
    Posts:
    9
    Oh my lord I wasted WAY too much time troubleshooting this and should've came here first. For anyone else coming across this at the moment the new Oculus XR plugin will crash the editor if you don't disable these two prefabs if you try to use the oculus link with the quest like you do development on the rift.
     
  22. LaCorbiere

    LaCorbiere

    Joined:
    Nov 11, 2018
    Posts:
    29
    Excellent thank you.
     
    BeardedNinjaGames likes this.
  23. Juanola_

    Juanola_

    Joined:
    Sep 29, 2015
    Posts:
    38
    Hi! Really great asset. I just dowloaded the demo inn my Quest and I loved it!

    Does the framework work with other platforms (Any HTC device or WMR)?
     
  24. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Awesome, glad you are enjoying it! I am currently testing HTC Vive and WMR right now. I'm using the new XRInput system, coupled with the Oculus Integration.

    That should be in v1.3. Right now v1.1 is published and v1.2 is being processed by Unity, and should be available some time this week. I'm also looking for testers for the Vive and WMR if you know anyone interested.
     
  25. LaCorbiere

    LaCorbiere

    Joined:
    Nov 11, 2018
    Posts:
    29
    Just trying out the Hand Tracking Demo and the Quest is saying 'Controllers Required' when starting the app. Anyway round this?
     
  26. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Check OVRManager (on "OVRCameraRig " GameObject) and make sure the "Hand Tracking Support" is set to "Controllers and Hands".
     
    LaCorbiere likes this.
  27. LaCorbiere

    LaCorbiere

    Joined:
    Nov 11, 2018
    Posts:
    29
    DOH! Thank you.
     
    BeardedNinjaGames likes this.
  28. RegisVe

    RegisVe

    Joined:
    Mar 2, 2018
    Posts:
    34
    Hi, I was wondering if the asset has a dial example? i.e. something you can rotate which would emit events at a given threshold(s).?
     
  29. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    No dial example, yet. I'm currently working on doors / hinges, so I should be able to have an example like that relatively soon.
     
    EN_Games and LaCorbiere like this.
  30. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    What about when your about to grab something like a door handle or anything you want to interact with and it makes that game object highlighted so you know it can be interacted with? So some sort of invisible trigger you can set the range so as you walk close to it it makes the object highlighted then as you walk away out of the trigger it turns off etc.
     
  31. EstudioVR

    EstudioVR

    Joined:
    Jul 26, 2013
    Posts:
    127
    I use this for highlight an object. Works very well https://assetstore.unity.com/packages/tools/particles-effects/highlight-plus-134149
     
  32. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Yes, you can do this, and there are examples included : GrabbableHighlight and GrabbableRing. With the GrabbableRing, the rings fade in when the user is within grab range, and highlight in color depending on if a Grabber is over it.

    It's also quite easy to implement your own behavior if you want to use a highlight asset or your own solution.

    Just use the events like so :

    Code (CSharp):
    1. public class GrabbableHighlight : GrabbableEvents {
    2.  
    3.     // Item has been grabbed by a Grabber
    4.     public override void OnGrab(Grabber grabber) {
    5.         UnhighlightItem();
    6.     }
    7.  
    8.     // This is the closest grabbable but wasn't in the previous frame
    9.     public override void OnBecomesClosestGrabbable(ControllerHand touchingHand) {
    10.         HighlightItem();
    11.     }
    12.  
    13.     // No longer the closest grabbable
    14.     public override void OnNoLongerClosestGrabbable(ControllerHand touchingHand) {
    15.         UnhighlightItem();
    16.     }
    17. }
     
    EN_Games likes this.
  33. threebeerhonesty

    threebeerhonesty

    Joined:
    Feb 9, 2019
    Posts:
    9
    If anyone gets stuck changing scenes (hanging, etc) I wasted way too much time figuring out that you need to split the android application binary into an extension if your app is > 100MB. Couldn't seem to find this info anywhere so perhaps this helps someone avoid the confusion. It's in the project settings under Publishing Settings.
     
    atomicjoe likes this.
  34. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Just wanted to post a quick update here - I've been successful in getting this to work with HTC Vive / WMR / OpenVR headsets. So just need to polish some things up before releasing that into the wild. I think that will make this package invaluable, as making cross-compatible VR apps is really challenging right now.

    After that update is in, I'd like to focus a bit more on getting some solid tutorials and videos up. There is a solid core to build apps off of (and a million features I'd love to add), but I've gotten a lot of requests for tutorials lately, so I think that is worth prioritizing.

    Also, there is now a Discord server you are welcome to join :) Come by and drop some feedback, submit bug reports, ideas, anything really. Already have some super helpful community members there. Come say hi!
     
  35. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    128
    By cross-platform you mean native supports for SteamVR and/or Unity XR or its still be based on Oculus SDK only and just will work on other devices as well ? If you mean 1st option it would be really fantastic to make abstract that framework platform independent and still have all this cool features!
     
  36. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Good question. The package will still require the Oculus SDK - this is primarily to support things like Oculus Quest Hand Tracking as well as use the rigged hand models that package provides. OVRInput also has some built-in cross-compatibility support which is nice, but the main reason for requiring the SDK right now is for the hand support.

    I am adding some Unity XR Input support alongside this. So if you want to use XRInput, Tracked Pose Driver, the new XR rig, etc you can use that, but you don't have to. That would mostly be useful for those integrating this with their own custom setups, or just really want to use the XR rig. One of the nice things about having the interactions separate from input is that this framework can pretty easily integrate with just about any type of input : Hand Tracking, Haptic Gloves, Image Tracking - no problem.

    Later on the Oculus Integration Package may become optional, but for now I think it provides a lot of value, and I can't think of a good reason not to use it, as long as we can still support OpenVR and UnityXR easily.
     
    Abnormalia_ and LaCorbiere like this.
  37. Abnormalia_

    Abnormalia_

    Joined:
    Jul 23, 2013
    Posts:
    128
    I see, you have correct vision. Its good to have layers separated from start, more I work with this framework more I like it. I have nothing against Oculus SDK, on contrary its solid VR SDK compared to other ATM. Just ability to have 1 high level framework that and be able to switch low level VR SDKs like Oculus, SteamVR and XR etc easily would be ideal for me (nd I assume for many others too). I Framework to rule them all ! :)
     
    Last edited: Mar 2, 2020
    seldemirov likes this.
  38. ZealousAppex

    ZealousAppex

    Joined:
    May 3, 2015
    Posts:
    17
    I would love to see a video of how to create the hand poses, is it possible to pick up an object like a brick at different rotations do the grab animation without the object changing rotation or position?
     
    sjm-tech and EN_Games like this.
  39. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
    Hello!
    I just bought the package and getting many errors regarding rings:
    NullReferenceException: Object reference not set to an instance of an object
    BNG.RingHelper.Update () (at Assets/BNG Framework/Scripts/Helpers/RingHelper.cs:105)
    about 65 same errors... what is wrong? its the demo scene.
     
  40. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hi there, if you're getting an error on UI Text components then I would say you probably don't have the Unity UI package installed : Window -> Package Manager -> Unity UI. I'm not sure what may have caused your project to not have that package installed. Also make sure to import the Oculus Integration Package if you haven't already done so.

    Yes, definitely working on a video for hand poses. I'm reworking how some of the grab positioning works, so I've postponed the video for a bit so I can include that. Will post an update here once I get to a good point.
     
  41. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
     
  42. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
     

    Attached Files:

    Last edited: Mar 3, 2020
  43. amit-chai

    amit-chai

    Joined:
    Jul 2, 2012
    Posts:
    80
    I see now its required to have 2019.3 so I am updating.
     
  44. rafattacks

    rafattacks

    Joined:
    Jan 14, 2019
    Posts:
    1
    Hi, I tried making a new scene with my own tenpin bowling assets. Are we allowed to put out own assets with your assets? Or can we only use the assets provided in the demo?
     
  45. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Looks like there were some issues with the UnityUI package in some Unity versions. That link may have a fix if you're still running into issues in 2019.3.
     
  46. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    You can certainly use your own assets. I would put them into their own scene so that any future updates don't overwrite any changes you make (i.e. don't put your changes in the included demo scene). If you want to make your assets interactive then just add the Grabbable script, and make sure it has a collider and rigidbody.
     
  47. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    Do you know if this fix is already available through the asset store? I am in the process of reviewing whether or not to use this possibly very useful package, and as we want to have drawers in our environment it would save us some time to figure out why the erratic ball behaviour occurs :) I have downloaded version 1.2 of february 25th; in this version we still see this erratic behaviour on objects inside the drawer.

    Edit: the erratic behaviour only seems present when running the scene in the editor. When running a build all seems fine :)
     
    Last edited: Mar 4, 2020
  48. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Hi @BeardedNinjaGames !
    I'll be starting VR development for the Quest imminently and your framework couldn't be more on point!
    I just want to let you know that the cross-VR device compatibility is the most interesting feature of your framework and the one that closed the deal for me.
    Unity is going in that direction (supposedly) with the XR Manager, but I fear it will not be enough and will take a long time anyway, so your framework will easily become a must have for any VR developper if you manage to make it easily cross compatible between devices :)
    I would rather develop my game a single time and deploy on Quest, Rift and Vive! :p
     
  49. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    I see you mentioned the editor issue - yes, that is quite a weird one. In the Quest build and PC build the erratic behaviors shouldn't be there - only when running in the Editor. However, I am currently working on another method of grabbing the drawer (as well as doors and levers) and am hoping to have that in v1.3. It's a little bit more complicated to setup, but is more stable. The idea is to use a dummy object that you hold on to, and then the drawer uses forces to move towards that dummy object.
     
  50. jorrit-de-vries

    jorrit-de-vries

    Joined:
    Aug 7, 2009
    Posts:
    71
    Do you have an estimate when v1.3 will be available?