To remove the red line that comes out of your player model hands select "left/righthand controller"; scroll down on the 'inspector' tab till you see the script "XR Interactor Line Visual"; select the box so the check symbol is gone. The red lines should be removed now!
This man has saved me from not being able to learn unity, he releases top quality, free tutorials like this so often. I recently had cancer and as I was transitioning from high school to college I could not do my GCSEs therefore I am on a level 2 IT course that is not what I want and does not cover this at all. Being able to access this freely is a true blessing
To everyone who might be having trouble not getting any values in the debug console: Especially for the index, if you don't have the headset on, the input from the controllers also stops. It'll work once you put the headset back on....I was cursing a lot when I found this out :P (I thought the inputs aren't being captured, since I was testing by just holding a controller and pressing the trigger).
@@platinumsky845 Hey! Sorry, but I can't really tell you any further suggestions, I haven't really experimented with VR for several months now, and I also replaced my index with a Q3.
Sur un coup de tête j'ai décidé aujourd'hui de me lancer dans la création d'un jeu VR auquel je pense depuis longtemps. J'ai franchi le pas grâce à tes tutos (je viens de terminer le 2nd) et j'ai hâte de continuer. Merci pour le taf !
For all of you who dont get values from the trigger button in the console. Add to the XR Origin an input manager and drag the xri default input action.
To whoever doesn't want to watch this whole thing: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class HandAnimator : MonoBehaviour { public InputActionProperty pinchInput; public InputActionProperty gripInput; public Animator animator; // Update is called once per frame void Update() { float triggerValue = pinchInput.action.ReadValue(); float gripValue = gripInput.action.ReadValue(); animator.SetFloat("Trigger", triggerValue); animator.SetFloat("Grip", gripValue); } }
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class AnimateHandOnInput : MonoBehaviour { public InputActionProperty PinchAnimatinAction; public InputActionProperty gripAnimationAction; public Animator handAnimator; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { float triggerValue = PinchAnimatinAction.action.ReadValue(); handAnimator.SetFloat("Trigger", triggerValue); float gripvalue = gripAnimationAction.action.ReadValue(); handAnimator.SetFloat("Grip", gripvalue); } }
For anyone watching this about a year later (in 2023), to disable the default controller model, search for controllers in assets. You should see a folder. Now, just uncheck both the prefabs in the folder, and I think it fixes that! Edit: you actually have to scroll down on the Left/Right Controller gameobject and then under xr controller script, go down to the model section then change the model prefab from XR controller right/left to none
You saved my life, thank you so much :') I searched for 30minutes, and I thought I never find how remove the default controller model Thank you again !
For people who have a Valve index headset, the headset checks if a head is inside (you can see inside at the top there's a little sensor). To disable this sensor, go to Steam VR setting, show developer settings, then go to the video tab and disable "Pause VR when the headset is idle". Meabe restarts the headset if needed.
What if the Trigger value on 1:57 appears as NaN? Maybe I'm missing something? Edit: restarting Unity worked.... somehow. The animation is kinda quick, but other than that, great tutorial!
Assistance needed! I had trouble with a bit of this if you or someone could offer any advice, near 4:28 where you add the script line "public InputActionProperty pinchAnimationAction;" It didn't add the reference inside the engine like it does in the video. For reference I'm using unity 2022 and Microsoft visual studio. Any advice helps thank you
Salut Valem! Super ta vidéo! Do you have any tips on how to add accurate coliders to the rigged hand? Should I add a capsule collider per finger to have something performant?
Hey, on the “animate hand on input” component for my hand model, I don't have the “Hand Animator” option, can you please help me? EDIT: I'm having more problems now, I'm getting an error from your code that says "Assets\animate_hand_on_input.cs(30,6): error CS1513: } expected"
Great tutorial! But whenever I open the script for the controls it comes up with find an app in the microsoft store. I don't really know how do solve it.
Don't you have to assign the punchAnimationAction and gripAnimationAction Variables somewhere in the Interface or do they need to have exactly this naming? Plus you skipped how to add the "Grip Animation Action" to the Script @ 11:27
Hey there! This is great! I have been following along with this tutorial and getting everything to work in Unity, but am having issues on the playing side. I am using an Oculus Quest 2 with a MacBook Pro, so I cannot use the link cable and instantly view the app. I am trying the Build And Run feature to deploy to my quest 2, but when I go to open the app in Oculus 2 I just get the 3x loading dots and nothing happens. Do you have any recommendations or know of any tutorials I can watch to fix this? Thank you!
Hey, when I try to add the grip animation to the coding it says, error CS0246: The type of namespace name ‘inputActionProporty’ could not be found (are you missing a using directive or assembly reference?) I’ve tried everything and nothing will work. Can someone please help me?
salut l'ami, à ton accent je me permets de te poser la question en français haha. penses-tu qu'il est faisable de suivre ton tuto sans savoir coder et en ayant jamais touché à unity ? merci de ta réponse
Amazing tutorial so far thank you! I got this all working but have an issue with mine as when i press the trigger button it isnt give me float value its either 1 or 0 as displayed in the debug console - so animation is instant either on or off rather than gradual animation change, how do i go about correcting this ?
Just to update managed to resolve this issue now, it seems i had the wrong button inputs mapped instead of it being set to read Axis values it was on the button pressed setting - Just in case anyone has this issue in future too.
at 10:35 i get an error saying "NullReferenceException: Object reference not set to an instance of an object AnimateHandOnInput.Update () (at Assets/AnimateHandOnInput.cs:22)"
heres the script if you dont wanna write it using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class AnimateHandOnInput : MonoBehaviour
{ public Animator handAnimator; public InputActionProperty pinchAnimationAction; // Start is called before the first frame update void Start() {
} // Update is called once per frame void Update() { float triggerValue = pinchAnimationAction.action.ReadValue(); handAnimator.SetFloat("Trigger", triggerValue);
how come the hands only show up on the left eye screen on the Meta Qeust Pro and the hands don't show on right when all the settings are exactly the same???
i've got a quick question. how would i make this a bool? float trigger = triggerAnimationAction.action.ReadValue(); handAnimator.SetFloat("Trigger", trigger); i want to replace trigger with when the thumbstick is touched so it can move the thumb up if i don't touch the thumbstick, and then back down when i rest my finger on it. update: ok so i got the code to work by changing it to: bool thumb = thumbAnimationAction.action.ReadValue(); if(thumb == true) { handAnimator.SetFloat("Thumb", 1); } else { handAnimator.SetFloat("Thumb", 0); } i just don't know how to set up the controls in unity. i don't know how to get the thumbstick to change the bool value to 1.
chatGPT answer: float trigger = triggerAnimationAction.action.ReadValue(); bool triggerBool = (trigger == 1.0f); handAnimator.SetBool("Trigger", triggerBool); This will set the Trigger parameter to true if trigger is exactly equal to 1.0f, and false otherwise.
Hey Valem, everything you showed in this video worked like a charm but for some reason, the pinch animation was snapping instead of animating like it should! Please, anyone help me!
One of my hands is not moving at all (I'm right after deleting the cubes and swapping them with hands) What do I do? EDIT: I went on with the tutorial, and the right hand actually animates both pinch and grip, but is not moving with the controller, actually looks kind of baked in the floor - but the values in the position are changing constantly, just as in the left hand.
Make sure Visual Studio autocomplete is enabled. In IDE, look to the right side Solution Explorer.. and choose "load projects" Inside Unity set your IDE Make sure Visual Studio have installed Unity addon
Hey Valem! Sorry to bother you, but I've followed this tutorial up to the part where we're trying to get the axis value from the trigger button to get printed out to the console. For some reason, my trigger axis values are not changing when I'm pressing them - The values being printed out to the console are repetitive zeros, and I've even tried swapping the pinch animation action reference to both the Select Value, and the UI Value, but none of them are changing the printed triggerValue to the console. One thing that's different for me here is that I'm using Valve Index controllers instead of the Quest 2 controllers. I'm wondering if perhaps that difference is why the values aren't being changed - Do you know what might be the problem? =X Thanks!
it says "Animator' does not contain a definition for 'setFloat' and no accessible extension method 'setFloat' accepting a first argument of type 'Animator' could be found (are you missing a using directive or an assembly reference?"
Hello, really helpful video. But I am unable to play it in the Oculus in the run time, I have to make a build inorder to execute it in Oculus, Any suggestions?
Hello, I have been following your tutorial step-by-step until the part where you start coding the hand animations. after I save the script nothing changes and it looks the exact same from when I didn’t add anything to the script. If you have any idea how to fix this, please let me know. Thank you!
Full script with the primary Button: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.InputSystem; public class HandController : MonoBehaviour { public InputActionProperty indexAnimationAction; public InputActionProperty gripAnimationAction; public InputActionProperty PrimaryButtonAnimationAction; public Animator handAnimator; void Start() { } void Update() { float triggerValue = indexAnimationAction.action.ReadValue(); handAnimator.SetFloat("indexAnimationAction", triggerValue); float gripValue = gripAnimationAction.action.ReadValue(); handAnimator.SetFloat("Grip", gripValue); float PrimaryButtonValue = PrimaryButtonAnimationAction.action.ReadValue(); handAnimator.SetFloat("Thumb", PrimaryButtonValue); } } make sure to follow Valem's VR New input system setup and this video so you can get this to work, and then you'll need to make a script named HandController, also you'll need to go on the samples folder, then XR Interaction Toolkit, click the numbers, then click starter assets and click over XRI Default Input Actions, once you do that, click on edit asset, go on lefthand interaction and click the plus button close to the Actions text, rename it to PrimaryButtonPressed, open it, and then go and click over the Path button, XR Controller, LeftHand,Optional Controls, then search for "primaryTouched", then click it, click the plus button close to the interactions text, and then select Hold. now you just need to add the HandController script to the hands and fill out all the things, go again on the XRI Default input actions and do the same thing that you've done on the XRI Left Hand Interaction for the XRI RightHand Interaction, except you'll need to select RightHand primaryTouched.
a work around that I found helpful was adding an: "Additional Offset", Y=1. I am trying to share the article, but youtube has goony policy permissions.
To remove the red line that comes out of your player model hands select "left/righthand controller"; scroll down on the 'inspector' tab till you see the script "XR Interactor Line Visual"; select the box so the check symbol is gone. The red lines should be removed now!
I wish I saw this comment earlier I started deleting random things looking for it
you can also disable the line renderer
This man has saved me from not being able to learn unity, he releases top quality, free tutorials like this so often. I recently had cancer and as I was transitioning from high school to college I could not do my GCSEs therefore I am on a level 2 IT course that is not what I want and does not cover this at all. Being able to access this freely is a true blessing
Hope you're okay.
@@hasanhaskovic4307 thanks bro, I'm in remission and it's not likely to come back
@Fire-boyYT2009 can say now I’m cancer free yes, still got scans but no signs of it returning
@@lumpsucker2184 a long life to you, and us all, brother
@@lumpsucker2184Happy to see you're doing good now 😊
To everyone who might be having trouble not getting any values in the debug console: Especially for the index, if you don't have the headset on, the input from the controllers also stops. It'll work once you put the headset back on....I was cursing a lot when I found this out :P (I thought the inputs aren't being captured, since I was testing by just holding a controller and pressing the trigger).
you saved me a lot of frustration!!!
Thanks man this is super helpful. I was struggling too until I tried your method!!!
Mine still doesnt give any results even with my headset on and everything else working as it should. Any other suggestions on where to start?
@@platinumsky845 Hey! Sorry, but I can't really tell you any further suggestions, I haven't really experimented with VR for several months now, and I also replaced my index with a Q3.
Sur un coup de tête j'ai décidé aujourd'hui de me lancer dans la création d'un jeu VR auquel je pense depuis longtemps. J'ai franchi le pas grâce à tes tutos (je viens de terminer le 2nd) et j'ai hâte de continuer. Merci pour le taf !
Avec grand plaisir merci d'avoir regardé le tuto :D
This is a great tutorial on a very important point, invaluable for all XR developers. You should be proud of yourself 👏
Best VR tutorial for beginners I have ever seen! I will follow you to the ends of the earth!!
thanks man, this means alot. Im just 12 but ive kind of made a vr game. this tutorial was extremly easy to follow and i appreciate that.
For all of you who dont get values from the trigger button in the console. Add to the XR Origin an input manager and drag the xri default input action.
I've already done that, but it still doesn't work
omgggggg, thank you so much, had me thinking i broke it lmao
this is the best comment here it helped me after 30 minutes of trial and error
To whoever doesn't want to watch this whole thing:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class HandAnimator : MonoBehaviour
{
public InputActionProperty pinchInput;
public InputActionProperty gripInput;
public Animator animator;
// Update is called once per frame
void Update()
{
float triggerValue = pinchInput.action.ReadValue();
float gripValue = gripInput.action.ReadValue();
animator.SetFloat("Trigger", triggerValue);
animator.SetFloat("Grip", gripValue);
}
}
life saver bro. thanks a million!
thanks. i got lazy and its late
Dude. Thanks a million
@@4Aces. I actually love u
this took me 4 months thank you i just found problem after so long
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class AnimateHandOnInput : MonoBehaviour
{
public InputActionProperty PinchAnimatinAction;
public InputActionProperty gripAnimationAction;
public Animator handAnimator;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
float triggerValue = PinchAnimatinAction.action.ReadValue();
handAnimator.SetFloat("Trigger", triggerValue);
float gripvalue = gripAnimationAction.action.ReadValue();
handAnimator.SetFloat("Grip", gripvalue);
}
}
Mart you just help me with the grip thank you so much.
saved so much time thank you man
@@FlashH021 same
It didnt even work
@@FoxyTitan theres a typo in his code where he mispells "action" so if your copy and pasting it wont work
For anyone watching this about a year later (in 2023), to disable the default controller model, search for controllers in assets. You should see a folder. Now, just uncheck both the prefabs in the folder, and I think it fixes that!
Edit: you actually have to scroll down on the Left/Right Controller gameobject and then under xr controller script, go down to the model section then change the model prefab from XR controller right/left to none
I need help
@@mysticdonuts4365 what do you need help with?
@@mysticdonuts4365 yes? anything I can help with
You saved my life, thank you so much :')
I searched for 30minutes, and I thought I never find how remove the default controller model
Thank you again !
@@yaourt6108 np, you're welcome!
bro thank you so much for these tutorials its literally so helpful and easy to understand
For people who have a Valve index headset, the headset checks if a head is inside (you can see inside at the top there's a little sensor). To disable this sensor, go to Steam VR setting, show developer settings, then go to the video tab and disable "Pause VR when the headset is idle". Meabe restarts the headset if needed.
love you for this
i am already finishing my unity grade ill be here in 1 month to learn all about the amazing world of vr dev😍😍😍
Silly question, maybe, but what's the license on the oculus hands package ?
They are free to use
I think they are free for everyone to use, they want to make their consoles more popular so they don’t care about using their models
Good tutorial, everything worked out!
What if the Trigger value on 1:57 appears as NaN? Maybe I'm missing something?
Edit: restarting Unity worked.... somehow. The animation is kinda quick, but other than that, great tutorial!
thank you bro
@@thaariqahmed3983 That helped ! Thanks
you can just set the NaN to 0 and it will work and not be quick
thank you!
Assistance needed! I had trouble with a bit of this if you or someone could offer any advice, near 4:28 where you add the script line "public InputActionProperty pinchAnimationAction;" It didn't add the reference inside the engine like it does in the video. For reference I'm using unity 2022 and Microsoft visual studio. Any advice helps thank you
Same issue here but on the 2021.3 LTS build. Any solutions yet?
did you save the file in visual studio?
Thank you so much for all of your videos!
Salut Valem! Super ta vidéo! Do you have any tips on how to add accurate coliders to the rigged hand? Should I add a capsule collider per finger to have something performant?
Yes lets go i finally finished part 2
Hi, this tutorial works with oculus rift? great video by the way
Cette vidéo est aussi géniale que la première de cette série !
YOU ARE A GOD
This guy = Giga chad + W + Dani2.0
Really good video but the hands aren't tracking and are currently stuck on the floor. Please help I followed step by step!
You can put the hands model on the controller and not under it. That should fix it
Did you find a solution? I'm facing the same problem
Hi Valem can you make a tutorial for VR using UltimateXR it's a new VR SDK
Thank you! Why don’t you publish videos like these on main channel to get more people to know?
I wanted to separate my tutorials and my big project on a different channel. :)
@@ValemTutorials as you wish, I think you deserve more views
Just a heads up Valem, you didn't include the link for the tutorial on how to manually set up the animation in the description
Thanks Michael, I'm going to add the link ! :)
@@ValemTutorials I guess I see the playlist but not which actual video it is? Which video specifically please?
Hey, on the “animate hand on input” component for my hand model, I don't have the “Hand Animator” option, can you please help me?
EDIT: I'm having more problems now, I'm getting an error from your code that says "Assets\animate_hand_on_input.cs(30,6): error CS1513: } expected"
add public Animator handAnimator; above public InputActionProperty pinchAnimationAction;
Same here
Thats what ive been waiting for
I cannot wait for the next episode to come out. ;)
Thx bro u help a lot nice video ,itz amazing
You are the god, thank you for your generous sharing!
Great tutorial! But whenever I open the script for the controls it comes up with find an app in the microsoft store. I don't really know how do solve it.
Really awesome! Thank you sooooo much :)
Great Teacher!
Don't you have to assign the punchAnimationAction and gripAnimationAction Variables somewhere in the Interface or do they need to have exactly this naming?
Plus you skipped how to add the "Grip Animation Action" to the Script @ 11:27
Hey I'm needing some assistance. I followed your example with the coding part, but for some reason it's coming up as a debugging error.
same
Help! (I’m using LTS 2022) when I play it the hands appear along with controllers and the animation doesn’t work
Thank you 🙌
My hands are not positioned right with my controllers. how do I fix this?
Hey there! This is great! I have been following along with this tutorial and getting everything to work in Unity, but am having issues on the playing side. I am using an Oculus Quest 2 with a MacBook Pro, so I cannot use the link cable and instantly view the app. I am trying the Build And Run feature to deploy to my quest 2, but when I go to open the app in Oculus 2 I just get the 3x loading dots and nothing happens. Do you have any recommendations or know of any tutorials I can watch to fix this? Thank you!
Go to project settings > XR plugin management > android and make sure to have a plug in providers set to Oculus !
Hey Valem,
I’m trying to move the Oculus hands onto the unity project and it keeps giving me an error in the Console. Any tips to fixing it?
Thanks!
Hello, how would I change what animation each button does, and how would I make it animate part of the hand if I put my thumb down onto my controller?
hello valem the xr controllers are on the hand moddel when i play test the game how do i get rid of them ?
Hey Valem, could you make a tutorial for hand tracking?
Hey, i have a problem. There are no animator controllers on the hands so im stuck.
Hey, when I try to add the grip animation to the coding it says, error CS0246: The type of namespace name ‘inputActionProporty’ could not be found (are you missing a using directive or assembly reference?) I’ve tried everything and nothing will work. Can someone please help me?
Broo... Same problem showing for me! I'm still stuck on this problem for 2 weeks ig.
@@myhelshik5844 I lost that game completely because of that problem, I hope you can find out how to fix it, I wasn’t very lucky🥲
Try declaring namespace for input system "as Using UnityEngine.InputSystem;"
you spelt property wrong in 'InputActionProperty' instead you said "Proporty"
Does anyone know why my unity is saying "The type or namespace name 'InputActionProperty' could not be found"?
IK body with hand animations though? perhaps in the future?
salut l'ami, à ton accent je me permets de te poser la question en français haha. penses-tu qu'il est faisable de suivre ton tuto sans savoir coder et en ayant jamais touché à unity ? merci de ta réponse
I don’t speak French but if you’re still interested then definitely yes
Wait, does the controller input for the right hand have to be copied to the left hand to both work?
(edit) Oh ok, nevermind :)
THANK YOU
and my hands cant move so please make a vid on how to fix the hands
Amazing tutorial so far thank you! I got this all working but have an issue with mine as when i press the trigger button it isnt give me float value its either 1 or 0 as displayed in the debug console - so animation is instant either on or off rather than gradual animation change, how do i go about correcting this ?
Just to update managed to resolve this issue now, it seems i had the wrong button inputs mapped instead of it being set to read Axis values it was on the button pressed setting - Just in case anyone has this issue in future too.
Hello I got a question. I see your blue hands do not have the red lines. How to hide them? Thanks
Bro I'm having the same problem
The trigger inputs wont show up in the console and wont activate the animations? is there a solution for this?
at 10:35 i get an error saying "NullReferenceException: Object reference not set to an instance of an object
AnimateHandOnInput.Update () (at Assets/AnimateHandOnInput.cs:22)"
I can’t get the pinch animation to work with the trigger, is it because I’m using index controllers?
Im having the same problem on oculus touch controllers, have you found a solution yet?
it wouldnt be because you have index controllers because it works for me with index controllers
heres the script if you dont wanna write it
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class AnimateHandOnInput : MonoBehaviour
{
public Animator handAnimator;
public InputActionProperty pinchAnimationAction;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
float triggerValue = pinchAnimationAction.action.ReadValue();
handAnimator.SetFloat("Trigger", triggerValue);
}
}
Thank you so much
thanks bro
Wow nice job messing up my whole entire thing.
@@Sanistorum not my fault its the exact script this guy used
@@DripyvrOfficial i think he removed stuff
If I would like that the pinch button would do index finger pointing how to do it?
thanks mate
You'rAMAZING !!!!!
how come the hands only show up on the left eye screen on the Meta Qeust Pro and the hands don't show on right when all the settings are exactly the same???
i've got a quick question. how would i make this a bool?
float trigger = triggerAnimationAction.action.ReadValue();
handAnimator.SetFloat("Trigger", trigger);
i want to replace trigger with when the thumbstick is touched so it can move the thumb up if i don't touch the thumbstick, and then back down when i rest my finger on it.
update: ok so i got the code to work by changing it to:
bool thumb = thumbAnimationAction.action.ReadValue();
if(thumb == true)
{
handAnimator.SetFloat("Thumb", 1);
}
else
{
handAnimator.SetFloat("Thumb", 0);
}
i just don't know how to set up the controls in unity. i don't know how to get the thumbstick to change the bool value to 1.
very ez search it up or ask reddit
chatGPT answer:
float trigger = triggerAnimationAction.action.ReadValue();
bool triggerBool = (trigger == 1.0f);
handAnimator.SetBool("Trigger", triggerBool);
This will set the Trigger parameter to true if trigger is exactly equal to 1.0f, and false otherwise.
Trigger Value is not increasing in Console. but the value is increasing in XR Input debugger. i have 2021 and oculas quest 2, 256 gb
I could not do the hand animations it was to confusing can you maybe explain the buttons to press pls
Hey Valem, everything you showed in this video worked like a charm but for some reason, the pinch animation was snapping instead of animating like it should! Please, anyone help me!
I don't know I'm having the same issue!
One of my hands is not moving at all (I'm right after deleting the cubes and swapping them with hands) What do I do?
EDIT: I went on with the tutorial, and the right hand actually animates both pinch and grip, but is not moving with the controller, actually looks kind of baked in the floor - but the values in the position are changing constantly, just as in the left hand.
i dont have visual studio so can i still make animations for my hands?
where is the video on how to make a blend tree?
Hi , i have to add a different hands model and couston pose animation , What is the Process for that?
Ty bro
well, everything done perfectly, the value for gripValue or anything doesnt change ( remain 0 ) .... what can i do ? 100% did everything right :D
Same prpblem here
The type or namespace name "Animator" could not be found
How can I fix this?
you didnt leave a link in the discription 2:06 :(
I'm having a problem with the scripting at 4:13
It won't recognize that input system is a thing, all I have is "abc" options no "( )" options
Make sure Visual Studio autocomplete is enabled.
In IDE, look to the right side Solution Explorer.. and choose "load projects"
Inside Unity set your IDE
Make sure Visual Studio have installed Unity addon
@@pastuh thank you
Hey Valem!
Sorry to bother you, but I've followed this tutorial up to the part where we're trying to get the axis value from the trigger button to get printed out to the console. For some reason, my trigger axis values are not changing when I'm pressing them - The values being printed out to the console are repetitive zeros, and I've even tried swapping the pinch animation action reference to both the Select Value, and the UI Value, but none of them are changing the printed triggerValue to the console.
One thing that's different for me here is that I'm using Valve Index controllers instead of the Quest 2 controllers. I'm wondering if perhaps that difference is why the values aren't being changed - Do you know what might be the problem? =X
Thanks!
The same thing happened to me. I just deleted the script and component and redid everything and it worked
your tuts are helpful thanks but for some reason it wont let me type for the hand animation
do you have vsc installed?
Will this script work if I'm testing the game using XR Simulator instead of headset?
it says "Animator' does not contain a definition for 'setFloat' and no accessible extension method 'setFloat' accepting a first argument of type 'Animator' could be found (are you missing a using directive or an assembly reference?"
its case sensitive
i got that too
When I go into the game I can only see my hands through one eye. Is this normal or can I do anything to fix this?
for some reason my hands either go with grip animation for both inputs or pinch for both inputs, how do i fix this?
Hello, really helpful video. But I am unable to play it in the Oculus in the run time, I have to make a build inorder to execute it in Oculus, Any suggestions?
do you have your oculus mask connected with cable(physically and turned it on in headset settings?)
Make sure Oculus app is working, headset developer mod enabled, Link via cable activated
Hello, I have been following your tutorial step-by-step until the part where you start coding the hand animations. after I save the script nothing changes and it looks the exact same from when I didn’t add anything to the script. If you have any idea how to fix this, please let me know. Thank you!
i have same issue
look at visual studio "Explorateur de solutions" it will tell you install something
when it done maybe can solve it
the animate hand on input thing doesnt work for me :(
Full script with the primary Button:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class HandController : MonoBehaviour
{
public InputActionProperty indexAnimationAction;
public InputActionProperty gripAnimationAction;
public InputActionProperty PrimaryButtonAnimationAction;
public Animator handAnimator;
void Start()
{
}
void Update()
{
float triggerValue = indexAnimationAction.action.ReadValue();
handAnimator.SetFloat("indexAnimationAction", triggerValue);
float gripValue = gripAnimationAction.action.ReadValue();
handAnimator.SetFloat("Grip", gripValue);
float PrimaryButtonValue = PrimaryButtonAnimationAction.action.ReadValue();
handAnimator.SetFloat("Thumb", PrimaryButtonValue);
}
}
make sure to follow Valem's VR New input system setup and this video so you can get this to work, and then you'll need to make a script named HandController, also you'll need to go on the samples folder, then XR Interaction Toolkit, click the numbers, then click starter assets and click over XRI Default Input Actions, once you do that, click on edit asset, go on lefthand interaction and click the plus button close to the Actions text, rename it to PrimaryButtonPressed, open it, and then go and click over the Path button, XR Controller, LeftHand,Optional Controls, then search for "primaryTouched", then click it, click the plus button close to the interactions text, and then select Hold. now you just need to add the HandController script to the hands and fill out all the things, go again on the XRI Default input actions and do the same thing that you've done on the XRI Left Hand Interaction for the XRI RightHand Interaction, except you'll need to select RightHand primaryTouched.
the animate hand on input doesnt show up with the box selecting stuff after putting in the code and i followed all of it fully
there's no link in description about the animator. Does anyone have it? Edit: NVM its in the package XD
why can it be that the xr origin with the character controller falls to the ground, and does not remain at its height?
a work around that I found helpful was adding an: "Additional Offset", Y=1. I am trying to share the article, but youtube has goony policy permissions.
when i put the hands in the empty object i cant see them
hi there,
I can not see particles in my project, any help?
while playing it showing parameter trigger and grip doesn't exit and please how to solve it
Need help having trouble downloading XR Management plugin
Is the starter assets and the hands model open source?
the XRI Default Input Actions is not showing up in the animate hand thing
when I added the new hands they didnt work I need help