Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I get hand movement in VR to work?

Asked by 3 years ago

I'm trying to make a basic Roblox VR game, but I can't get the hands to work. The sensitivity's all off with the object movement. So far, my engine works this way: you can use the joystick to move your character around, which also moves your first-person VR camera around. The camera isn't locked in place with the head, it's fully 6DoF, so your head's basically the origin point, and it doesn't move with your camera. It basically works just the same as any other 6DoF VR engine, like OpenXR. I can't get the hands to go in the correct position, though. Does anyone know the logic to get it to work correctly?

1 answer

Log in to vote
0
Answered by 3 years ago

Nevermind, I figured out. I'll share the logic with you. We get the VR headset position, subtract that from the hand position, multiply that by the head scale, add that to the camera's position, and set the hand position to that final value. To get the orientation, just set the hand's orientation to the, well, hand's orientation! Then you should have working VR hands if you bind that to render step. Make sure to anchor the part, though. I'm not sure what happens if you don't, but it might not work. Also make sure CanCollide's off.

Ad

Answer this question