Search Unity

  1. 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. Ice_Time

    Ice_Time

    Joined:
    Jun 29, 2016
    Posts:
    5
    How do I fire a ray through the key on the gamepad to trigger events with the ray
     
  2. wwm0nkey

    wwm0nkey

    Joined:
    Jul 7, 2015
    Posts:
    42
    I seriously appreciate the response, will test it out and get back to you ASAP
     
  3. wwm0nkey

    wwm0nkey

    Joined:
    Jul 7, 2015
    Posts:
    42
    Just tested, didn't seem to work, will try and figure out what's going on

    EDIT: Okay so it works now when using the normal 3D pipeline, URP is when it starts throwing a fit.
     
    Last edited: Oct 18, 2022
  4. Nilam1234

    Nilam1234

    Joined:
    Nov 11, 2017
    Posts:
    1
    Hello All,
    I need help for play my game in pico devices. I am using VRIF Plugin with oculus integration that is working perfect for oculus Quest and rift.
    But now I am trying to play game in Pico devices.so that I am following step of below reference link :
    https://wiki.beardedninjagames.com/en/DeviceSupport/Pico

    But Occur following errors:
    [Assets\BNG Framework\Integrations\Pico\PicoRig.cs(9,9): error CS0246: The type or namespace name 'Pvr_UnitySDKEyeManager' could not be found (are you missing a using directive or an assembly reference?)]

    Anyone have an idea to solve it?

    Please help me to solve this error. I am trying to solve it from last a week.
     
    trojant likes this.
  5. lonelanrete

    lonelanrete

    Joined:
    Jan 11, 2018
    Posts:
    1
    hello. i often get compiler error like this
    Assets\BNG Framework\Scripts\UI\UIPointer.cs(124,48): error CS0103: The name 'curColor' does not exist in the current context
    there are 3 lines error
    Assets\BNG Framework\Scripts\UI\UIPointer.cs(122,20): error CS0103: The name 'curColor' does not exist in the current context
    Assets\BNG Framework\Scripts\UI\UIPointer.cs(123,46): error CS0103: The name 'curColor' does not exist in the current context
    Assets\BNG Framework\Scripts\UI\UIPointer.cs(124,48): error CS0103: The name 'curColor' does not exist in the current context

    is there any way to resolve this?
     
  6. adeick8

    adeick8

    Joined:
    Jan 4, 2023
    Posts:
    8
    That's because curColor is defined on line 108 inside an 'if' statement. That's an issue with the programming that hopefully BNG should fix. In the meantime, you can fix the compiler error by moving line 108 to line 94.

    Change it from this
    Code (CSharp):
    1. vis = gameObject.GetComponent<XRInteractorLineVisual>();
    2.  
    3. if(xrRay == null) {
    to this:
    Code (CSharp):
    1. vis = gameObject.GetComponent<XRInteractorLineVisual>();
    2. Gradient curColor = null;
    3. if(xrRay == null) {
    and delete line 108 (where it says "Gradient curColor = null; )
     
    Last edited: Jan 16, 2023
    General_Custard likes this.
  7. adeick8

    adeick8

    Joined:
    Jan 4, 2023
    Posts:
    8
    @BeardedNinjaGames
    What is a normal FPS for a VR game to run at?
    I've read that 72 FPS is kind of the minimum target. We have a big project already and we have been hitting low 20s. I tried removing all of our meshes (unchecking them in the scene) so that it is only a Plane and the XR rig, and we were hovering around high 50s - 60 FPS.

    Lighting is baked, no real-time lighting. We are using URP. Do you have any suggestions for what may be causing the lag?
     
  8. TymNetwork

    TymNetwork

    Joined:
    Jan 16, 2014
    Posts:
    84

    All the effects people add to VR just makes for HIGH DRAW CALLS.
    Putting killer graphic in VR is like trying to reach the speed of a
    FERRARI with a Moped. Why do people think they can make realistic life-like scenes in VR?
    Are you trying to kill the device? All your worthless additions toward realism is just breaking stuff.
     
  9. pantang

    pantang

    Joined:
    Sep 1, 2016
    Posts:
    219
  10. XPloadED

    XPloadED

    Joined:
    Jun 15, 2021
    Posts:
    3
    Hey do you have any updates on Photon Fusion you talked about a few months ago?
    Currently working on my Thesis project and would love to use VRIF together with Fusion.
     
  11. pantang

    pantang

    Joined:
    Sep 1, 2016
    Posts:
    219
    Noo please no photon! Telepathy/Mirror for the world! I know its easier but you got to pay subscriptions
     
    BeardedNinjaGames likes this.
  12. martire

    martire

    Joined:
    Feb 27, 2015
    Posts:
    35
    Hi, do you have a tutorial on how to scale objects using the hands, please? Thank you!
     
  13. only1avetrill

    only1avetrill

    Joined:
    Feb 19, 2022
    Posts:
    1
    just change compiling from mono to il2cpp;)
     
  14. jons190

    jons190

    Joined:
    Sep 13, 2016
    Posts:
    260
    Ok . I have my custom character rigged up with emerald AI 3.0 and VRIF in UNITY 2019lts, as per the tutorials, and everything seems to be working except I have a bug with dealing damage to the enemy AI.



    I have the Emerald AI damageable script on the enemy AI and have the health set to 1000.



    I am using melee combat and using the out-of-box VRIF katana, with damage colider set to deal 25.



    When I hi the Enemy AI, no matter what settings I use, It's a one shot, one kill.



    Feesl like I am missing something simple, yet anything I try, only results in hitting the AI once with the katana, killing it instantly...



    Does anyone have any ideas or insights?

    Cheers!
     
  15. reverendjesus

    reverendjesus

    Joined:
    Feb 27, 2023
    Posts:
    1
    @BeardedNinjaGames Is there an easy method—a tutorial, or snip of code, whatever— you could point me at for stacking items in the inventory/snapzone rings?
     
    jeremiasz likes this.
  16. the_cerberus

    the_cerberus

    Joined:
    Aug 20, 2019
    Posts:
    10
    Error with Pico 4:

    Assets\BNG Framework\Integrations\Pico\PicoRig.cs(10,9): error CS0246: The type or namespace name 'Pvr_UnitySDKEye' could not be found (are you missing a using directive or an assembly reference?)

    Assets\BNG Framework\Integrations\Pico\PicoRig.cs(9,9): error CS0246: The type or namespace name 'Pvr_UnitySDKEyeManager' could not be found (are you missing a using directive or an assembly reference?)

    does anyone know how to fix this?
     
  17. jeremiasz

    jeremiasz

    Joined:
    Feb 17, 2013
    Posts:
    53
    Integration with Adventure Creator (along with Emerald AI integration) would make VRIF somewhat a complete starter package for non-programmers. I would appreciate this very much :))
     
  18. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    Ah, that is an interesting idea. I actually have some ideas on how this could work. I don't want to get your hopes up too much, as I haven't used AC much, but I can at least say it's something I'll look further into.

    Looks like you need the Pico SDK installed. You only need that integration if you're using their original SDK - if you're using their new OpenXR SDK you don't necessarily need or want that installed. But the original SDK still has some use as I don't think their OpenXR implementation is 100% complete yet.
     
    jeremiasz likes this.
  19. BeardedNinjaGames

    BeardedNinjaGames

    Joined:
    Jan 26, 2020
    Posts:
    176
    I added this as a feature request as a couple of people have brought this up now. I think it's worth implementing. Anyways, their is a "Duplicate Object" checkbox on the snap zones - if that is on / checked, then when you grab the item it will be duplicated instead of removed from the snap zone. So for stacking you would keep track of how many objects are in the snap zone, and if that number is > 1, set Duplicate Object to true. Once it's down to 1 set that to false and the player will grab the item out of the zone
     
    jeremiasz likes this.
  20. Fabrizio_1990

    Fabrizio_1990

    Joined:
    Feb 21, 2016
    Posts:
    6
    Hi, Very nice asset, i loved it.
    Can i ask you if you can help me to change the code of marker to be local of the object where i am writing? becouse write in word position cause problems when i move the object.
    Thank you in advance, very nice work
     
  21. lonewolf10

    lonewolf10

    Joined:
    Oct 30, 2017
    Posts:
    1
    Can not work in unity 2022.3 and 2023.1.
    Can not select Oculus or OpenVR Loader in XR Plug-in Management. upload_2023-7-10_21-32-4.png
     
  22. Giantbean

    Giantbean

    Joined:
    Dec 13, 2012
    Posts:
    144
    Thats a Unity Issue and likely due to a lack of connection to their servers for downloading the OpenXR or unity packages. Also 2023 is not LTS and 2022 LTS have mostly sucked for VR in my experience; 2022.3.5 has been the only stable version for VR since 2021.3.27
     
    ThePaceMaker likes this.
  23. magglemitch

    magglemitch

    Joined:
    Dec 8, 2013
    Posts:
    110
    I'm also having difficulty with the Pico integration. It seems the Pico OpenXR is no longer available so I've imported in their Unity SDK. When I click Pico Integration (Legacy) - I get 36 errors in the project, all saying "(The name 'Pvr_UnitySDKAPI' does not exist in the current context).
     
  24. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    123
    Hey @BeardedNinjaGames I have downloaded your latest SDK and also pico Latest that is available on their Page(They have removed legacy one).
    Getting this error :( Any notes ?
    upload_2023-9-6_19-46-25.png
     
  25. VirtualDawn

    VirtualDawn

    Joined:
    Sep 15, 2014
    Posts:
    31
    I think if you have the new Pico Unity SDK you can just use the regular BNG (XR Input) rig without any pico integration from BNG.
     
    Last edited: Sep 10, 2023
    BeardedNinjaGames likes this.
  26. Grinchi

    Grinchi

    Joined:
    Apr 19, 2014
    Posts:
    123
    I have already changed their integration to use XR Input :)
     
  27. VirtualDawn

    VirtualDawn

    Joined:
    Sep 15, 2014
    Posts:
    31
    I meant that just delete the PicoRig.cs and the rest of the Pico integration example, that is for the legacy pico SDK. The new SDK can be used with regular XRRig. Of course you won't get access to Pico's SDK features, but there aren't that many features at this point anyways and probably you could mix&match the Pico SDK sample player with XRRig, though I haven't tried.
     
    Grinchi likes this.
  28. Alex_Heizenrader

    Alex_Heizenrader

    Joined:
    May 16, 2019
    Posts:
    87
    How does the webxr support work? Does it target webgl platform?
     
    d1favero likes this.
  29. nsmith1024

    nsmith1024

    Joined:
    Mar 18, 2014
    Posts:
    870
    are there any grenades, or explosives the player can throw?
     
  30. uvavoo

    uvavoo

    Joined:
    Oct 15, 2007
    Posts:
    60
    I dont think it is a VRIF problem. Possibly in the Quality settings of the Project Settings, your Shadow distance is set too low.
     
  31. d1favero

    d1favero

    Joined:
    Oct 14, 2011
    Posts:
    15
  32. cratica

    cratica

    Joined:
    Dec 11, 2016
    Posts:
    59
    Hello, I'm working with this framework and am having trouble figuring out how to turn off gravity when a external force (wind) picks the player off the ground.

    Currently in my game, if the player is not moving the character, then they will get picked up by the wind which is great. But... if the payer is walking or running around (any movement input) then they remain grounded. As soon as the input is released (whether keyboard in testing or button in VR), then they are lifted off the ground. How can I turn off gravity or whatever in this package that is causing this behavior?

    I have tried changing
    PlayerGravity.GravityOn = false;

    along with disabling playerGravity altogether and several over things but nothing is working. The player stays on the ground if any input is pressed.

    Thanks in advance for any help to resolve this.
     
  33. MaxLiang91

    MaxLiang91

    Joined:
    Dec 25, 2014
    Posts:
    1
    hello ! In the runtime case, the dynamic clone XR Rig Advanced prefab is placed in the scene, and the Unity Editor keyboard control moves the character invalidates
     
  34. LucasRizzotto

    LucasRizzotto

    Joined:
    Dec 11, 2015
    Posts:
    27
    Are you guys planning to add VisionOS support or is this out of the question?
     
  35. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,201
    Both URP and HDRP for Unity 2023 are broken when I add XR Plugin Management. I keep getting a VisionOS error whenever I try to install it into a fresh project.
     
  36. inbal

    inbal

    Joined:
    Jul 6, 2017
    Posts:
    10
    Same Here
    I also get the same error when opening a new file of 2023.2.7-9 and installing xr plugin management 4.4.1,
    I keep getting a VisionOS error whenever I try to install it into a fresh project