Problem with hand position

In the XR rig, I placed hands with a script to replace the controllers. The issue is that the hands do not change position, even when configuring it in Unity. I’m not sure if the problem lies in my script or if it’s related to the XR rig.
message.txt

Original Post on Discord

by user 691445074055397447

Hello there – we have an experimental AI bot :robot: that might be able to help you with your question. Would you like to try this out?

How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.

Help requested: please wait a moment…

Here is what I found for you :brain: Discord

Hi Boss15493,

The script seems well-structured, but without seeing the specific Unity configuration or having more context on how the XR Rig and controller scripts are integrated, it’s hard to pinpoint the exact issue. I noticed in the provided code that there is logic in place to handle the visibility and orientation of the controllers and hands when entering or exiting VR, which looks correct.

Here are a few things to consider:

  1. Make sure the Unity XR settings are configured to track the position and rotation of the controllers properly.
  2. Ensure that your hands are properly parented to the controller objects in Unity, as the controllers’ position and rotation changes are what should move the hands in VR.
  3. Verify that the XR rig is setup correctly and that no local transformations on the hand objects or their parents are overriding the controller’s transform.

If everything seems configured correctly, you may want to add logs to updateControllerTransform to ensure the code is getting and applying the controller positions to the hands properly. You might also want to check if any other scripts or Unity components are interfering with the hand transforms.

If you want to provide more information or context, like a snippet of the Unity hierarchy or specific issues encountered, I can give more targeted advice.

1 messages left GPT 4
thread_WlDqMa9gaua7rJJOQNzSosiB

Hey :wave: for adding custom hands, needle has the Avatar workflow, here’s a sample: https://engine.needle.tools/samples/custom-hands/

Have you resolved your issue @boss15493 or do you still need help.

Also the team is hard at work on refactoring certain parts of our webxr implementation so some parts are subject to change.

Hey, I was able to solve the problem. I had an error in my code. Thank you very much!

by user 691445074055397447

Hi, we will release a first version of a big webxr update adding new features and overall simplifiying and improving many of our features and apis the next few days (it will be a pre release first)

Hi, I updated needles to see what you have implemented, and well, the code I had created was essentially based on your shoot range that you have in your samples, where you use WebXR to check if the session is VR and for the controls. However, it seems that it’s no longer usable. I would like to know if you have documentation or any project with the new implementation to verify how it works now .

Another question I have is that when I enter VR from my computer using a VR extension, I encounter an error with the controls. However, when I enter from my Quest, I don’t have any problems. I’m wondering if the issue is with the extension. The only reason I use the VR extension is to be able to view the console. Is there any way to view the console from the Quest ? Thank you very much.

by user 691445074055397447

by user 691445074055397447

hi, please update the samples package to 0.14 to get the updated WebXR scripts

The error looks like it’s using a different codepath - it works fine in the webxr extension. Try e.g. https://fern-platinum-antimony.glitch.me/

ok ok thanks

by user 691445074055397447

whith this link work fine! very cool proyect !

by user 691445074055397447

Thanks, It’ll be a sample soon*ish

the code is in the samples repository if you want to look at it now (on the bow & arrow branch)

ok ok, perfect! Thank you very much. I’ll take a look.

by user 691445074055397447

Hi! I’m trying to apply the new scripts that were implemented, but it’s not working as expected. I don’t know if I’m missing something. My issue is that I want the controls to be like guns, as in the shooting range example. However, once the guns appear in VR and work fine, they move with the controls, disappear, and I get this error


by user 691445074055397447

I added the XR Control Model and XR Control Movement to the XR component, and I have assigned the avatar. I have an XR rig where the avatar is placed, and I’m using the same gun script as in the shooting range. I don’t know where I’m going wrong


by user 691445074055397447

Your avatar is a child object of the XRRig here? Is it assigned to the WebXR Avatar component?

Hi, yes my avatar is a child object of the XRRIG, and yes the avatar is assigned to the WebXR

by user 691445074055397447