How to make a VR game in Unity - Part 5 - Controller Vibration

Поделиться
HTML-код
  • Опубликовано: 26 дек 2024

Комментарии • 93

  • @Kazumo
    @Kazumo 5 лет назад +41

    Valem, you're amazing, man. Your tutorials are easily one of the best out there right now. Thank you so much for the work you put into them! I can only offer you one feedback: Keep up the videos because they're so damn good! They came at a time when I needed them the most for my projects. I'm looking forward to see what you come from, because everything so far has been more than useful. You can do some interaction with a button or something like objects snapping in place (like when you want to put an object in a specific place and it will stick there if you let it go into the zone and so on) or anything you feel like would be helpful in the future!
    Thank you so much, you're an inspiration!

  • @MattHoffmanXR
    @MattHoffmanXR 5 лет назад +3

    Valem, simply outstanding work. You make the core concepts of developing VR so approachable! My one recommendation is that you provide a link to your github (if exists) with the example scenes and code. You should also create a Patreon so the community can give back for your excellent contributions! :-) Thank you!!

  • @MattHoffmanXR
    @MattHoffmanXR 5 лет назад +11

    Oh, please do a tutorial on locomotion (teleporting with pointer, gaze) (climbing) (flying) (free x,y motion). Thank you!

  • @zacheryhenry6580
    @zacheryhenry6580 5 лет назад +4

    I think a really good topic would be hit colliders in vr. For example, like a sword and shield thr players uses to fight an animated enemy from the asset shop. It seems to be a much harder task than in a non-vr game

    • @MichaelJohnson-ze6ql
      @MichaelJohnson-ze6ql 5 лет назад

      I am currently working on this, hopefully he can do some melee stuff as this could be really helpful. Both with gun raycasts (hopefully the one we downloaded in previous tutorials), and with sword and shield. I would love to see how others would try to implement this in VR. I currently am tracking collisions, but i need to make some sort of gamemanager script that subtracts from a health variable for my enemy. I will be watching some conventional non-vr unity tutorials in the meantime to see if they shed some light on the situation.

  • @TheShottski
    @TheShottski 5 лет назад +3

    I also want to express my appreciation for these videos! I was able to pair what you showed in these videos with the Unity Survival Shooter tutorial to create a bare-bones shooter using Synty's POLYGON assets animated by Mixamo. I'm still amazed that someone such as myself with no background in this area can create an interactive virtual world and I give a lot of the credit for that to your video series.
    A topic I'd love for you to cover is how to take a weapon, such as the gun you've already done so much with, and holster it against the player avatar. I think this topic may mesh well with Kazumo's request for a video on snapping objects in place.

    • @ValemVR
      @ValemVR  5 лет назад +1

      Hi Matthew! Thank you for your comment it was really kind. Thanks for your suggestions aswell, I will try my best to keep doing these videos to help you with your project. :)

    • @jemlap
      @jemlap 5 лет назад

      You could create a holster gameobject that can detect if the gun is in the range of it. Then you have to detect if the gun is being grabbed atm. If it isn't put the gun to follow the holster and if it is being held don't do anything. :)

  • @asalongino3588
    @asalongino3588 5 лет назад +2

    Absolutely fantastic tutorial, Valem, a well earned subscription. I do have a request for a future tutorial, however. It would be fantastic if you could show us how to enable collisions with the hands and other objects, so you can punch and poke the cubes, I have been struggling to figure it out myself. Keep up the great work!

    • @ClarkyXR
      @ClarkyXR 5 лет назад

      I did this today, couldn’t find any tutorials but you just add a small collider to the finger tip of your Avatar hands and I can now press tiny push buttons I made

  • @StormWave88
    @StormWave88 5 лет назад +1

    Please make more of these, there are few well done oculus sdk tutorials out there , love these vids thank you so much for taking the time to do them

  • @pixelb0i255
    @pixelb0i255 5 лет назад +2

    @valem any chance you can add a part 6 with holding single item with both hands? Right now it's one or the other. Good for simulating lifting heavy objects. Thanks!

  • @JaredKellen
    @JaredKellen 5 лет назад +7

    This was the most helpful series of video ever. The only thing I need help with now is coding the Oculus achievements. Setting them up is easy, but the oculus documents on the coding is confusing I do not understand their examples at all.

  • @lasaldan
    @lasaldan 5 лет назад +3

    Valem, you are great! Your explanations are clear and the content is interesting and applicable. Thanks so much! Since you asked for ideas for the next video, what about implementing the 'hop' movement method that some games employ (like in RoboRecall or the Oculus/Steam Home Room). Looking forward to the next video, no matter the topic though! Thanks again.

  • @asadashino9771
    @asadashino9771 5 лет назад +1

    using a custom avatar (A in blender made character with a skeleton) Thx for the tutorials they have been rly helpful for my little project :P

  • @krabesandwich
    @krabesandwich 5 лет назад +4

    Can you make a tutorial on grabbing with both hands for a two handed weapon please?

    • @ClarkyXR
      @ClarkyXR 5 лет назад

      Jaye Moore can’t you just split the gun in halves and make both halves a grabbable?

    • @moddingdudes7055
      @moddingdudes7055 4 года назад

      Clarky does that actually work?

  • @amadhia
    @amadhia 5 лет назад +2

    Simply wonderful work! Thank you so much for creating and sharing this series! You have been such a big help I'm at a loss for words, so I'll just say it again (in all caps) TTTHHHAAANNNKK YYYOOOUUU!!!!!!

  • @ndonkey
    @ndonkey 5 лет назад

    Thanks for the tutorial series. Very straight forward, helpful and easy to follow. You make it all look too easy :D

  • @teogustavson9506
    @teogustavson9506 5 лет назад +8

    Is it only me who wants Valem to do a tutorial on climbing? I can´t find a good tutorial on that anywhere!

    • @lucasmartinic2039
      @lucasmartinic2039 5 лет назад

      YES PLEASE

    • @AlexLeggo
      @AlexLeggo 5 лет назад

      Oh yes please, I'm trying so hard to get that working on OVR!

  • @mccreative1793
    @mccreative1793 5 лет назад +2

    Can you make a tutorial how to port your game from OVR to SteamVR for our Vive friends (without using ReVive)

  • @blind_neighbourhoodNerd
    @blind_neighbourhoodNerd 5 лет назад

    Again thanks so much!! Brilliant channel

  • @_sp3149
    @_sp3149 4 года назад

    You can make the VibrationManager a static class which doesn`t need a GameObject

  • @TedBarnett197
    @TedBarnett197 5 лет назад +1

    Really helpful, Valem. Better than anything Oculus has put out! I wish you could help us Oculus-newbies figure out how to enable proper teleportation (with the classic curved arc showing the destination). I can't find good documentation for this!

    • @ValemVR
      @ValemVR  5 лет назад

      Thank you for your comment ted. I might do a tutorial on that subject one day. Maybe check VRTK it has an awesome teleporting system and its free!

  • @copypaste3526
    @copypaste3526 5 лет назад +1

    How would you call this function from within the OVRGrabber script provided by Oculus. I tried to enter the line in the function 'void OnTriggerEnter(Collider otherCollider) but VibrationManager is not recognised in that namespace.

  • @pixelb0i255
    @pixelb0i255 5 лет назад

    Another good one. Liked that you used best practice over the short cut. Will you add the sixth video on hold objects with both hands. There is the VRTK kit that does this, but knowing how it is put together and with best practice in mind would be great.

  • @Dotzek0n
    @Dotzek0n 5 лет назад +1

    Hey Valen your tutorials rock mate thanks so much it's helping me TONS!
    One question, can you make a tutorial on building a multiplayer vr shooter? Can't find any tutorials on it, would be awesome to learn it with your explanation!

  • @YellowAnimations
    @YellowAnimations 4 года назад +1

    But how do you put it on your headset / Oculus store?

  • @Kouly-Productions
    @Kouly-Productions 5 лет назад

    Keep up the good work! :)
    I am trying to create a game, and you make it so easy for me to understand how!
    THANKS!

  • @Stacklucker
    @Stacklucker 4 года назад

    This method works fine, but unfortunately scales with Time.Deltatime. Do you know of a method to trigger vibrations and keep the playback speed a constant rate?

  • @jbsfreelance
    @jbsfreelance 4 года назад +1

    Unfortunately, the OVRHaptics API is deprecated. It didn't work at all for me on the Quest and had to go with the more cumbersome OVRInput.SetControllerVibration method :( Thanks Valem for the awesome content nonetheless.

    • @sleepygingercat
      @sleepygingercat 4 года назад +1

      Huh? Couldn't find any mention of it being deprecated developer.oculus.com/reference/unity/v17/class_o_v_r_haptics_clip

    • @jbsfreelance
      @jbsfreelance 4 года назад

      This was a while back so I'm not 100% sure if I gave up because of the editor crashes it was causing me or if I was able to overcome that and it still didn't work. Nonetheless, the Rift section of this doc is what I was talking about developer.oculus.com/documentation/unity/unity-haptics/ (contradicting-docs--)
      In case the page changes in the future, here's the direct quote: "The OVRHaptics API is deprecated and only included for legacy support purposes. The API was only supported on the original Oculus Rift headset." :/

    • @sleepygingercat
      @sleepygingercat 4 года назад +1

      @@jbsfreelance Understandable, Oculus docs are not very clear on that. :(
      And looking through some Oculus Integration code that should've worked OOTB - in some places it is buggy or incomplete.

  • @ArunKumar-fx7zc
    @ArunKumar-fx7zc 4 года назад

    will it work with gear VR ?? It is powerd by oculus

  • @nerfingdino5628
    @nerfingdino5628 5 лет назад

    I love these tutorials lot. In the next Video Can you show us how to reload the gun

  • @erasmobellumat3973
    @erasmobellumat3973 5 лет назад +1

    Man, your tutorials is awesome! Can you show how join this parts with a tutorial of Oculus Quest? I'm making a Motorcicle game for Oculus Quest and i'm using your tutorials do learn. =)

  • @希利奧約翰
    @希利奧約翰 5 лет назад +1

    Can you teach us how to ignore the collision of the grabable items? There is a bug currently, if the item is under the player, and the player try to pick it up, the player will fly with the item, and the item will never reach the player's hand unless the player change the position of his hand

    • @MichaelJohnson-ze6ql
      @MichaelJohnson-ze6ql 5 лет назад

      Yes please help us fix the infinite flight problem, most people who demo my scene stumble upon this!

    • @ValemVR
      @ValemVR  5 лет назад +1

      Hey guys this is an issue that other have adressed before. I will pin a comment about this! A really simple fix is to set the body and the hand to a different layer then in physic settings uncheck the collision between the two layer in the collision layer matrix! :)

    • @希利奧約翰
      @希利奧約翰 5 лет назад

      Thanks! Will try that when I am free, please don't stop making update in this series, me and my team are working on a side project base on your tutorial video ! :)

  • @snorungarna5
    @snorungarna5 4 года назад

    How do i remove vibration on my motion controller not in the game

  • @entreato
    @entreato 2 года назад +1

    It just doesn't work with me. Nothing happens at all. Apart from Oculus Integration, do I need anything else on my Project? And do I need any Oculus-related script on my Scene? I am trying it while wearing the mask, of course, as I heard it wouldn't work otherwise. But I am only running it on Editor. It's supposed to work on Editor, right? I've been struggling with this for 2 days now, and searching on Forums and everything seems to be great with the code, but none of my controllers vibrate. (Using Quest 2). Am I missing anything obvious? haha Thanks, anyone!

    • @johnkarl3143
      @johnkarl3143 2 года назад

      Did you get this working? still does nothing for me, no errors etc, unity forums, RUclips, Reddit, Oculus Dev centre and Discord all no help :(

    • @entreato
      @entreato 2 года назад +1

      @@johnkarl3143 Yes! I believe the scripting on this video is a bit dated in relation to current Unity's Input System. What you truly want here is UnityEngine.InputSystem.XR.Haptics.SendHapticImpulseCommand.Create(0, amplitude, duration);
      You also gotta be using UnityEngine.InputSystem; and UnityEngine.InputSystem.VR;
      Here is a forum thread that truly helped getting the vibration occurring for me: forum.unity.com/threads/haptics-in-openxr-how-to-send-a-pulse-to-a-specific-controller.1204864/

  • @jamesgillett8815
    @jamesgillett8815 4 года назад

    so wen i grab a object I fly or continuously go to the left or right

  • @teogustavson9506
    @teogustavson9506 5 лет назад

    My gun seems to only shoot every second time i press the trigger... Any thoughts? the audio clip is playing every time though. please help

  • @younesl885
    @younesl885 5 лет назад

    Woow, I loved your tutorial. Well done 👍 and Thanks a lot 🙏

    • @ValemVR
      @ValemVR  5 лет назад +1

      Thanks Younes Im glad I could help. :D

    • @younesl885
      @younesl885 5 лет назад +1

      Valem thanks to you Valem 🙏

  • @ClarkyXR
    @ClarkyXR 5 лет назад

    I suck at coding, would love just the most simplest code to make a Quest controller vibrate for half a second on trigger enter

  • @ribertorbet5304
    @ribertorbet5304 5 лет назад

    I think if you showed how to make the bow from your other video it would be awesome. I see that come up so often, people wanting to make a bow, but there are no great videos or assets from the asset store to do this.

  • @GoodFriendsForever
    @GoodFriendsForever 5 лет назад

    Im working in a VR inventory but cant seem to get it working right. Could I request you do a VR inventory. Like holstering and maybe carrying objects you pick up with you on your body

  • @gameradam19
    @gameradam19 4 года назад

    Please do a tutorial with véhicule that you can drive

  • @Omar-vi1vu
    @Omar-vi1vu 5 лет назад

    more please!! ur the best!!!!!!!!

  • @temporaryalien5573
    @temporaryalien5573 5 лет назад +1

    Can you show how to make melee weapons?

    • @gluedtogames
      @gluedtogames 5 лет назад

      I'm sure this is long unneeded, but what kind of help were you needing with melee weapons? I could probably help with that.

    • @ValemVR
      @ValemVR  5 лет назад

      Hi guys! Thank you for your feedback. I have a tutorial on my channel where I make Beat Saber in 10min. You can use this video to get started for making a sword/saber for example! :)

    • @temporaryalien5573
      @temporaryalien5573 5 лет назад

      I have seem to gotten ahead of myself when I posted this comment I made a test world and the oculus does not seem to be working once I click the play button, I would like the help Gabe but I need to get basic startup working

  • @fettahadak9851
    @fettahadak9851 4 года назад

    Does this work for the quest?

  • @希利奧約翰
    @希利奧約翰 5 лет назад

    Hi, thanks for the video, I really want to have more in this series, I want to know how to make the object detect my hand, just add a trigger volume in my hand? Also, I am planning to create a lever, it is just make a boolean variable turn on or off if player interact with it.

  • @dhruv9332
    @dhruv9332 3 года назад

    Helpful

  • @mica8076
    @mica8076 5 лет назад

    Awesome video, thank you! How would I use this with the Event Trigger to add vibrations when interacting with UI?

  • @ClassicMushroom
    @ClassicMushroom 5 лет назад

    Does this work with acer windows headset vr?

  • @Kukurio
    @Kukurio 5 лет назад

    Anymore VR tutorials being cooked up? :D

    • @ValemVR
      @ValemVR  5 лет назад

      Im planning on releasing a game for the oculus quest and showing the process in a youtube serie! :) In the meantime I will make short tutorial on developping famous game. :)

  • @Zaedric
    @Zaedric 5 лет назад

    Hey, when I bring my hands towards my face (tracking space areas) it starts to disappear on my main camera as if its clipping into it?

    • @ValemVR
      @ValemVR  5 лет назад

      Hey Xerus how are you? :) Try decreasing the near plane of the camera in the centereyeanchor!

    • @Zaedric
      @Zaedric 5 лет назад

      @@ValemVR im doing good, progressing through my vr game! okay decreasing the near plane kinda works? For some reason, when I play the scene it continues to clip despite having the near clipping plane to the minimum but any edit of the clip plane during playtime fixes it but then reverts when I stop it. Although I just noticed that there are two CenterEyeAnchors on my ovr player, is there suppose to be two or shall I remove one? removing one seems to fix the problem or decreasing the other anchor fixes it

    • @ValemVR
      @ValemVR  5 лет назад

      Nice! I'm glad to know that your project is doing great. :) Yes you are supposed to only have one centereyeanchor maybe it was the issue! :) If you want me to hep further, you can send me a picture of your hierarchy if you want. :)

    • @Zaedric
      @Zaedric 5 лет назад

      @@ValemVR thanks everything is working fine. It's not possible to run using oculus sdks without oculus home being open right? Iv tried using steamvr and openvr checked in unity settings and I'm getting a black screen. And if I wanted to use openvr/steamvr without oculus home, I would need to use different scripts to what you used in this series?

  • @171694
    @171694 5 лет назад +1

    Awesome! Make one for HTC Vive please! It would be amazing! xD

  • @vlogginggabes3864
    @vlogginggabes3864 5 лет назад +1

    Can you add AI in the next tutorial?

  • @THE_ONLY_GOD
    @THE_ONLY_GOD 2 года назад

    Wait a second! It can vibrate to music?!

  • @joltterfan
    @joltterfan 4 года назад

    Has anyone done it on the quest and could help me? Maybe email or tell me if you had to do any modifications to the instructions. Thanks!

    • @SaikingSS
      @SaikingSS 2 года назад

      hi, did you get solution?

    • @joltterfan
      @joltterfan 2 года назад

      @@SaikingSS yes, but it was long time ago! What I did was to join a discord group chat and ask for help

    • @SaikingSS
      @SaikingSS 2 года назад

      @@joltterfan did u remeber the solution or new where i should ask for help with it?

  • @artymiranda7128
    @artymiranda7128 5 лет назад

    Can Unity make Playstation VR videogames?

    • @ValemVR
      @ValemVR  5 лет назад +1

      Yes Unity can do it! :)

    • @artymiranda7128
      @artymiranda7128 5 лет назад

      @@ValemVR Thank you very much mate, I have one more question. Your VR game developed with Oculus parameters could work in any way on Ps4 devices?

    • @ValemVR
      @ValemVR  5 лет назад +1

      @@artymiranda7128 Its a bit difficult to answer that. Part of the code from the Oculus SDK can be used for other VR headset even if it was meant for the Oculus devices yes. But you would have to modified some scripts though !

    • @artymiranda7128
      @artymiranda7128 5 лет назад

      @@ValemVR thank you man!

  • @privateHandle731
    @privateHandle731 2 года назад

    OVRHaptics no longer recognised.

  • @nopoint9976
    @nopoint9976 5 лет назад

    How to port a game

    • @Kukurio
      @Kukurio 5 лет назад

      Oh man...hah, that would be fucking epic.

  • @stevehinan
    @stevehinan 5 лет назад

    💪

  • @Blank-gn4bo
    @Blank-gn4bo 4 года назад

    Dose it work on windows mixed reality???