Half Life Alyx Distance Grab - Unity Tutorial

Поділитися
Вставка
  • Опубліковано 20 сер 2024

КОМЕНТАРІ • 40

  • @Beno951
    @Beno951 Рік тому +9

    Unbelievable how much crucial content for VR development you provide. And for free. Thanks to you VR platform will keep growing.

  • @michaelcooper2781
    @michaelcooper2781 Рік тому +1

    Thanks heaps, I requested this tutorial back during the How to make a VR game series from 2022, great to see you go around to it!

  • @guesswhatteapots
    @guesswhatteapots Рік тому +1

    Literally everything I know about VR is from you, thank you!

  • @mrg3128
    @mrg3128 4 місяці тому +1

    It works, but if you lift the object right underneath you, you will get an error. So, after messing around, I found that it was related to controller angle relative to surface. If it was bigger than set jump angle, diffXZLength * Mathf.Tan(angleInRadian) would be less than diff.y and you will get negative square root in jumpSpeed, which results to NaN. Here is the fix. Just replace angleInRadian with this.
    float angleInRadian = Mathf.Clamp(diff.normalized.y * 90, jumpAngleInDegree, 90) * Mathf.Deg2Rad;

  • @Dupernite
    @Dupernite Рік тому +2

    thank you, finally a tutorial about the gravity gloves ❤

  • @PaulRobello
    @PaulRobello Рік тому +2

    I would be interested in seeing a tutorial on an inventory system made with socket interactors. A briefcase or backpack would be cool.

  • @LeNa-xi4pz
    @LeNa-xi4pz Рік тому +1

    Oh thanks, this tutorial is just in time. Thanks a lot for the video

  • @CactusVRstudios
    @CactusVRstudios Рік тому +1

    Very good tutorial.

  • @Davebd
    @Davebd Рік тому +4

    15:10 - it's not a bug, it's a feature.

  • @LeNa-xi4pz
    @LeNa-xi4pz Рік тому +2

    We'll get a bug if the object is roughly below us. When calculating the jump speed under the root, there will be a negative value, which will accordingly lead to a crash.
    it is related to the variable diffXZLength

    • @shinzor
      @shinzor Рік тому +1

      Same here. I was scrolling the comments for that reason. I made workaround but now it simply just don't move the object when in this position:
      float angleInRadian = jumpAngleInDegrees * Mathf.Deg2Rad;
      float denominator = 2 * Mathf.Cos(angleInRadian) * Mathf.Cos(angleInRadian) * (diffXZ.magnitude * Mathf.Tan(angleInRadian) - diffYLength);
      if (denominator

    • @LeNa-xi4pz
      @LeNa-xi4pz Рік тому +2

      ​@@shinzor I think just to attract the object if it is so close, since I could not adequately implement the screed at this distance

  • @elixerio609
    @elixerio609 Рік тому +1

    you should do a lightsaber tutorial

  • @octopro8937
    @octopro8937 Рік тому +2

    If ur here before 100 views your a legend

  • @dawsonpenner2070
    @dawsonpenner2070 Рік тому +2

    I used to play half life alyx so much that one time I tried to grab the TV remote that was half way across the room like you would do in the game (It didn’t work)

    • @ValemTutorials
      @ValemTutorials  Рік тому +1

      Aha this is so funny. :D

    • @dawsonpenner2070
      @dawsonpenner2070 Рік тому +1

      @@ValemTutorialsI know I’m like the 1000th person to say this, but you are literally the best vr game dev UA-camr out there, you somehow always make tutorials about the most niche things that everyone is looking for. I have no idea how you don’t have more subscribers.

  • @diegosatori5718
    @diegosatori5718 Рік тому +1

    This one is vital

  • @edoardopignatelli5128
    @edoardopignatelli5128 Рік тому +1

    Great tutorial! I'd love if you did a new driving tutorial in VR

  • @A_walk_in_the_park
    @A_walk_in_the_park Рік тому +1

    Valem, your tutorial are awesome. Since you have a lot of knowledge I was wondering if you could advice me on how to make a functioning glovebox in VR. So a box with gloves models attached, where you can put hands, and than those gloves should fit to your hands and move around with your hands. Obviously I would also use the hand tracking system from Unity, so no controllers. This sounds really difficult but surely there's a way on how to do this.Maybe with some sort of animations?..Any advice would be very appreciated.

  • @frexfreeze8222
    @frexfreeze8222 9 місяців тому +2

    Very nice tutorial, though I have a problem. When I try to implement ComputeVelocity(), my object suddenly won't budge when flicking my hand. Vector3.Up still works. Does anyone know how to fix this?

  • @pitaman_ld
    @pitaman_ld Рік тому +1

    Hello, would you please make a quick tutorial on how implement Jump in VR?

  • @Gytrio
    @Gytrio Рік тому +1

    I don't know why but everything works but my hands don't grip the cube.
    Has anyone had the same problem and was able to solve it?

  • @catzaza_
    @catzaza_ Рік тому +1

    anyone know how he makes his hands disappear when he grabs the cube?

  • @xr3y798
    @xr3y798 Рік тому +1

    can you make a vr rocket launcher where you have to attach the rocket to reload it

  • @jakoblacour
    @jakoblacour Рік тому +1

    Awesome content!
    How to do this with hand tracking hands?

  • @earth88_
    @earth88_ Рік тому +1

    Hey Valem, I have been following your tutorials for a bit now but when I test a game in unity it looks fine on my monitor but looks choppy on my quest 2. Any ideas?

  • @chinweiliu2567
    @chinweiliu2567 Рік тому +1

    Is it possible to add hand tracking as well?

  • @Uncle_dervus
    @Uncle_dervus 9 місяців тому +1

    can you make this for a gravity gun?

  • @raphael3024
    @raphael3024 Рік тому +1

    I have a suggestion. A hitting tutorial. Setup a 2 hand grab item with a collider that needs to collide with another thing with a certain velocity/force to activate something.

  • @avshkabura
    @avshkabura Рік тому +1

    Hello. How can I leave grabbale object in hand even when I release grab?)

    • @chrissoares8062
      @chrissoares8062 10 місяців тому +1

      Parent the object to the hand. Should be a function for it in the unity docs. Might need a small custom script to detect when an object has stopped being grabbed, and a filter to decide on what objects to parent when releasing the grab button.

  • @shinzor
    @shinzor Рік тому +2

    I run into a issue with this. If I drop the cube right in front of me and try to pull it back up I get: rigidbody.velocity assign attempt for 'AlyxCube' is not valid. Input velocity is { NaN, NaN, NaN }.
    UnityEngine.Rigidbody:set_velocity (UnityEngine.Vector3). But this is only when the Cube is directly to my feet and I want to pull it up. It works fine, the moment I step back a little.
    Do you have any idea why @ValemTutorials ?

    • @shinzor
      @shinzor Рік тому +1

      Funny, when I deployed it on quest and I make this "impossible pull" it really breaks the XRrayinteractor.

    • @joshuatiu8736
      @joshuatiu8736 8 місяців тому +1

      i'm having the same problem did you fix yours ?

  • @versable9324
    @versable9324 Рік тому +1

    where is yesterdays tutorial?

  • @zote1
    @zote1 5 місяців тому +1

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.XR.Interaction.Toolkit;
    public class rayhalflifeR : XRGrabInteractable
    {
    protected override void OnSelectEntered(SelectEnterEventArgs args)
    {
    if (args.interactorObject is XRRayInteractor)
    {
    trackPosition = false;
    trackRotation = false;
    throwOnDetach = false;
    }
    else
    {
    trackPosition = true;
    trackRotation = true;
    throwOnDetach = true;
    }
    base.OnSelectEntered(args);
    }
    }

    • @zote1
      @zote1 5 місяців тому +1

      oh and change out the name for yours

  • @bunnyinbox
    @bunnyinbox Рік тому +1

    VALEM I BEG MAKE RAGDOLLS LIKE THAT BALANCE LIKE IN BONE LAB IVE BEEN TRYING FOR MONTHS PLSSSSSS @valem