Thanks so much for the script! I did have one issue that was an easy fix. If the object still had velocity and rotation when it returned to home, it would keep that velocity and rotation. I just added in a reference to the rigidbody and zeroed out the velocity before returning it. I also grabbed the original rotation and set the transform to that rotation prior to returning it to home. Just in case someone comes later and has the same issue.
I know right I did the same thing lol! and was like NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. But you could account for that in the code as you say :) so many things to think about lol
Nice tutorials very useful to me. About to start my journey with VR in Unity. Have been using UE4 for a couple of years now but the latest builds are very bad for VR, so switching to Unity.
Any idea on how to force the player to release the GameObject when leaving the trigger area? I read about "XRGrabInteractable" and "ForceRelease()" or "ForceDeselect()" methods. Not sure if they actually work.
Brill, question can this be used with a Raycaster, what I want todo is select 2 objects on a wall (have them turn a different colour) and have them swap places, would this be done on the returnhome method?
hmmm for me it does not work at all. i get the follwing error: Assets\Scripts\Utilities\ResetObject.cs(36,31): error CS0246: The type or namespace name 'SelectEnteredEventArgs' could not be found (are you missing a using directive or an assembly reference?). i use unity 2020.3 and the xr toolkit 0.10.0-preview.7
@@UnityVR sure mate. that is exactly the problem: i used the script from the google drive link and it HAS already thatline in the code but it still does not work.
Look in my question above. The toolkit is installed but quite frankly I moved on to the hurricane VR toolkit as the unity xr toolkit and the (breaking) upgrade paths are laughable!
WTF? I was just about to make my weapon items return to the players waist, and you make a purpose built tutorial for it! Get out of my head! (it's not good for your health to be in there)
@@me_in_vr8478 there actually just grabable handles, and when you grab them they turn into your last weapons, and then you can cycle through the weapons available for that arm with a click of a button.
Omg. I think this and the previous tutorial about socket interaction is about enough for me to make a utility belt.
I love it! Thanks Daniel!
Glad you like it!
Thanks so much for the script! I did have one issue that was an easy fix. If the object still had velocity and rotation when it returned to home, it would keep that velocity and rotation. I just added in a reference to the rigidbody and zeroed out the velocity before returning it. I also grabbed the original rotation and set the transform to that rotation prior to returning it to home. Just in case someone comes later and has the same issue.
I also ran into that issue. Do you have an example of the code for that?
Thanks a lot for the script!
Love your work! So helpful.
Oh No! ... I've hit the cube with my Sword!
Oh well ... more code :)
Great Turorial!
I know right I did the same thing lol! and was like NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO. But you could account for that in the code as you say :) so many things to think about lol
Nice tutorials very useful to me. About to start my journey with VR in Unity. Have been using UE4 for a couple of years now but the latest builds are very bad for VR, so switching to Unity.
thank u :>
Any idea on how to force the player to release the GameObject when leaving the trigger area? I read about "XRGrabInteractable" and "ForceRelease()" or "ForceDeselect()" methods. Not sure if they actually work.
great tutorial/script :D
Brill, question can this be used with a Raycaster, what I want todo is select 2 objects on a wall (have them turn a different colour) and have them swap places, would this be done on the returnhome method?
hmmm for me it does not work at all. i get the follwing error: Assets\Scripts\Utilities\ResetObject.cs(36,31): error CS0246: The type or namespace name 'SelectEnteredEventArgs' could not be found (are you missing a using directive or an assembly reference?). i use unity 2020.3 and the xr toolkit 0.10.0-preview.7
Hi, in the script with the error make sure you have the 'using UnityEngine.XR.interaction.toolkit'
@@UnityVR sure mate. that is exactly the problem: i used the script from the google drive link and it HAS already thatline in the code but it still does not work.
@@konzeptzwei this is a late reply, but have you installed the XR Interaction Toolkit using the Package manager in Unity?
Look in my question above. The toolkit is installed but quite frankly I moved on to the hurricane VR toolkit as the unity xr toolkit and the (breaking) upgrade paths are laughable!
WTF? I was just about to make my weapon items return to the players waist, and you make a purpose built tutorial for it! Get out of my head! (it's not good for your health to be in there)
I'm everywhere :) - returning to the waist.. that sounds like a cool idea!
Sounds like a great way to have inventory pinned to the player and not get lost when dropped. I’m planning similar implementation.
@@me_in_vr8478 there actually just grabable handles, and when you grab them they turn into your last weapons, and then you can cycle through the weapons available for that arm with a click of a button.