Half Life Alyx Distance Grab - Unity Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ธ.ค. 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!

  • @Dupernite
    @Dupernite ปีที่แล้ว +2

    thank you, finally a tutorial about the gravity gloves ❤

  • @vladllenv
    @vladllenv ปีที่แล้ว +1

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

  • @CactusVRstudios
    @CactusVRstudios ปีที่แล้ว +1

    Very good tutorial.

  • @elixerio609
    @elixerio609 ปีที่แล้ว +1

    you should do a lightsaber tutorial

  • @Davebd
    @Davebd ปีที่แล้ว +4

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

  • @mrg3128
    @mrg3128 8 หลายเดือนก่อน +2

    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;

  • @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.

  • @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.

  • @diegosatori5718
    @diegosatori5718 ปีที่แล้ว +1

    This one is vital

  • @frexfreeze8222
    @frexfreeze8222 ปีที่แล้ว +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?

  • @edoardopignatelli5128
    @edoardopignatelli5128 ปีที่แล้ว +1

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

  • @pitaman_ld
    @pitaman_ld ปีที่แล้ว +1

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

  • @vladllenv
    @vladllenv ปีที่แล้ว +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

    • @vladllenv
      @vladllenv ปีที่แล้ว +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

  • @jakoblacour
    @jakoblacour ปีที่แล้ว +1

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

  • @octopro8937
    @octopro8937 ปีที่แล้ว +2

    If ur here before 100 views your a legend

  • @catzaza_
    @catzaza_ ปีที่แล้ว +1

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

  • @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?

  • @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 TH-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.

  • @chinweiliu2567
    @chinweiliu2567 ปีที่แล้ว +1

    Is it possible to add hand tracking as well?

  • @Equilibrium_productions
    @Equilibrium_productions ปีที่แล้ว +1

    can you make this for a gravity gun?

  • @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?

  • @xr3y798
    @xr3y798 ปีที่แล้ว +1

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

  • @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 ปีที่แล้ว +1

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

  • @versable9324
    @versable9324 ปีที่แล้ว +1

    where is yesterdays tutorial?

  • @avshkabura
    @avshkabura ปีที่แล้ว +1

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

    • @chrissoares8062
      @chrissoares8062 ปีที่แล้ว +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.

  • @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.

  • @zote1
    @zote1 9 หลายเดือนก่อน +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 9 หลายเดือนก่อน +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