Search Unity

[RELEASED] VR Interaction Framework

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

  1. al3d

    al3d

    Joined:
    Feb 7, 2013
    Posts:
    51
    Hi sorry if my english is not perfect im french
    I tried the vehicle example scene on my oculus quest and I find there is a grip problem it like the ground is in glace
    How I can change the grip of the car ?
    Also when I drop the accelerator when the car is moving it doesn't follow the direction of the wheel
    Please help !
     
  2. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hey there. Regarding your first question, the vehicle uses Unity's Wheel Colliders to move around. They each have their own friction properties you can adjust. Some good info on that here : https://docs.unity3d.com/Manual/class-WheelCollider.html

    As for the accelerator, I'm only sending torque / steering wheel input while grabbed. My reasoning was that if the user lets go of the steering wheel the car should come to a stop / stop steering (in case the user is getting motion stick). I can update that with an option to keep steering, though.
     
  3. al3d

    al3d

    Joined:
    Feb 7, 2013
    Posts:
    51
    Thanks for the answer :)
    For the accelerator if you can update with an option to keep steering that would be great! I make a racing vr game and your script are the best
     
  4. al3d

    al3d

    Joined:
    Feb 7, 2013
    Posts:
    51
    Another question when I brake with the left trigger it doesn't stop quickly how can I change this parameter? thanks
     
  5. Tomza

    Tomza

    Joined:
    Aug 27, 2013
    Posts:
    596
    Hello,

    I'm asking about the custom hand IK. The left one has no animated fingers. I cannot move my fingers; it is clenched into a fist.
     
  6. dfusco420

    dfusco420

    Joined:
    Jan 12, 2020
    Posts:
    2
    Hi,

    Absoultely love your asset it has been a game changer for me. The downside is that my networking knowledge is kind of slim... I see that both players sync but that grabbables only sync for the host. Any tip on how i can make it sync for both? Like if the person that isnt the host grabs a ball how can i make it so that the host sees it? You dont need to explain but maybe point my in the right direction?

    Thanks for your time :)
     
  7. dfusco420

    dfusco420

    Joined:
    Jan 12, 2020
    Posts:
    2
    Nevermind i figured it out!
     
  8. felixdios

    felixdios

    Joined:
    Feb 12, 2015
    Posts:
    1
    I need something simple, open a padlock with a key. or an object that reacts when entering with another. but I do not see an example or understand very well how vrif does it. a simple explanation or example possible? Thank you
     
  9. gamextar

    gamextar

    Joined:
    Jul 4, 2021
    Posts:
    9
    Hi, I've been trying to get VRIF to work with a moving object (vehicle) but the moving platform is really buggy as it moves faster than the player, this has been a problem with all the previous versions and still not fixed in the latest ... your vehicle sample only uses the barebones camera so is not possible to shoot or grab objects while you drive. Using the rigid body rig does not work either. Is there any way to make this work ? thanks
     
  10. MK1_Dev

    MK1_Dev

    Joined:
    Sep 7, 2018
    Posts:
    104
    Hi. I am using the steering wheel and would like to be able to drop the players hands from the wheel via script when the player chooses to drive in third person. Is there a way to drop the hands via script? Cheers.
     
  11. Bones888

    Bones888

    Joined:
    Jun 4, 2017
    Posts:
    5
    I was having an issue with SoundOnUnsnap playing on scene start, only when I had sounds for both SoundOnSnap and SoundOnUnsnap.

    I fixed this by using the same check on Time.timeSinceLevelLoad
    Code (CSharp):
    1. if (SoundOnSnap)
    2.                 {
    3.                     // Only play the sound if not just starting the scene
    4.                     if (Time.timeSinceLevelLoad > 0.1f)
    5.                     {
    6.                         VRUtils.Instance.PlaySpatialClipAt(SoundOnUnsnap, transform.position, 0.75f);
    7.                     }
    8.  
    9.                     Debug.Log("For UNSNAP sound, time since LevelLoad is " + Time.timeSinceLevelLoad);
    10.                 }
    Sharing this in case others face the issue
     
  12. RyanEville

    RyanEville

    Joined:
    May 22, 2014
    Posts:
    1
    Really enjoying this package great work! I am having an issue when I am jumping the red dot laser and muzzle point move above the barrel of the gun.
     
  13. SachinGanesh

    SachinGanesh

    Joined:
    Jun 28, 2015
    Posts:
    20
    Hi, Does this package works with HTC Vive Focus?
     
  14. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hi there. You can use the vehicle with a player, you'll just want to make sure to remove the CharacterController / Locomotion components, and then parent the player to the vehicle. That way your vehicle essentially is the player. Otherwise the player controller / physics will fight against the vehicle's forces. You can still grab / shoot objects this way. If you want to be able to control a vehicle while also moving around inside of it, then you'll want to look more into moving platforms. That can get complicated pretty quickly, but the gist is that you want to add the vehicles force along with the player if you're using a rigidbody player. It really depends on how fast your vehicle is going, and what type of player controller you are using.
    Hey there :) You can drop any Grabbable item by calling the 'DropItem" method. Here is the signature :
    public virtual void DropItem(Grabber droppedBy, bool resetVelocity, bool resetParent)

    If you supply the "droppedBy" Grabber then it's relevant events (OnRelease) will be called. The other two you can set as false if you're not sure what they are :)

    Another way would be to just drop anything currently in the left / right Grabber by calling "TryRelease()" on them (leftGrabber.TryRelease()). Then it won't matter if they are holding on to a steeringwheel, stickshift, lever, etc.

    Ah, good catch! And "if (SoundOnSnap)" should be "if (SoundOnUnsnap)". I've got that fixed for next update. Thanks for sharing!

    Interesting. That could be an issue with how the laser is updated each frame (using Update vs. LateUpdate). I'll see if I can duplicate this on my end.

    I have not personally tried it, so I don't know how involved the set up is given it's an all-in-one device. There is an XR SDK for it. You may just need to install that SDK first and follow their instructions for deploying to Android. It doesn't sound very different from deploying to the Quest. One issue I see is that the Wave controllers have fewer buttons than touch controllers, so you may need to remap or remove some key bindings, depending no your application. I'm happy to help if you want to send me an email or pm me on Discord.
     
  15. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hi everyone! Version 1.721 has been submitted to Unity. This is mostly bug fixes and some quality of life adjustments.

    Here is the full change log :
    1. Updated EmeralAI integration for better limb damage support
    2. Fixed issue with Rigidbody player not moving with camera
    3. Fixed issue with Rigidbody player sliding a little bit after teleporting
    4. Better climbing / mounting support for Rigidbody
    5. Added player height calibration script. This is included in the vehicle example scene to set the player to a predefined height
    6. Added warning to Input Bridge if source is set to SteamVR and SDK or integration has not been enabled.
    7. Added "IsLocked" property to doors
    8. Added color coding to VRUtils / Logging tool (thanks @dorktoast)
    9. Fixed issue with left IK hand not animating
    10. Changed Lever Angle calculations to use Round instead of Floor
    11. Added "StartingItem" property to Snapzones, which is a little more descriptive than using HeldItem. (Thanks @harleydk)
    12. Snapzones now move an item to it's own position on Start, if "HeldItem" or StartingItem is not null
    13. PlayerTeleport script - The "ForcePlayerRotation" setting on teleport destinations now overrides the AllowRotation setting on the teleporter
     
  16. Discmage

    Discmage

    Joined:
    Aug 11, 2014
    Posts:
    60
    I have tried searching but couldn't find any specific answer...your asset looks great for controllers, but I was wondering if you have all the functionality you have but with hand tracking? I noticed you can use it for hand posing, but would like to make sure it supports that as well.
     
  17. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    I'm developing an app where the user can only move physically, so teleportation, quick turning, slow motion etc. needs to be disabled. How can I accomplish this in a "correct" way in context of this framework?

    I have already created and set a new ActionSet on the XRRig with the teleportation and slow motion actions removed, but somehow those actions still work in game.

    //Edit
    Furthermore I will implement a way to reset the users position to the center play area, to do this, should I translate the entire XR Rig root object, or just the PlayerController?
     
    Last edited: Aug 22, 2021
  18. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hey there. There is a hand tracking scene included (requires the Oculus SDK) that shows off how to use the pinch gesture to grab items or draw in the air. It's a pretty simple, but shows how to integrate the two. That said, my main focus has been on interaction with controllers, so if your main concern is hand tracking this may leave you wanting for a lot more.

    For the most part all of the components are optional / not required, with the exception of the InputBridge, and of course a Grabber if you want to pick stuff up. So if you don't want the player to rotate, disable the PlayerRotation component. If you don't want to move - remove the SmoothLocomotion and / or PlayerTeleport script. You can of course remove the component entirely, or create a new player prefab from scratch (I'd recommend modifying an existing one, and then saving it as a prefab in your own folder). The barebones player prefab only has an input bridge and a couple of grabbers, and is a great place to start if you're implementing your own player controller, vehicle, etc. If you still need room level tracking, where the player follows the camera, then the standard prefab player may be a better place to start.

    As for resetting the player's position, you'd want to move the player transform, not the whole rig. In the XR Demo example if you land on the red pad under the diving board / large building, it will teleport you to the start. You can take a look at that script to see how easy it is to move the player. You can do that on collision, trigger enter, take damage, etc. It uses the PlayerTeleport component to do the teleport, but if you have a basic rig setup then you can simply move the transform. Hope that helps :)
     
    garrido86 likes this.
  19. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    Thank you very much for your quick response, removing the components did the trick, although it still kinda counterintuitive that removing the actions from the used ActionSet don't have the same effect of disabling those features. But maybe those ActionSets have a different purpose than I assume.

    //Edit
    I don't see a samples folder, do you have a list of all the sample things I can remove? I only care about the raw framework, the hand models and nothing else :)
     
    Last edited: Aug 23, 2021
  20. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    So this is my teleport script and for some reason it only works once:

    Code (CSharp):
    1. public class TeleportPlayer : MonoBehaviour
    2.     {
    3.         [SerializeField]
    4.         private CharacterController characterController;
    5.         [SerializeField]
    6.         BNGPlayerController playerController;
    7.         [SerializeField]
    8.         private Transform cameraRig;
    9.         [SerializeField]
    10.         private Transform destination;
    11.         [SerializeField]
    12.         private bool rotatePlayer;
    13.      
    14.         private void Update()
    15.         {
    16.             if (InputBridge.Instance.XButton)
    17.             {
    18.                 StartCoroutine(Teleport());
    19.             }
    20.         }
    21.  
    22.         private IEnumerator Teleport()
    23.         {
    24.             characterController.enabled = false;
    25.  
    26.             var yOffset = 1 + cameraRig.localPosition.y - playerController.CharacterControllerYOffset;
    27.             characterController.transform.position = destination.position;
    28.             characterController.transform.localPosition -= new Vector3(0, yOffset, 0);
    29.  
    30.             if (rotatePlayer) {
    31.                 characterController.transform.rotation = destination.rotation;
    32.                 characterController.transform.eulerAngles = new Vector3(0, characterController.transform.eulerAngles.y, 0);
    33.             }
    34.          
    35.             yield return new WaitForEndOfFrame();
    36.             characterController.enabled = true;
    37.         }
    38.     }
    // Edit
    BNGPlayerController actually has a dependency on PlayerClimbing and throws exceptions when it is not attached to the player. Adding it also fixed the teleportation issue.
     
    Last edited: Aug 23, 2021
  21. Sija

    Sija

    Joined:
    Sep 22, 2012
    Posts:
    20
    Hello, I have a question whether it is possible to change the currently held object to another (e.g. from the list) by pressing the button. I tried to modify the AmmoDispenser script which I think is closest to this because it spawns specific objects in the hand. But all actions are related to Grab Acton. Can someone please show me the direction I should go? Thanks for any ideas.
     
  22. m4ng4

    m4ng4

    Joined:
    Apr 17, 2013
    Posts:
    9
    Hi!
    I am interested because i don´t want to program some things you already made,
    but do i need to download oculus integration kit?
    Does it not work with the new Input System and OpenXR Support?
    Just to be clear i have oculus XR plugin..
     
  23. newoldmate

    newoldmate

    Joined:
    Jan 2, 2014
    Posts:
    10
    Hey there Mr Beard, beautiful asset you've made, I'm really enjoying it.

    I've discovered a bug when switching hand models while holding a pistol. I believe it's with the gloved physics hands. It's possible it could happen to anything you're holding, I haven't tested it further. I'm not 100% sure of the exact steps to trigger it, I'll have to have a closer look at it, but the results are pretty amusing. When cycling through the different hands the hand holding the pistol duplicates, leaving a clenched hand holding the pistol plus the live hand. If you drop the pistol the duplicated hand remains clenched to it and it starts to roam about the environment with the pistol still firmly in hand. It's quite hilarious. You can pick the pistol up again, the duplicate hand remains firmly gripped.

    Another time switching hands when holding something, whenever I cycled back to the gloved physics hand, they expanded in size rapidly untill they occupied the entire xr demo scene, causing everything to destruct and fly about. It was spectacular! I've only seen it do this once, not sure exactly how it was triggered.

    I'm also having a constant forward movement drift, as if the dead zone of my analogue stick is off. Is there a way to adjust the dead zones?

    I'm on WMR btw, a first gen HP Reverb.

    If you would like any specific WMR testing, just let me know, on happy to help.

    When I first used VRIF it was in a 3D project and the controller rotation offset was like you said, off by about 90 degrees in both the editor and a built project. However inside a HDRP project the hands are correct in the editor and in a built project. Movement in the 3D project was via the touch pads, but in HDRP it uses the analogue sticks.

    Another thing is slow motion options and jumping are not possible as those controls are not mapped to the WMR controller. I'm assuming the control mapping can be changed, where will i find it?

    Thanks again, beautiful work!
     
  24. seldemirov

    seldemirov

    Joined:
    Nov 6, 2018
    Posts:
    48
    Tell me, what am I doing wrong? Buttons on my HTC Vive controllers don't work.
    -New input system included.
    -Installed VRIF
    -Installed SteamVR for PC.
    -Installed SteamVR UnityAsset

    I looked for an answer in the documentation but couldn't find it. This seems like it should work out of the box.

    I use Unity 2020.3 and HDRP
     
  25. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Hi, I've just put to good use this great package, and I'm not meeting great problems.
    I guess most of my problems are due to my limited knowledge of the package itself, which I'll learn with time.
    An annoying point is that no matter how I grab objects, they tend all to be grabbed from the same point. I thought that the normal behavior for this was to grab from the nearest point to the hand.

    Anyway, I have a request.
    Would it be possible to set up a system where an object is only taken in hand when the hand is very near to it or in it, and is PUSHED when the hand nears to it when it's already in grabbing pose?
    I would like to have the player put objects in a hole and then push them. At the moment this looks impossible.
     
  26. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hey there - I believe we spoke on Discord but wanted to post here in case someone else wanted to do something similar. If you want to spawn an object in the hand on keypress you can either check for raw button input using the InputBridge (if (InputBridge.Instance.BButtonDown) {} or through a Unity Input Action. Then you instantiate your grabbable object. To grab or drop an item from a grabber you can call myGrabber.GrabGrabbable(yourGrabbableObject) or myGrabber.TryRelease(). If you need events for when an object is dropped or held you can use GrabbableEvents.

    I'm very late to the party here, but to answer your question the new Input System and OpenXR are both supported. You do not need the Oculus Integration kit unless you want to use some of those specific features such as avatars, hand tracking, and spatial audio.

    That is quite amusing! I have not encountered that one. I think for the most part people will only be actively swapping out the hand models in the demo, but I'll definitely make a note and see if I can figure out how to prevent that. Maybe for now simply dropping any held items while switching models.

    Anyways, thanks for sharing. I've come across some funny bugs while working in Unity, such as this one when I was experimenting with ragdolls :p


    Hi there. Is this for the Vive Wand controllers? Or the touch controllers? Either way , if you're looking to use SteamVR (as opposed to OpenXR in Unity) you need to make sure that the SteamVR integration checkbox is checked under VRIF - Integrations. What this does is add a scripting define symbol required to access the SteamVR code from within VRIF. Then you need to switch the InputBridge on the player from "XR Input" (the default) over to "SteamVR". Lastly, when you're in-game check to make sure all of the actions are set within Steam. Check out the docs here for more info (there's a video as well) : https://wiki.beardedninjagames.com/en/DeviceSupport/SteamVR or contact me on Discord if you're still stuck. Most of the time it's one of those above three issues.

    Hey there. Glad you're enjoying it :) As for grabbing objects, you can set Grab Points on an object and then specify them per left hand / right hand. You can also preview the grab points in the editor by clicking the glove icon. Check out the pistol grab points as a good example. Another tip is that if you want to adjust them in real time, set your object to velocity grab type, and "Parent Hand Model" to false. Now when you rotate the grab point in-game it will update in real time and you can find the perfect position / rotation. Switching to a "toggle" grab type and using the vremulator can also be helpful.

    As for the push / pull I'm not quite sure I follow. I'll try to answer what I do know. If you want to only be able to grab an object when your hand is very near / inside of it then you can disable "Remote Grabbable" on that object. Then you can only grab it while touching it with the grabber. As for pushing it, your hands enable colliders when you make a fist or pointing pose, so you may be able to use that to physically push the item away.
     
  27. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    OK I tested again, and found the problem: for some reason, the right hand is NOT colliding when pointing.
    It works with the left hand: I can grab the object, and I can push it if I reach it with the index pointed, but the right seems to have no collider.
    I am using the RigidBody version, because I need the player to be physical.

    Another problem: is it possible to calibrate the power of movement?
    I am putting stuff of 400 kg (units) on the ground, and I can move it very easily: I can push it with the body no problem, but I shouldn't be able to.
    I have also changed the weight of the player to 80, because I want it to be a grown man, not a woman.
     
    Last edited: Oct 5, 2021
  28. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Here is a video:
    As you can see, not only the RIGHT hand has a strange behavior, it goes through the object and some times it pushes it but then it attach the object to it, but when I use the LEFT to push the object, which kind of works, I get pushed around.
    I don't know why this is happening now, it didn't before, and I didn't change the player material or the rock material.

    OK found the culprit (probably): it's that the hands need some work.
    The only pair that is working correctly (in the RigidBody setup) seem to be n.6 (black skin).
    All the others have some kind of issues: most can only push one but not the other, and also they tend to push the player around.

    Aaaand found another bug: if I set the hands to something different than 0, they don't get swapped, but the black skin ones get ADDED on top of the other ones.
    upload_2021-10-6_1-27-47.png

    Aaaaand another problem: you can actually climb very steep surfaces, like walls, if you keep pressing toward the wall while walking, running and also jumping.
    Doesn't feel like it's really physics... is it a hybrid?
     
    Last edited: Oct 6, 2021
  29. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    BNGPlayerController seems to have no documentation, and even though the parameters are pretty self explanatory and hints are provided, the last one in the window, Sphere Collider Radius, has no hint and is completely undocumented.
    What is this definition?
    upload_2021-10-6_18-24-12.png
     
    Last edited: Oct 6, 2021
  30. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    A camera is created on the right hand index finger when the game plays, why?
    It's turned off for what I can see. What is its function?
    upload_2021-10-6_18-31-26.png
    upload_2021-10-6_18-33-29.png
     
  31. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Also these parameters should be explained a bit:
    upload_2021-10-6_18-43-3.png
    Why the max height is set at 3?
    Can the player be 3 meters high?
    And what is the base of this measure? I mean, how does the system decide if that capsule height is 2 or 2.2 or 1.7 or 3?
    I can't wrap my head on these parameters... they should be intuitive, but they aren't.

    And one last thing: try to duck down and take objects from the ground: the character will be pushed all around depending on how you orient your hands (more or less).

    Sorry for posting so much, but I was just going throughout this check up, so I thought to point out everything.
     
    Last edited: Oct 6, 2021
  32. wechat_os_Qy089FIZDe7bkYzZVVSTYwFC8

    wechat_os_Qy089FIZDe7bkYzZVVSTYwFC8

    Joined:
    Oct 8, 2021
    Posts:
    2
    Hello, have you solved your problem? I also have HDRP scenes and Steam VR not working properly. I could see the Game viewport moving with the helmet, but I couldn't see anything inside the helmet
     
  33. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hi there. Is the screen black in the headset? You may want to try switching the Rendering Mode to multipass. Also if you are using OpenXR and HDRP there may be some issues, so it might be worth checking your OpenXR version and seeing if there is an update or known issue there. I suspect switching the render mode may fix it for you though. If not, hop on over to the Discord and I bet we can get you sorted.

    Hey there :) Thanks for the info, I will do my best to read through each item and make some notes for updates improvements. A few notes regarding your questions in no particular order :

    1. The measure for the player is in meters, which is Unity's default scale (1 = 1 meter). For example, if you add a default cube that is a scale of 1, it will be 1 meter on each side. As for why I've chosen 3 and 0.4 for max / min height, those are just defaults I've found that work nicely for testing in the editor, as you can increase / decrease the player height using the vremulator.

    2. The camera on the index finger is used for the UI system. This is how Unity's EventSystem handles determining what is in front of the pointer. It isn't used as an actual camera in the traditional sense, and also doesn't have the same performance implications.

    3. I'll work on updating the BNGPlayerController documentation. Right now it simply handles resizing the capsule collider on the player so you can duck under objects and things like that. I am working on revamping that a bit so that may end up in a separate component.

    4. The Rigidbody Player is relatively new. The default player uses a CharacterController which will be much smoother / predicatable in VR, but the Rigidbody player uses physics to move around by manipulating the rigidbody's velocity. Which one you use depends on your project - the CC version is great for most use cases and will be the most comfortable, whereas the Rigidbody player will give you more options for physics based gameplay. You can even mix and match the two a bit. If you use the Rigidbody player you'll just need to make sure to use physics materials to control things like friction / sliding and be careful when applying forces as you could potentially send the player flying around (which may be uncomfortable for some users :p

    5. I'll take a look at the hand issues you mentioned - those may have been fixed in a previous update but I'll need to do some testing to double check
     
  34. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hi everyone,

    Just wanted to mention here that 1.73 is out (or should be out soon). Here is the changelog :

    1. Added Virtual Keyboard - You can use this with standard input fields. This is Canvas based and can be used cross-platform. I'm quite happy with the performance and usability, but there is certainly room for improvement. Please message me on Discord if you'd like to add a localization (different language / keyboard layouts) or have any feedback.

    2. Fixed Door / Hinge momentum issue - Some doors were swinging open the wrong way. Thanks for the Discord user for mentioning this / pointing out the fix.

    3. Removed PlayerClimbing dependency from BNGPlayerController.cs

    4. Grab Point Triggers can now use custom hand poses. Previously this component only worked with Animator ID's. If you're not familiar with Grab Point Triggers, they are essentially trigger colliders that allow you to set a hand pose when you stick your hand in them. For example if you wanted to make the hand a "point" pose when near a light switch.

    5. Performance optimization on MovingPlatformSupport - Now caching the last hit object to reduce number of GetComponent calls (thanks to ImpossibleRobert for pointing this out / suggesting a fix :)

    6. Added 'CheckInput' boolean to the TimeController component in case user wants to manually call Slow / Resume time from script.

    More to come. Thanks again to the Community for submitting bug reports, making suggestions, sharing your works, leaving reviews, and for just saying hi :) I really appreciate it!

    -BNG
     
    dmenefee, EN_Games and blacksun666 like this.
  35. s123top

    s123top

    Joined:
    Jan 22, 2021
    Posts:
    2
    I have been trying to use Handposer to make hand poses but no matter what I do they are rotated like the photo shows during runtime. (if you imagine the hand is supposed to be gripping the sword in the photo). I am probably missing something simple but it is very frustrating. Any help would be appreciated

    https://imgur.com/a/NXiQO9q
     
  36. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Try to rotate the sword pivot by 30 degrees in one of the axis, I can't say which one, because it can be any, depending on how the sword is modeled.
    If you can't rotate the model's pivot, just add an empty object as root of the sword, so that you can rotate the sword freely and see when it fits.
     
    Last edited: Oct 17, 2021
  37. LiamVisionary

    LiamVisionary

    Joined:
    Apr 2, 2020
    Posts:
    48
    Great updates. I wanted to update to the latest version, but it's asking me to overwrite my project. Is this intended? and if so, would you mind sharing which files were changed specifically so I can open them up in a new project and copy them over to my older VRIF setup?
     
  38. newoldmate

    newoldmate

    Joined:
    Jan 2, 2014
    Posts:
    10
    Just a heads up for any WMR users. With Steam integration you wont have any controller bindings. You'll need to go into: "Assets\BNG Framework\Integrations\SteamVR\Bindings\SteamVR_VRIF\1" or wherever your bindings are stored and add them to "bindings_holographic_controller".

    I think i just copied the Oculus Touch setup.

    This had me scratching my head for quite some time.

    Strangely, when not using Steam integration, the hand rotation was off, now its fixed. No more breaking my wrist to point a pistol! Another thing i noticed after switching to SteamVR integration is the motion controller lag is greatly reduced. Before the controllers would be slow and lag behind your movement, now its super fast.

    Update:

    You also need to then set all your bindings again inside of Steams Binding menu. These will be saved and used whenever you try a build.
     
    Last edited: Oct 20, 2021
  39. newoldmate

    newoldmate

    Joined:
    Jan 2, 2014
    Posts:
    10
    Any chance you could offer a checkbox option on the XR Rig prefab to "Follow Scene Camera" ?

    Would be super handy!
     
  40. tank309019

    tank309019

    Joined:
    Jan 25, 2019
    Posts:
    1
    Can you make a tutorial of custom body?
     
    LiamVisionary likes this.
  41. fxmdeveloper

    fxmdeveloper

    Joined:
    Aug 13, 2018
    Posts:
    2
    Hi, I have a question about the VRIF. Is there a way to change the color space? Right now the color of the build is different from the one in editor (more orange-ish) even without post processing. I read that it might be because of color space, but I cannot make it work with the OVR Plugin
     
  42. jefferthepeasant

    jefferthepeasant

    Joined:
    Apr 29, 2021
    Posts:
    1
    Hey, I am trying to add the damage collider to a particle system so when a damageable object is hit with a particle from the system it will take damage. Anyone know how to go about doing this? I'm relatively new to unity so any help is greatly appreciated.
     
  43. niraj

    niraj

    Joined:
    Feb 14, 2013
    Posts:
    56
    Yes, we are looking way to add custom full Arm Hands with IK. Can you place make a Tutorial on this.
     
  44. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Can this system interact with a rigged IK object in the scene. Not an IK player but an object in the scene like a mic boom or a hinged table lamp or an NPCs arm for a handshake. I can do this with Unity joints in other systems but I want to be able to do it with a rigged object. Is this possible and are there examples if it is?
     
  45. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    I am currently working on some more advanced full body features. However, there is a fully body example included in the XR Demo scene that uses Unity IK. The general idea is that the body uses the "RotateWithHMD" script to smoothly rotate with the headset. Then your player's model will use UnityIK to target the controller transforms (or ModelsLeft / ModelsRight transforms, since these are positioned to items). As a final adjustment, you can parent your Grabbers to the player's hand bones instead of the controller if you only want to be able to grab from where the hand is.

    VRIF doesn't really enforce color space (or anything, really). Though I believe OpenXR and OVR have their own requirements, and using URP can be a factor as well. I believe OpenXR doesn't currently support Gamma, so if you're trying to use the OVR plugin with OpenXR and gamma then that could be the issue.

    Hi there. There is a "DamageCollider" component you can take a look at. It will damage "Damageable" items on collision. It uses OnCollisionEnter to detect this, which you can also use to get the hit position. So for example,

    public Transform ParticlePrefab;

    void OnCollisionEnter(Collision collision)
    {
    ContactPoint contact = collision.contacts[0];
    Quaternion rotation = Quaternion.FromToRotation(Vector3.up, contact.normal);
    Vector3 position = contact.point;
    Instantiate(ParticlePrefab, position, rotation);
    }

    That's just an example modified from the docs. Hope that helps! :)

    I am currently working on some IK features and hoping to have an update on that in the near future. In the meantime there are some tips to setting this up in the answer abover.

    There is an object on the table in the XR Demo that could act as a mic boom. You can grab the red handle and the "arm" will move along with it. It's not IK, but the idea is similar and may be easy for you to repurpose. If you do end up using IK, one tip is set the Grabbable's "Parent to Controller" value to false, as that could mess with the IK movement since the object will get parent to the hand. Another tip is to use a separate Grabbable object that is then attached to the IK object via a FixedJoint. That way you're grabbing a collider that is pulling the IK target along. Kind of hard to explain, but hopefully you get the idea!
     
  46. garrido86

    garrido86

    Joined:
    Dec 17, 2013
    Posts:
    233
    I'm on Oculus Quest 2 and I like to enable the HandMenu only when the menu button on the left controller is pressed but somehow it is also triggered when the Y button is pressed which must not happen. I looked into the Input Actions and tried different configurations but no luck. Does anyone know a solution for this issue?

    @BeardedNinjaGames
     
    Last edited: Nov 13, 2021
  47. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Hi there! I actually haven't seen this behavior before - the menu should only pop up if you press the menu button, so I'm not sure why the Y key is also showing it. Did you edit an input action by chance? Or maybe you are using OpenXR and OpenXR is erroneously reporting the Y key as the menu button. Hmm. I recommend removing the input action and only using the XR Input option on that component and see that adjusts anything. Very odd!
     
  48. seapitt_b

    seapitt_b

    Joined:
    Oct 14, 2012
    Posts:
    4
    Hi thanks for this great asset, I want to develop a vr application that uses more active ragdoll, for now I use two frameworks namely vrif and puppet master, I want to try to implement a similar program from the welcome to oculus application that can dance with robots , it's just that until now I haven't found the right way, apart from looking at the example of the vrif for kayle_ragdoll robot, I hope in the next update there will be many examples related to kinematic and active ragdoll, thank you
    PS: I hope I can get a tutorial so we can dance with robots in the next vrif update
     
  49. itsmikeski

    itsmikeski

    Joined:
    Nov 25, 2021
    Posts:
    5
    Anyone managed to get any of the wall run tutorials out there, or have another idea about how to do it, working with VRIF?
     
  50. Patrudoizero

    Patrudoizero

    Joined:
    Nov 30, 2018
    Posts:
    14
    Has anyone made it work with Ultraleap?