Introduction to VR in Unity - PART 3 : TELEPORTATION

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 432

  • @ValemVR
    @ValemVR  Před rokem

    Hey guys ! I made an update of this series on my channel Valem tutorial that you can find here : czcams.com/video/fM0k2n7u8sc/video.html

  • @danielgarciagonzalez2391
    @danielgarciagonzalez2391 Před 4 lety +80

    This is how you're supposed to learn: explain the content, then show it, let us test it to prove, and success!

  • @MichaelMorenoPhilosophy
    @MichaelMorenoPhilosophy Před 3 lety +84

    If any of you are having trouble with the line shader at 17:49 because you're using 2020.2.1f1 and don't have 2D Render, do Create > Shader > Universal Render Pipeline > Sprite Lit Shader Graph. It's important for you to do Lit instead of Unlit even though Valem's is unlit, because if you do Unlit the end result will just be black/transparent for some reason. Also, you need to make sure you connected the A(1) value from the Sample Texture 2D output to the Alpha input for the fragment.

    • @jetson35
      @jetson35 Před 3 lety

      universal render pipeline dosnt show up

    • @MichaelMorenoPhilosophy
      @MichaelMorenoPhilosophy Před 3 lety

      @@jetson35 what options show up?
      Also if you have a discord, join Valem's server and ping me, same name Michael Moreno. We can chat there.

    • @jetson35
      @jetson35 Před 3 lety

      @@MichaelMorenoPhilosophy i sent you a message on discord with a picture

    • @sammywills148
      @sammywills148 Před 3 lety +2

      Thank you so much! Worked for me

    • @durgam_sumerian7815
      @durgam_sumerian7815 Před 3 lety +2

      Worked with me, you are a lifesaver.

  • @themaydayman
    @themaydayman Před 2 lety +7

    Can’t believe how future proof this tutorial is, watching in 2022. Great job! Best toturials I have ever followed.

    • @HazardIg
      @HazardIg Před 2 lety

      Hey since you're the nearest date I can find, I'm having troubles with the whole locomotion thing. So I ass the locomotion system and the teleportstion provider, but when I start only the teleportation provider auto syncs.. I also can't put my XR Rig into the Locomotion thing

    • @HazardIg
      @HazardIg Před 2 lety

      Am on V 2021.3.0f1 if that helps

    • @themaydayman
      @themaydayman Před 2 lety

      @@HazardIg I’m not available to help for the week sorry

    • @themaydayman
      @themaydayman Před 2 lety

      I’m in a place without Unity, I don’t have a laptop

    • @HazardIg
      @HazardIg Před 2 lety

      @@themaydayman Oh its all good, I ended up figuring it out by making a whole new XR Origin. Thanks tho :)

  • @HeinrichBerger96
    @HeinrichBerger96 Před 2 lety +17

    For people doing this tutorial in newer versions of Unity/XRInputSystem where the Grip doesn't work to teleport: we use device-based scripts in this whole series, but the new default Ray Interactor is action-based. Just delete the XR-Controller (action-based) and create a new XR-Controller (device-based). Afterwards everything should work fine.

    • @JS2k85
      @JS2k85 Před 2 lety

      God bless you, man!!!

    • @ionanik98
      @ionanik98 Před 2 lety

      super!!!

    • @machinedreams9625
      @machinedreams9625 Před 2 lety

      Thanks! Life Saving Comment.

    • @playstationpringle
      @playstationpringle Před 2 lety

      I would recommend sticking with action based as it is better optimised and is much easier to use if you plan on working with custom inputs, the easiest way to do this is to create a custom input and place it in the reference spot for select action. Hope this helps :)

    • @artissciencescienceisart5930
      @artissciencescienceisart5930 Před rokem

      This worked!!!!

  • @Seva98a
    @Seva98a Před 4 lety +13

    You are explaining things very well. I love to hear deep dive into those VR problematics.

    • @e1ic1
      @e1ic1 Před 3 lety

      well but way to quick

  • @kanerogers7717
    @kanerogers7717 Před 3 lety +37

    If you run into a problem where the reticle keeps flickering, it's because you didn't listen to Valem and remove the colliders from *both* Cylinders. :)

  • @cedricknapp2889
    @cedricknapp2889 Před 4 lety +6

    I've been wanting to learn about Unity's URP shader graph so badly but have been kind of intimidated until I saw it broken down like this! Thanks a ton!
    Your teleport system looks great and polished! I love how you showed a simple "get it working" start of your video, but then went on to further polish and improve it!

  • @A_C_007
    @A_C_007 Před 4 lety +5

    Holy crap you pack a lot of info into 25mins! Thanks for this and your no bs approach, I was having the hardest time finding XR info that is relevant to the new XR system until someone referred me to your channel. Will do patreon once I get caught up!

    • @ValemVR
      @ValemVR  Před 4 lety +2

      Thank you man im glad you enjoyed the video 😊

  • @THOMASXDXDXDXD
    @THOMASXDXDXDXD Před 4 lety +43

    If anyone is having a problem where they have to try to teleport multiple times to actually teleport, then I will share with you something that worked for me.
    When the controller's trigger is pressed over the teleportation area (or anchor), the teleport ray is set active and the player selects the teleportation area (or anchor).
    Teleportation is triggered when the controller's trigger is released and the player unselects the teleportation area (or anchor).
    The script that selects or unselects the teleportation area when the trigger is pressed or released is the XR Teleport Interactor.
    The problem is sometimes teleportation is not being triggered because we deactivate the teleport ray as soon as the trigger is released and before the XR Teleport Interactor can unselect the teleportation area (or anchor).
    Since the teleportation area (or anchor) is never being unselected, the teleportation is never triggered.
    To fix this, I added just 6 lines of code to the Locomotion Controller script:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.XR;
    using UnityEngine.XR.Interaction.Toolkit;
    public class LocomotionController : MonoBehaviour
    {
    public XRController leftTeleportRay, rightTeleportRay;
    public InputHelpers.Button teleportActivationButton;
    public float activationThreshold = 0.001f;
    private XRRayInteractor rightRayInteractor;

    • @Mercu4a
      @Mercu4a Před 4 lety +3

      Thanks, worked!

    • @davidfu8174
      @davidfu8174 Před 4 lety +2

      Thanks it got it to work, however, my teleport works on button down, not button up. I'm not sure where the problem is.

    • @THOMASXDXDXDXD
      @THOMASXDXDXDXD Před 4 lety +2

      @@davidfu8174 The problem might be in your Teleportation Area script. Check that the Teleport Trigger field is set to "On Select Exit".

    • @yohosuff
      @yohosuff Před 4 lety +3

      I was able to solve this problem a different way. As Thomas mentioned, the teleport fails because the teleport ray is disabled before the teleportation occurs. If we can wait for the teleportation to complete before disabling the teleport ray, then the problem should go away. One way to postpone the disabling of the teleport ray is to wait for the next frame as the code below shows. Also, note that the teleport ray is enabled and disabled only when the teleport button was just pressed, or just released.
      using System.Collections;
      using UnityEngine;
      using UnityEngine.XR.Interaction.Toolkit;
      public class LocomotionController : MonoBehaviour
      {
      public XRController leftTeleportRay;
      public XRController rightTeleportRay;
      public InputHelpers.Button teleportActivationButton;
      public float activationThreshold = 0.1f;
      public bool leftTeleportEnabled { get; set; } = true;
      public bool rightTeleportEnabled { get; set; } = true;
      private bool leftButtonPressedLastFrame = false;
      private bool rightButtonPressedLastFrame = false;
      public GameObject leftTeleportReticle;
      public GameObject rightTeleportReticle;
      void Start() {
      InitializeTeleportRay(leftTeleportRay);
      InitializeTeleportRay(rightTeleportRay);
      }
      void InitializeTeleportRay(XRController teleportRay) {
      if(!teleportRay) { return; }
      teleportRay.gameObject.SetActive(false);
      }
      void Update()
      {
      ManageTeleportRay(leftTeleportRay, ref leftButtonPressedLastFrame, leftTeleportReticle, leftTeleportEnabled);
      ManageTeleportRay(rightTeleportRay, ref rightButtonPressedLastFrame, rightTeleportReticle, rightTeleportEnabled);
      }
      void ManageTeleportRay(XRController teleportRay, ref bool buttonPressedLastFrame, GameObject teleportReticle, bool teleportEnabled) {
      if (!teleportRay) { return; }
      // get the state of the teleport button
      InputHelpers.IsPressed(teleportRay.inputDevice, teleportActivationButton, out bool isPressed, activationThreshold);
      bool buttonJustPressed = isPressed && !buttonPressedLastFrame;
      bool buttonJustReleased = !isPressed && buttonPressedLastFrame;
      if(buttonJustPressed && teleportEnabled) {
      teleportRay.gameObject.SetActive(true);
      // this stops the reticle from appearing by the player's feet for 1 frame every time the teleport ray was activated
      teleportReticle.SetActive(false);
      } else if (buttonJustReleased) {
      // if we disable this object this frame, then the teleport won't work, so do it next frame
      SetActiveNextFrame(teleportRay.gameObject, false);
      }
      buttonPressedLastFrame = isPressed;
      }
      public void SetActiveNextFrame(GameObject gameObject, bool active) {
      StartCoroutine(SetActiveNextFrameHelper(gameObject, active));
      }
      IEnumerator SetActiveNextFrameHelper(GameObject gameObject, bool active) {
      yield return null; // stackoverflow.com/a/39269012/1455558
      gameObject.SetActive(active);
      }
      }

    • @conraddugger4165
      @conraddugger4165 Před 4 lety +2

      THANK YOU THANK YOU

  • @glebo8921
    @glebo8921 Před 3 lety +12

    For anyone using a newer version of Unity, I was stuck with a white line that wouldn't move (was not dotted). I used the URP Sprite Unlit and made sure to add the A(1) from the Sample Texture 2D node to the Alpha(1) Fragment. It basically didn't have an alpha channel to make it see through. I encourage everyone to put different textures in the material and play with settings because I got some really neat effects from random pngs I had.

  • @rjerezc
    @rjerezc Před 4 lety +11

    Amazing serie. I really wanted an updated tutorial for VR with Unity. I really expect to see a tutorial for setting up a full body avatar on XR.

  • @thepsychonauticgamer3469
    @thepsychonauticgamer3469 Před 4 lety +2

    This is by far the best tutorial I've seen. Such a dedicated tutor! Hats off!

  • @NinoSilvaLopez
    @NinoSilvaLopez Před 3 lety +3

    This was great, took like 4 hours to actually build it but feels so satisfying at the end. Really good stuff, thanks!

  • @tacticalmythic7945
    @tacticalmythic7945 Před 2 lety +10

    FYI for 1:27 its not under Devices -> ray interactor: do not choose action based. Rather it needs to be Device Based. Just a helpful tip for those who are lost :)

  • @stuartwilson4960
    @stuartwilson4960 Před 4 lety +31

    The funny thing about shader graph is that you don't need to know programming, you need to know programming and shader graph.

  • @mittensandsnowdrop
    @mittensandsnowdrop Před 2 lety +1

    This series has been amazing so far. You are a great teacher. Everything is really well explained and I love your enthusiasm! You have helped me so much with my own VR project. Thank you!

  • @ToastyHeresStreamArchive
    @ToastyHeresStreamArchive Před 4 lety +6

    If you're having issues getting the Dotted Line shader to appear in game (it remains invisible after following the steps exactly) and are on a later version of Unity, I managed to get it to show by changing the final node in the Dotted Line shader from "Sprite Unlit Master" to "Sprite Lit Master" (be sure to hook it up and set it to active).
    Note: I have no real knowledge of the shader and the ramification of that change in the grand scheme of things, but it gets the line to show up so its good enough for me for now

    • @JackTYM
      @JackTYM Před 4 lety

      tysm you saved me so much time haha

    • @NamidaSai
      @NamidaSai Před 4 lety

      Legend!

    • @succulentsnake
      @succulentsnake Před 3 lety

      Thank you man! I was having the same problem and you saved me :)

    • @A_C_007
      @A_C_007 Před 3 lety

      I upgraded my project to 2020.1.4f1 and had this problem. This fixed it after I struggled myself to fix it for 2 hrs damn it. Thanks!

    • @rollizle
      @rollizle Před 3 lety

      Thank you! Worked great! :D

  • @jovenoculto
    @jovenoculto Před 4 lety +30

    Complete code:
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.XR.Interaction.Toolkit;
    public class LocomotionController : MonoBehaviour
    {
    public XRController leftTeleportRay;
    public XRController rightTeleportRay;
    public InputHelpers.Button teleportActivationButton;
    public float activationThreshold = 0.1f;
    // Update is called once per frame
    void Update()
    {
    if(leftTeleportRay)
    {
    leftTeleportRay.gameObject.SetActive(CheckIfActivated(leftTeleportRay));
    }
    if (rightTeleportRay)
    {
    rightTeleportRay.gameObject.SetActive(CheckIfActivated(rightTeleportRay));
    }
    }
    public bool CheckIfActivated(XRController controller)
    {
    InputHelpers.IsPressed(controller.inputDevice, teleportActivationButton, out bool isActivated, activationThreshold);
    return isActivated;
    }
    }

    • @JackTYM
      @JackTYM Před 4 lety +1

      THANKS! I had a line wrong in my code and this solved it :)

    • @Harlow.
      @Harlow. Před 4 lety +3

      hippity hoppity your code is now my property

    • @mrbotytgaming
      @mrbotytgaming Před 2 lety +1

      Dani: >:)

  • @1playfair
    @1playfair Před 3 lety

    Pretty much spent my entire day, taking notes and following along with small breaks in between to digest what I was learning and appreciate the VR'ness of things. You are the best bro. Keep it up. Hardly had any issues at all and things work great. Learned a ton.

  • @tulioperez6011
    @tulioperez6011 Před rokem

    best unity tutorials yet

  • @andresrodriguez3930
    @andresrodriguez3930 Před 3 lety

    For those who do not have the Universal Shader Pipeline option showing up when creating a shader for the reticle, you need to install the Universal RP in the package manager. Window -> Package Manager, then search for "Universal RP" and click install. Amazing Tutorials Valem!

  • @elyakimlev
    @elyakimlev Před 3 lety +2

    Great tutorial!
    Tip: If you want to be able to teleport to one platform after initially pointing at another, remove the check on "Keep Selected Target" under Selection Configuration in the XR Ray Interactor component.

    • @Novecento
      @Novecento Před 2 lety

      Great tip but I cannot find Selection Configuration nor "Keep Selected Target" anywhere in the XR Ray Interactor script. Where can I find it?

    • @michaelcooper2781
      @michaelcooper2781 Před 2 lety

      Thanks for this, didnt notice this issue until after I was done, nice to see their was an easy fix.

  • @clownsheep22
    @clownsheep22 Před 3 lety

    Wow you pack more content into 20 minutes than most would into a 3 hour video. It's so dense with info! Thanks! Liked and subbed.

  • @Moon8erson
    @Moon8erson Před 3 lety +34

    Thank you for great tutorial. In my case, unity 2020.2, line renderer materials shader must be 'Sprite lit shader graph'. Hope help somebody.

  • @jakephillips6077
    @jakephillips6077 Před 3 lety

    3rd time going through this tutorial series but first time getting to the third episode, took me a while to be ready to understand some of these things but glad I persevered!

  • @ctrlaltdude
    @ctrlaltdude Před 3 lety +3

    You have to install Shared Graph from the package manager to be able to select it in the universale renderer list (11:15).
    And you also have to install the Universal Render Pipeline (Universal RP) from the package manager.

    • @nihao20
      @nihao20 Před 2 lety +1

      The option did show up, but it also turned the entire world bright pink. . .

  • @callmecancer5425
    @callmecancer5425 Před 4 lety +6

    If you could make a video about how to make a working knife it would be useful for others trying physical combat or maybe a link to a tutorial.

  • @newvisionsprojectgamedevel7838

    Easy to follow. Tutorial has a good pace. Awesome!!!

  • @absolutechad631
    @absolutechad631 Před 3 lety

    This guy, this guy over here is a legend

  • @9999iiiioooo
    @9999iiiioooo Před 4 lety +3

    i love this series, it's a necessity since vr moves so quick, do you have a list of the future parts of this series?

  • @MagieCannizzaro
    @MagieCannizzaro Před 4 lety +2

    Great and very clear video, thank you!!

  • @richardosborn159
    @richardosborn159 Před 3 lety

    thank you for high quality material.

  • @jonathansmith2115
    @jonathansmith2115 Před 3 lety

    Love your tutorials, so enlightening - Thank you sir

  • @VMartinez144
    @VMartinez144 Před 3 lety

    God mode tutorials! Thank you very much :D

  • @em30142
    @em30142 Před 3 lety

    Valem sir, you have made some fantastic tutorials.

  • @abbas.jafari
    @abbas.jafari Před 4 lety +3

    For those who can't teleport after adding if statements in update for checking active teleport ray, just chage Update with LateUpdate.

    • @eliserwiedemann5221
      @eliserwiedemann5221 Před 4 lety

      Awesome! Exactly the issue I ran into. Your solution solved may problem.

    • @PhantomWolf93
      @PhantomWolf93 Před 4 lety

      This solved my problem, but i dont know why. Can you explain why the Update doesnt work for me? Because Valem used the normal Update.
      Thanks!

    • @aradjafari
      @aradjafari Před 4 lety

      @@PhantomWolf93 LateUpdate will be run after Update. XRController check pressing button in a Update method so you need check pressing the button after XRController class, and with LateUpdate you will do it.

  • @D-Dev
    @D-Dev Před 4 lety +8

    Great video, but i've got a little problem I don't see my reticle in Oculus Quest. I create prefab and drag into reticle field but when teleport is valid it doesn't shows up.

  • @loganrox9
    @loganrox9 Před 4 lety

    great series of tutorials so far i look forward to more :)

  • @galaktik4058
    @galaktik4058 Před 3 lety +1

    14:25 the tops on the bottom and the bottoms on the top

    • @Rhydonal
      @Rhydonal Před 3 lety

      At the core, I've forgotten (in the middle of my thoughts)

  • @piola4214
    @piola4214 Před 3 lety

    you have future mate... you explain very well thanks

  • @sambrown2427
    @sambrown2427 Před 4 lety

    tutorials are fantastic, couldn't get shaders working properly but everything else is!

  • @IasonGiraud
    @IasonGiraud Před 4 lety

    really good job on getting things in order. Keep it up!

  • @vladimirnepor6167
    @vladimirnepor6167 Před 4 lety +1

    Great tutorial. There's only 1 missing feature - to disable teleport into areas with an obstacle between ground and xr camera (e.g. below a table)

    • @JackTYM
      @JackTYM Před 4 lety +4

      you can just put an object in spaces like that and make it invisible :)

  • @puquest
    @puquest Před 2 lety

    this is amazing i was looking for a course its better than all of the course i have ever had

  • @64jcl
    @64jcl Před 2 lety +2

    In later "XR Controller (Action-Based)" the action system has been changed so you cant set e.g. which action does what like you do at 6:10 . It seems you have to open the XRI Default Input Actions and adjust the mapping there. The actions listed there even have "Teleport Mode Activate", "Teleport Mode Cancel" and "Teleport Select" but none of these seems to be in the XR Controller component config, so a bit at a loss at how I can change this. I actually prefer to use e.g. the touch pad to show the teleport ray and release it to go there as both the grip and trigger are often used for other things.

    • @jessynisas8753
      @jessynisas8753 Před 2 lety

      I have the same issue, how can we do it now ?

    • @64jcl
      @64jcl Před 2 lety +1

      @@jessynisas8753 , I found another tutorial by a guy called Daniel Stringer who goes over this and where you actually have to juggle two different XR Controllers, one for the teleport and another for interaction and where you have a script that triggers which one is active based on the state of the thumbstick (which is also a good teleport trigger and likely one that I will use myself).

    • @jessynisas8753
      @jessynisas8753 Před 2 lety

      The solution here : czcams.com/video/wGvh7Suo1h4/video.html

    • @jessynisas8753
      @jessynisas8753 Před 2 lety

      @@64jcl Thx you I just saw your comment !!

  • @norsemangef1539
    @norsemangef1539 Před 3 lety +1

    these r amazing tutorials

  • @andrewkibor9581
    @andrewkibor9581 Před 2 lety

    Thanks for the reminder at 8:24

  • @blissofkundalini
    @blissofkundalini Před 3 lety

    Still with you at 20:10 and mind-blown *haha*, what a great tut

  • @Rhydonal
    @Rhydonal Před 3 lety

    If you notice, setting the Teleport Reticle to active each frame restarts the particle system, so it doesn't show any particles at all. You can skip setting it to active if it's already active with "if (!leftTeleportRay.activeSelf){ leftTeleportRay.SetActive(leftTeleportButtonState); }".
    If using the new Input System with a Player Input component to call a function, you may also want to enable/disable the target reticle Game Object in an if statement too, as I found that the Teleport Ray Game Object was disabled before the script got around to disabling the Target Reticle, so the reticle remains in place even after a teleport is executed.
    Hope this helps anyone else with the same issues. :)

  • @Anthony-ig6ds
    @Anthony-ig6ds Před 3 lety

    Thank you man. All I got.

  • @matthewjorgenson4708
    @matthewjorgenson4708 Před 4 lety

    First tutorial where I had no problems :D

  • @Seabess
    @Seabess Před 2 lety +2

    for those in 2021 or later you have to put the right teleport ray inside the right hand or else it wont show up when you play the game

    • @xSwalshx
      @xSwalshx Před 2 lety

      Mate! you're my hero today!

  • @Project-NSX
    @Project-NSX Před 3 lety +1

    For anyone that has a bug where they are unable to teleport to a valid area when beginning the teleport from an invalid area: Change "Keep Selected Target Valid" to false in the XR Ray Interactor

  • @asbjorn.mejlvang
    @asbjorn.mejlvang Před 3 lety +3

    How do you change from grip->trigger in an action-based setup?

  • @alexvandenberg3371
    @alexvandenberg3371 Před 4 lety +1

    you are a legend

  • @ljumljum
    @ljumljum Před 3 lety +1

    You my friend, are an awesome teacher. Although I would probably watch this for the accent alone!

  • @sbssvr5843
    @sbssvr5843 Před 3 lety

    Muy bueno! gracias por estos videos!

  • @mrslake7096
    @mrslake7096 Před 3 lety

    Thanks a lot, very helpful

  • @kurtisharen
    @kurtisharen Před 4 lety +6

    I followed the tutorial and did everything according to how you did it, but I've got a very minor bug in mine. The color-ramp cylinder on the target reticle seems to show a bit of z-flickering or whatever it's called on the base. (The flickering when two planes perfectly overlap) Any idea why, and how to fix it? Other than that, everything works the way it should, except that I left out the leftTeleportRay and only used the right side instead.

    • @justinsmith9591
      @justinsmith9591 Před 3 lety +2

      Have you figured this out? You may have to remove the collision layer.

    • @endasil
      @endasil Před 3 lety +2

      I had that too, so I increased the Y position of the Cylinder so that it no longer collided with the ground.

  • @stephenmackenzie9016
    @stephenmackenzie9016 Před 3 lety

    Nice 👍🏻👍🏻👍🏻

  • @maratzahidulin5193
    @maratzahidulin5193 Před rokem

    Awesome

  • @dodicenne12
    @dodicenne12 Před 4 lety +8

    Hello there, everything worked for me, except when we change the default texture of the ray into the our one, in facts, when i set the material to "Default-Line" everything works fine, but when I insert the custom one it disappears, i followed the tutorial two times so everything I have is exactly equal to yours... Any ideas?

    • @dodicenne12
      @dodicenne12 Před 4 lety +11

      Resolved, worked fine using the "Sprite Lit Graph" instead of the ""Sprite Unlit Graph"

    • @Bystry95
      @Bystry95 Před 4 lety +1

      @@dodicenne12 Thanks dude, it works.

    • @ljumljum
      @ljumljum Před 3 lety

      Thanks.

    • @phelipepalte
      @phelipepalte Před 3 lety +1

      @Valem Can you comment it in video?

    • @jmmpptd
      @jmmpptd Před 3 lety

      Helped me too, thanks mate !

  • @omnia4964
    @omnia4964 Před 3 lety +2

    Everything works great except if I press the triggers on both controllers at the same time the teleport gets spammed and I quickly slide off of the teleport area.

  • @CGPepper
    @CGPepper Před 4 lety +32

    It's crazy how a setup from 2 month ago is no longer relevant. Let's hope that XR is here to stay

    • @MikeMagnonimo
      @MikeMagnonimo Před 4 lety +1

      4 months before we used to import uculus integration from asset store and done! but look how it is now!

    • @MikeMagnonimo
      @MikeMagnonimo Před 4 lety

      @@flurishart612 yeah!!!! But is quite for now!

    • @jakubpukovec7755
      @jakubpukovec7755 Před 3 lety +1

      The setup still works for me but I'm switched to action based controllers anyway. But I was unable to get the striped line working. No succees at all here. with the shader graphs dotted line I still see the original full line. Still excellent tutorial, this is only one detail.

  • @HenshinAsset
    @HenshinAsset Před 3 lety +5

    @Valem - I cant get the Dotted line to work. There is nothing in the preview so I don't get any dotted lines appearing for the line of the reticle. Followed the tutorial exactly but can't see why its not working. An preview appears if I switch the shader to Sprite Lit but the material isn't used by the teleport Ray so its still a basic line.

    • @gunbowling2-vrgamedevlog682
      @gunbowling2-vrgamedevlog682 Před 3 lety +5

      ToastyHere
      5 months ago
      If you're having issues getting the Dotted Line shader to appear in game (it remains invisible after following the steps exactly) and are on a later version of Unity, I managed to get it to show by changing the final node in the Dotted Line shader from "Sprite Unlit Master" to "Sprite Lit Master" (be sure to hook it up and set it to active).

    • @xMaciek602x
      @xMaciek602x Před 3 lety +1

      @@gunbowling2-vrgamedevlog682 Great! Thank you it works!

    • @Rhydonal
      @Rhydonal Před 3 lety +1

      Thanks so much! Problem solved. :)

    • @alsrl7503
      @alsrl7503 Před 3 lety +1

      @@gunbowling2-vrgamedevlog682 thank you! problem solved it works

  • @anissmhd_
    @anissmhd_ Před 8 měsíci

    whoever facing problem the Shader Graph doesnt turn transparent in Unity 2022.3.15f, go to Graph Inspector under Color Ramp (tutorial) >> Graph Settings >> Target Setting >> Active Built In & Universal >> Surface Type: Transparent >> Depth Write: ForcedEnabled. for both.Dont Forget to save asset.

  • @Mtech7752
    @Mtech7752 Před 4 lety +5

    Thank you for those tutorials! It helped me a lot. But I have a problem with the teleportation system. When I start the game, I am on top on the plane as I should be. The colliders work. But when I am teleported, my my entire rig is at the ground level, precisely where the raycast hit. And because I followed the next tutorial about the continuous movement, Im falling from the plane. I dont know whats going on^^

    • @nicolasbarone9306
      @nicolasbarone9306 Před 4 lety +2

      this is exactly what happens to me its really annoyin

    • @BijunaKVinod
      @BijunaKVinod Před 2 lety

      bro try increasing the size of you xr rig.It worked for me😇

  • @k1ng401
    @k1ng401 Před 2 lety

    I had the "teleport stops working after adding the Locomotion Controller script part at the end" but in my case it was because my XR Controller Select Usage was set to "Trigger" while my Locomotion Controller script Teleport Activation button was set to "Trigger Button". They have to be the same.

  • @orin4654
    @orin4654 Před 3 lety

    great tutorial!

  • @andrewperez7844
    @andrewperez7844 Před 3 lety

    Was met with compiler errors after copying the script in the last section. It could be due to the newest XR plugin and recent update. Everything else worked perfectly!

  • @CreativityByRiky
    @CreativityByRiky Před 3 lety +1

    Hi, I have a ray which I want to pick up objects with. But instead of it snapping to my hand, I want the object to stay at the end of the ray at all times. What are your suggestions?

  • @AkatDeen
    @AkatDeen Před 4 lety +1

    great unity XR tutorial i've ever see. btw i have 2 questions:
    1. how to make the reticle only appear on top of the collision box (y axis only)
    2. how to create a directional pointer to let the player facing that direction once teleported

  • @justkeepdrone501
    @justkeepdrone501 Před 3 lety +2

    I am only seeing a Ray Interacter (Action-Based) which does not allow me to link it to a controller. Is this due to an update or am I missing something?

    • @justkeepdrone501
      @justkeepdrone501 Před 3 lety +3

      I found it, Its now under "Device Based - Ray Inercater

    • @digdawg2833
      @digdawg2833 Před 3 lety

      @@justkeepdrone501 verrrryyy helpful thank you!!

  • @chrisngw1477
    @chrisngw1477 Před 4 lety +3

    Can you teach on how to making knives in the game?

  • @lucsilva6265
    @lucsilva6265 Před 2 lety +1

    hi, I'm stuck on the part about the dotted line, I followed every step I'm on a new version. someone plz help me.

  • @davidcseh3238
    @davidcseh3238 Před 4 lety +2

    Hey Valem! Great tutorial and really great channel, lot of useful things thank you! I have one problem with this solution: If you select an area (hold the trigger) and you move the teleporter to a different area before releasing the trigger UnityXR thinks your target is invalid so it does not let you teleport. I think this could be caused by the XR system, probably they intended to only select a hovered object and Unity XR does not let us change the selection. Can you think of any way to fix this? Thank you! David

  • @reitax
    @reitax Před 3 lety +2

    Searched and read through all XR documentation that i could find and also tried to come up with own ideas, but I am simply lost due to having no idea where to start tbh:
    Got teleport up and running as shown in the video.
    I wanna do 2 changes though:
    1) Instead of using the trigger button, i want to use every 360° direction of my controller sticks. Unfortunately the XR configuration menu only allows 2DAxis Up, Down, Right or left. Cant even set all 4 at once, only one. Opening up the script and trying to change it manually only throws a compile error at me.
    2) If that works, i'd want to implement the same teleport orientation system, that Robo Recall uses.
    Upon pressing your controller stick in any direction, your teleport beam shows you where to teleport to. Then you can adjust your "forward after teleportation" direction by turning your stick.
    Pretty sure OVR plugin had a native feature, but can't find that in XR.
    I guess you'd have to write your own script for that, but I simply lost :(

    • @andrewperez7844
      @andrewperez7844 Před 3 lety +1

      Just saw that Unity is using a new package called "XR Plug-in Framework" which changes things from this tut. Could be why you're having a problem?

    • @reitax
      @reitax Před 3 lety +1

      @@andrewperez7844 kind of yeah. Definitely helped me a lot.
      I had to rewrite some of my code, but so far I'm satisfied!

  • @randomstuff8644
    @randomstuff8644 Před 3 lety +4

    When I'm chosing the shader I don't have Universal Render Pipeline Unlit dose any one know how to get it I'm on version 2020.2.1f1

    • @durgam_sumerian7815
      @durgam_sumerian7815 Před 3 lety

      You probably made a project with the normal 3D unity, not with the URP, if you did so recreate a new URP project. And if you already did and still do not have it, you can go to Window => Package Manager, and from the "In project" drop-down menu check if the Universal RP installed, also you hv to be sure the shader graph installed as well from the Unity Registery drop-down menu.

    • @randomstuff8644
      @randomstuff8644 Před 3 lety

      @@durgam_sumerian7815 Thank you

  • @sickerpuppies
    @sickerpuppies Před 4 lety +4

    Hey great vid. I've followed along a good number of your tuts with great success. Thanks so very much for putting these together.
    I've got a small issue where my reticle stays after I teleport. Originally I had an issue whereby it wouldn't show up at all so now I've got it as a deselected game object (deselected in inspector, but still "in the game"). I'm not sure if I need to add something to the code to destroy the object, or an interactor event, or I've just got some setting wrong.

    • @chewbaccabox
      @chewbaccabox Před 4 lety +2

      He didn't show that he made the reticle children of the ray. The ray should be parent of the reticle so it gets deactivated when the ray is too.

    • @sickerpuppies
      @sickerpuppies Před 4 lety +2

      @@chewbaccabox Yes, that did it! Thanks so much :)

    • @Chiborro
      @Chiborro Před 3 lety

      @@chewbaccabox Very thanks!

  • @blissofkundalini
    @blissofkundalini Před 3 lety

    You're the best!

  • @serpnta1267
    @serpnta1267 Před 4 lety

    Great!!!! Looking forward to the next one!

  • @nicolasbarone9306
    @nicolasbarone9306 Před 4 lety

    love it

  • @voffer10
    @voffer10 Před 3 lety

    Nice!

  • @Auberry126
    @Auberry126 Před 3 lety

    I had an issue where once the Locomotion controller script was added, I would be unable to teleport from one object to another. (Think a 3x3 grid of planes. I would be unable to teleport if I held the trigger while aiming at one platform, and moved my aim to another platform and let go).
    The solution to this was to *uncheck* "Keep Selected Target Valid" on the XR Ray Interactor script.

  • @64jcl
    @64jcl Před 2 lety

    So after figuring out that you need to create a "Universal Render Pipeline" in order to make shaders work, and learning how to convert the whole project to that (fortunately they have made it rather easy) I then got stumped by particles that does not seem to auto play like Valem's does here. I can play them manually in the editor and see them working there but in the game, once the reticle is showing with the child particle system it doesnt seem to auto play or whatever is needed to get that going ... or perhaps there is something that needs to be turned on in order for it to render particles for my WMR device (Samsung Odyssey+)?

  • @knlbn
    @knlbn Před 2 lety

    Hey,
    Im using the same version but have a different menu for the XR controller @2:00 . curious as to how to do it with the updated menu as ive hit a roadblock now.
    Cheers guys
    PS thankyou so much for the amazing videos valem :)

  • @TheSolsboer
    @TheSolsboer Před 4 lety +1

    Please make tutorial for distance grab in steavvr

  • @Case1303
    @Case1303 Před 4 lety +1

    Hi Valem, do you know how to create a second camera on the PC as a spectator view?

  • @blissweb
    @blissweb Před 3 lety

    Awesome video although looks like will need a 1 week course on just "shaders". Can copy what you did, but it all looks a bit mystical. 😅

  • @mateuszhalada217
    @mateuszhalada217 Před 2 lety

    Sick series, I had a couple of problems with this entry though. 1: If I put the TP Reticle from prefabs, it does not spawn at all. 2: If I have the Locomotion Controller Script enabled, the teleport itself doesnt work but the lines appear/disappear correctly, at the same time if I have the Reticle from prefabs it doesn't appear, If I have the reticle selected from Hierarchy from a prespawned object it moves to the ray, but doesnt disappear/move again after. And 3: the custom ray/animated ray shader does not appear to work for me. I'm on unity 2021.2.9f1

  • @tomogram.
    @tomogram. Před 2 lety

    Hello. I just cannot find all the menus that you show... For example in my programm i cannot see xr interaction toolkit

  • @Jomesba
    @Jomesba Před rokem

    The dotted line doesn't work for me, the material just shows up as magenta. I'm using URP's Shaders. I set the A(1) to A(1), I tried using lit and unlit sprite shader graphs but just purple. Even If if I just connect a blank color node to the shader it doesn't work. Any Help?

  • @MrPine656
    @MrPine656 Před 3 lety +1

    I'm having an issue where my reticle is blinking. Not sure why

    • @BuckKonishi
      @BuckKonishi Před 3 lety

      Remove the collider from the cylinder object on your reticle.

  • @nielisson1
    @nielisson1 Před 3 lety +2

    hi! ty for your tutorial! At the end of the tutorial, you drag the XR controller into the Locomation Controller Script...I can't drag anyting into that field. I wonder what I did wrong.

    • @rudywebb9998
      @rudywebb9998 Před 2 lety

      Did you figure out what went wrong, currently experiencing the same problem?

    • @nielisson1
      @nielisson1 Před 2 lety

      @@rudywebb9998 i can't remember. Sorry

    • @rudywebb9998
      @rudywebb9998 Před 2 lety

      Was it something in the code or just in unity?

  • @klortak
    @klortak Před 4 lety +1

    when i rotate my hand the recticle slightly rotates as well, its also showing up as an oval when both the numbers on the x and z scale are the same,. can someone help im on oculus quest

  • @donaldhurld2962
    @donaldhurld2962 Před 3 lety +2

    So you can see this issue at about 24:04, but when you start attempting to teleport in one area and then drag into a different area/anchor, the teleport is no longer valid (only when the hiding code is applied). Anyone know how to fix this? I've been trying to tweak the LocomotionController code for a bit to no avail.

    • @mohammadrazakhan3852
      @mohammadrazakhan3852 Před 3 lety

      I am getting an error in the locomotion controller code.
      "LocomotionController.cs(11,12): error CS1519: Invalid token 'float' in class, struct, or interface member declaration

    • @mohammadrazakhan3852
      @mohammadrazakhan3852 Před 3 lety

      Did you got any solution ?

    • @lovelymammoth
      @lovelymammoth Před 2 lety +1

      Go to XR Ray Interactor and under Selection Configuration uncheck 'Keep Selected Target Valid'

  • @twizzardx
    @twizzardx Před 4 lety +5

    Do a tutorial on how to add guns

  • @thatgreenmonke4528
    @thatgreenmonke4528 Před 2 lety

    my Teleport Reticles just stay on the ground if i let go of my teleport activation button while pointing at the ground did i miss something?

  • @Dizzl176
    @Dizzl176 Před 3 lety +1

    All the things I make using the Universal Render Pipeline comes out purple