Hi guys, hope everyone is safe & well! hope you get on okay with the video.
@shiaosung84013 жыл бұрын
I have been struggling with debugging with old tutorials, and yours have guided me to success within 30 minutes. You deserve more followers! Awesome tutorial!
@Cappsy3 жыл бұрын
This is the first ActionBased teleport tutorial I've found that properly addresses how to set this up in the way you'd expect, and brilliantly explained too. Hope a lot more people find this and your channel, mate.
@UnityVR3 жыл бұрын
Thanks Jonathan!
@ky05h1r02 жыл бұрын
Hands down, THE best XR Action-Based Interaction tutorial on KZbin. I watched soooo many other tutorials, and still could not wrap my head around this system. The logic behind your method was immediately apparent to me, which is the most important thing a tutorial should do. Rather than just blindly following along, I can now use this same setup to call actions for a wide variety of control schemes. THANK YOU! Instant sub.
@livjonsson7422 жыл бұрын
Thanks for a really good KZbinChannel with good tutorials! Just a tip for all of you out there - You can use corutine with waitForSeconds with floatvalue if you want to shorten the time for the ray to disable after teleporting. I shortened it down to 0.1f instead of 1f. I am new at this so it might be somtehing better out there but here you go .:-)
@UnityVR2 жыл бұрын
Thanks Liv!
@NightSpyderTech3 жыл бұрын
First full action based locomotion tutorial and the only one that got me teleporting properly without additional help. Awesome job! There is a new king of XRIT!
@enity943 жыл бұрын
Perfect! I've been struggling so long because other tutorials use Device-based setting and finally I found this awesome channel! You are a life-saver! Can't even express how grateful I am :D
@Gamovore2 жыл бұрын
Hi! So just to be sure I understood correctly, the teleportation script provided by Unity forces you to use the 'Select' input action to teleport so that's why we need to specify another input action for 'Select Action' in the XR Controller component? We kinda override this input action with another? Is that right? If so they should really rework their teleportation script and let us chose the input action we wanna use haha. Thanks a lot for the video!
@zombizombi2 жыл бұрын
That's my understanding too. I think what they should have done is put Input References on the ray interactor. The method in the video works but it feels like a cheap hack.
@learnwithsam2003 жыл бұрын
Your tutorial is soo good and clear!! Thanks a lot mate!!
3 жыл бұрын
Thanks a million! Third method i tried today. This is how it should be done.
@64jcl3 жыл бұрын
Ok cool, with this nice tutorial I have finally tp working on the thumb stick and picking up with the grab button. Now the only issue I seem to have is that the teleport reticle isnt removed from the spot where I teleport, very odd bug. I wonder if its a race condition where the teleportcontroller is disabled before its been able to remove the reticle. I see you add your reticle as a custom one on the actual teleport area but there is also another one on the "XR Interactor Line Visual" which would then be showing on any area you can teleport to (I use the areas instead of the achors as you do in this video). I did notice that if you use a slow timeout (0,1ms) in the script it takes some time for the disabling to happen and you are actually seeing the teleport beam in the air a bit there and the only reason the reticle disappeared then was that it is in an invalid spot when it was disabled (as you are now pointing beyond the anchor). So I believe one need to actually hide the reticle object as well manually then when the component is disabled like in these scripts. EDIT: Ok so that worked! In case anyone else has issues with the reticle sticking, here is how I did it: I have the reticle object in my scene but I deactivate it. I then drag the reticle object from the scene (not prefab) to the "XR Interactor Line Visual"'s reticle property, and not on each tp area/anchor. This will move this object about as the reticle when the tp beam is visible. However you also need to disable this reticle manually then when the teleport is cancelled, either in the script or the events like Daniel has configured in this video. I am sure there is some other way too but there seems to be some code in the Line Visual that is not called in order to hide this when we intervene with the tp cancel like we do. TIP: Another tip is that you can also add a tag to any tp area and in your script run through all tags and enable/disable the renderer for these when you activate/cancel the tp. That way you can e.g. have all the tp areas transparent and only showing when you press the thumbstick forward to tp. Here is a code snippet to show this method which I call with true/false: private void setTeleportAreas(bool val) { var tpareas = GameObject.FindGameObjectsWithTag("TeleportArea"); foreach (GameObject area in tpareas) { area.GetComponent().enabled = val; } }
@UnityVR3 жыл бұрын
Hi! thanks for the comments! I think a bit might have changed since the recording of this video, the XR interaction toolkit is still in preview. This might cause a few discrepancies. Glad you got it sorted and thanks for posting your tips :)
@hernandonj2 жыл бұрын
Great video. Thank you!
@rapideye1013 жыл бұрын
Hey, you put the two Game Objects in your TeleportController, but never use them. Is this just a setup for later things? And another things i've noticed. You never enable the Input Action Asset, or do you do this just somewhere else? I've tried to reference directly the InputAction, but it does not trigger any Invokes unless i enable the Input Action Asset first somewhere.
@me_in_vr84783 жыл бұрын
Just getting started with Unity and VR development. These videos are an amazing starting point. I seem to have an issue of my reticle showing even when not teleporting .
@UnityVR3 жыл бұрын
Hi! thanks for the comment, check that the ray is being deactivated in the events of our script when the thumbstick is released, and not left active. I will have a play around and see what else it could possibly be.. Has anybody else had this issue?
@me_in_vr84783 жыл бұрын
@@UnityVR (Edit: Solved) The problem was that I was assigning the custom reticle to the Teleport Ray Interactor Line Visual (seen somewhere in a previous video), instead of putting the custom reticle into my Teleportation Area component of my plane (as you add it to your Teleportation Anchor at 22:59 in your video). I tried to capture everything in this video, perhaps you'll see something I don't. kzbin.info/www/bejne/q164o5eibtWrjqs
@UnityVR3 жыл бұрын
Glad you got it sorted!
@WGalex3 жыл бұрын
Muchas gracias , me ha venido genial el video!!!
@chunkyquail3 жыл бұрын
Beautiful. Exactly what I wanted for my game. Thanks.
@jaydencdq3 жыл бұрын
Hey! I'm having an issue where the line and the reticule only show up for like 0.1 seconds when I activate teleportation mode, when it's supposed to just stay until you let go. If you could help me that'd be great. Thank you!
@UnityVR3 жыл бұрын
Hi, its a little tricky to determine as there are a couple of things it might be. can you post your teleportation controller code as a reply? then we can rule that out :)
@jaydencdq3 жыл бұрын
@@UnityVR Sure! using UnityEngine; using UnityEngine.InputSystem; using UnityEngine.Events; public class TeleportController : MonoBehaviour { public GameObject baseControllerGameObject; public GameObject teleportationGameObject; public InputActionReference teleportActivationReference; [Space] public UnityEvent onTeleportActivate; public UnityEvent onTeleportCancel; private void Start() { teleportActivationReference.action.performed += TeleportModeActivate; teleportActivationReference.action.performed += TeleportModeCancel; } private void TeleportModeCancel(InputAction.CallbackContext obj) => Invoke("DeactivateTeleporter", .1f); void DeactivateTeleporter() => onTeleportCancel.Invoke(); private void TeleportModeActivate(InputAction.CallbackContext obj) => onTeleportActivate.Invoke(); }
@UnityVR3 жыл бұрын
oh also just check in the events assignment (where you turn the controllers off/on) that your not turning the XR ray interactor off when it should be on. I think from memory I had an onActivate event or something... make sure you have the XR ray interactor on :)
@jaydencdq3 жыл бұрын
@@UnityVR hmmm yeah it looks like it's all right, I think I might just completely restart and try to follow as close as I can, what is the best order to watch the videos?
@UnityVR3 жыл бұрын
@@jaydencdq Hi, I see what's going on :) under start you have two 'teleportActivationReference.action.performed' The bottom one should be teleportActivationReference.action.canceled'
@김윤준-e7f3 жыл бұрын
what a video!! any ideas for scene fader during teleporting??
@UnityVR3 жыл бұрын
Hi, I go into that a bit in this video > kzbin.info/www/bejne/g5TKZZ6giLB6aa8
@criticalthinking55002 жыл бұрын
This works great!
@64jcl3 жыл бұрын
Nice explanation of how to achieve this. I had a hunch I'd have to use two different ones and switch between them for this to work. However seeing you already have a reference to both BaseController and TeleportController you could have instead written the simple code to enable/disable the bits in those instead of the clunky event thing in the UI as both of those also needs to be configured to the same two objects? Although I guess it enables you to configure other things happening as well without editing code.
@ochsii2 жыл бұрын
I cant grab anything with putting the XR Direct Interactor script to my hands... My hands have a Sphere Collider which are trigger - all grabable objects have a rigidbody, collider and XR Grab Interactable Please help :c
@stephenmackenzie90163 жыл бұрын
So the cancel action is actually the trigger for teleportation to actually start?
@NightSpyderTech3 жыл бұрын
Any chance of getting this project added to patreon? That's all I'm waiting on to pledge.
@UnityVR3 жыл бұрын
Hi! I thought it was on there...don't know what happened! I will upload it over the weekend :)
@rudywebb99982 жыл бұрын
For some reason, my Reticle doesn't go away when teleporting short distances, any idea why this is happening?
@fabiano88883 жыл бұрын
Hey Daniel! The information you share in your channel are the most updated and the ones that are helping the me most, but I am still confused. I'm new to VR development and I am getting so lost with all that XR plugins and tools variations. I wish you would have the time to put together a video explaining the main options available, pros and cons, which tools to pick over another and why, which tools can be used together, which ones we should not waste our time learning due deprecation or other reasons, which preview packages are going to become the new standard and more future proof etc. Sorry making my comment too long, but I've been putting so much time and money on courses that are no longer working. That's so frustrating. I love your content and am willing to enroll in any future courses you might make available, if they don't get me stuck like some from other instructors did. Thank you for all you do!
@betterlifeexe3 жыл бұрын
Here's my 2 cents. You should look at the xr interaction toolkit, officially supported by unity. They have decent documentation, and you can watch tutorials from more than one youtube channel, as well as use other people's demo files. There's at least one good one on gethub. But at the end of the day it's going to take a lot of finagling and understanding, the tools are all kinda new still! Guess unity has got a lot on it's plate! I would use other vr specific tools only if they can be employed in your game with minimal modification. I have found that having to maintain a chunk of someone else's code is something to avoid where possible. I ended up extending my controllers functionality with combination button event listeners and the like, and now I actually understand what's happening when the code inevitably misbehaves. (My animated hands are very responsive)
@UnityVR3 жыл бұрын
Hi Fabiano. Thanks for your comment. The future will certainly be OpenXR development. This is currently in preview. The holy grail for developers is to ideally develop once, deploy everywhere. OpenXR is currently available in unity 2020.2 but does not yet work with oculus. The second it does I will be using it for all VR development. In conjunction to this I think the XR interaction framework is going to be the way to develop in unity for VR, this combined with the action based input system means there is a lot to learn, and a huge investment of our time so they better not change their mind or I'm going to use Unreal :)
@fabiano88883 жыл бұрын
@@UnityVR Hi Daniel. Thanks for your insights! I'll will stick with what you said and keep learning from you since I can see you're already taking your content to that direction. Thank you so much!
@MaraldBes3 жыл бұрын
Thanks! Really helpful these tutorials that actually use the latest action-based system from Unity. I did run into the problem of having two hands render simultaneously. As both the base and teleportation controller render hands. What would be a solution? And also, my hands are just fine with the rotation offset, but the teleport line renderer still shoots upwards instead of forward. I watched your tutorial multiple times, and can't figure out where it goes wrong. I guess we can delete teleportation gameobject and basecontroller gameobject references from the script as they are not used at all. I still find this OpenXR with the toolkit very limiting compared to OpenVR (steam) Unity Asset implementation, which did teleport, grab, animation, hand-poses, bow and arrow, multiple control sets and much more, really nice out of the box. Using Unity with Open XR is probably the future, so I can only hope that Valve implements everything their OpenVR Unity feature-wise did, in OpenXR as well.
@Bassquake76 Жыл бұрын
How do you still interact with objects? When I point the teleport line to an interactable object, it automatically pulls it to the hand then just bounces off.
@YT-ql7me3 жыл бұрын
Thanks for the great video!! I set up the teleportation on my side and it sometimes work sucessfully and teleport to desired region and sometimes its not responding. Could you tell whats the problem may be?
@UnityVR3 жыл бұрын
Thanks, sorry to hear you are having trouble. Firstly I would check the 'Keep selected target valid' is unchecked. if it is then just check the teleport controller script to make sure that the correct interactors are being turned off and on when required. Then if its not that check to see that your event listeners are setup correctly.
@seankennedy43793 жыл бұрын
@@UnityVR Hi there! I'm having a similar problem where the first teleport works perfectly but every subsequent one just nudges me a little bit in the direction I want to go rather than teleporting me there. I've made sure the Keep Selected Target Valid script is unchecked, and if the correct interactors to be enabled and disabled go in the order of ActionBasedController.enableInputActions off XRDirectInterctor.enabled on (based on the next tutorial in the series) ActionBasedController.enableInputActions on XRRayInteractor.enabled on ActionBasedController.enableInputActions on XRDirectINteractor.enabled on ActionBasedController.enableInputActions off XRRayInteractor.enabled off Then I think that is correct too. Could you clarify what you mean by event listeners being set up correctly? I'm very new to Unity so I'm not quite sure how to check that. That probably is the root of my problem.
@seankennedy43793 жыл бұрын
I figured it out! I was using Teleport Anchors when I wanted Teleport Areas
@olivername Жыл бұрын
I got issue with a ray line on teleport were is moving away from hands not sure why @Daniel stringer
@Riprog3 жыл бұрын
Great tutorial Daniel! I noticed that when teleporting you end up on the center of the anchor, is there an easy way to fix so you actually end up where your teleport reticle is when activating the teleportation? Also I wonder how complex it would be to make an arrow as a reticle which show which way you will be facing when the teleportation is complete? Big thanks for these series, helped me a lot!
@64jcl3 жыл бұрын
Don't use the Teleportation Anchor but add a Teleportation Area to any object you make. You can draw e.g. a plane with any shape you want and use the whole area as a valid teleportation location.
@taracollingwoode-williams49263 жыл бұрын
Great tutorial - for some reason my teleport only works once, then the controllers stop tracking and only snap turn works.
@UnityVR3 жыл бұрын
Hi sounds like a weird one! I would check to see what happens in the inspector to make sure the correct components are being toggled off and on.
@EvgenyMironenko3 жыл бұрын
Great tutorial!!! Thanks 👍🏽👍🏽👍🏽
@XavierDetcheverry0013 жыл бұрын
You're great !!!
@tedhayes24413 жыл бұрын
I ended up having some issues with the teleporter. It's flashing blue to green like it's constantly going between recognized and unrecognized for the floor. Is there a project on Patreon with the action-based teleporter in it?
@UnityVR3 жыл бұрын
Hi Ted I will have to check... sounds annoying. sorry its not working. is it swopping between a teleport ray and ray interactor or valid to not valid?
@tedhayes24413 жыл бұрын
@@UnityVRbetween valid and not valid on teleport ray
@olsen99q3 жыл бұрын
i've got the same problem, did you ever solve it?
@tedhayes24413 жыл бұрын
@@olsen99q I ended up grabbing the patreon project and having it up as a reference while I recreated things in my project in a fresh scene. I also pulled over hands, animations and scripts from the patreon project.
@blackwhalestudio3 жыл бұрын
For everybody who has this issue, make sure your reticle has no collider attached!
@billybobthe9thjr786 Жыл бұрын
anyone know how to get this to work along with grabbing the interactor ray is still trying to grab stuff and yes i watched the layer vid.
@kederop70123 жыл бұрын
How dont you use the quest 2 ?
@UnityVR3 жыл бұрын
Hi, in the videos during filming its quicker to test on my rift as I don't have a link cable, and don't want to do a build.
@kederop70123 жыл бұрын
Ooh okay
@linkmotion57762 жыл бұрын
Good!!
@stephenmackenzie90163 жыл бұрын
So my line renderer is just pink (I am using URP)....also my reticle is constantly flashing. And when I release my teleport thumbstick, I don't always move - but do sometimes (!)
@DigitalAdamTech3 жыл бұрын
Hi, do you know what the difference is between the Input Action Manager and the Player Input script?
@UnityVR3 жыл бұрын
Hi Adam. The input action manager is the interface between your devices and unity. You can set up you own input action to detect user input from a range of devices. I think the player input script is the second part that links the input action manager to your scripts. I think I tried using it for VR once and it caused major performance issues. Worth looking into though.
@charlottedegooijer45363 жыл бұрын
Thank you for these great videos! I tried following along, but Unity throws the error: InvalidOperationException: Cannot read value of type 'Vector3' from control '/OculusTouchControllerRight/thumbstick' bound to action 'XRI RightHand/Teleport Mode I have tried messing around with the Input Action bindings and types (like in the Hands tutorial) but that didn't help.. Any thoughts? Thanks in advance! :D
@charlottedegooijer45363 жыл бұрын
Nevermind, got it! Set wrong references on the XR Controller ^^'
@UnityVR3 жыл бұрын
Glad you got it working!
@SMG-11382 жыл бұрын
I don't know if this is active enough for a reply or not. No matter what I do when i move the reticule off of the teleport anchor it immediately teleports. I 100% have the keep selected target valid unticked. I cannot move between anchors, it just teleports. I have quite literally watched this video 20 times. i get to the end and go back tot he beginning looking for whatever I've missed and just can't find it. Any ideas?
@UnityVR2 жыл бұрын
Hi Simon, XR interaction toolkit has gone through so many updates over the last six months its crazy... here is a video I made from a more recent playlist: kzbin.info/www/bejne/o5mUnYygiLhsm9U - see if that helps
@ahmetcankaya76663 жыл бұрын
Why i can teleport just middle of the teleport area?
@Digital.Justin2 жыл бұрын
Most likely it's because you're just using the teleportation anchors, and not the teleportation area.
@betterlifeexe3 жыл бұрын
I would be interested in what people are working on in vr these days, I myself am working on a educational game with elements of rhythm , combat, stealth, and strategy. Hopefully I make it more fun and engaging than other attempts at 'gamifying' education.
@UnityVR3 жыл бұрын
Wow that sounds great! how are you finding development? In regards to me - as well as the YT tutorials I'm working on a quest game (very early days) which will be puzzle based, a bit like 'The Room VR'
@betterlifeexe3 жыл бұрын
@@UnityVR I find development slow and painful, but I expected that. I'm still kind of new to c#, I've spent my time programming jumping from python to Javascript and then to c#. Spent a lot of time with Aframe and 3.js but it just didn't have enough graphical capabilities for what I wanted. Now that I'm actually using unity, my project has gotten feature-bogged. I am currently trying to get the main state controller to accept my level generator and use it to reconfigure the arena. Getting my level generator to combine and transform my learning data and settings profiles into usable levels was a huge time suck. I do not look forward to working on the state manager for my enemy AI. Controls are done, for now. modelling is just placeholders, although I have already chosen my textures and shaders more or less... the animations I still have to do should be easy after setting up hand animations. The only aesthetic thing I'm scared of is the player character. I'm thinking head and hands only... how are you approaching avatars? Do you have any experience with state machines? Sorry if I'm going on and on, always talking about my code these days. Wish I didn't have to program this whole thing single handedly.
@TreZ2 жыл бұрын
This is wonderful! Thank you for this excellent tutorial! I've got what I expect is a minor problem, and wonder if someone might help: [SOLVED] - see below When I press Thumbstick up, it shows the teleport arc, but it teleports me instantly instead of waiting for me to release the thumbstick. In my Action Map, I have the following settings: Teleport Select: Primary2DAxis - Directions:Everything Teleport Mode Activate: Primary2DAxis - Directions:North Teleport Mode Cancel: gripPressed *EDIT* I figured it out about 5 minutes after posting: On the Teleportation Area, I needed to change 'Teleport Trigger' from 'On Select Entered' to 'On Select Exited' Thanks again for this excellent video!
@lionelmaquet Жыл бұрын
I'm really struggling to understand what actually causes the teleportation to happen. When you move the thumbstick up, it enables the ray, when you let go of the thumbstick, it disables the ray. In the teleportation controller, we set the select action to be the teleportation select action, which is binded to the thumbstick moving. I therefore don't understand why, when the ray is enabled, we don't teleport as soon as we make a slight move with the thumbstick. Why does it only happen when we let go of it ? I suppose it has something to do with the invokation of the cancel method waiting for a bit before being called, but I can't seem to really understand what's happening. If anyone has the answer and a logic explanation, i'd be very greatful. Other than that, brilliant video, thank you for sharing ! ---------------------- EDIT I just now remembered that, by default, when using the grab trigger to teleport, it only does so when the button is actually released. Even though i don't know where this is controlled and where this behavior could be modified, it therefore explains everything. The logic is therefore as follows : 1) You press up to activate the ray 2) The action for teleportation is set to the "teleport selection action" because it needs to be triggered no matter the position of the thumbstick when you release it 3) If there was no delay before invoking the cancel method, the ray could be deactivated before the teleportation action is triggered. Therefore in the script, the slight delay gives just enough time for the teleportation to happen before disabling the teleportation controller. It's at least my understanding, and even though it might be obvious for some, It might help some others, so, I might as well lay it here :) ---------------------- EDIT 2 The only thing that is now leaving me wondering, is the variables baseControllerGameObject and teleportationGameObject in the script. I don't understand how they are useful. We don't reference them anywhere and they are not used it the script, am i missing something ?
@songqiao3 жыл бұрын
👍
@zombizombi2 жыл бұрын
Why don't Unity just put input references directly on the ray interactor.. if you look at the default action maps there's a Teleport/Select action, ie, an action specifically for teleporting, yet it's ignored in favour of the regular Select action.