Forum Discussion
Tembac
4 years agoExplorer
Adjusting the game for different body sizes
Hi Everyone, I wanted to know about player heights. We are developing games for Vr and we are looking at what is the best way to match players' height. For example, someone with a small body size...
Sandstedt
4 years agoStart Partner
EDIT: Sorry, this doesnt work. Will adjust your scale for each frame 😂.
After digging though the TrackedPoseDriver class, I saw they used the InputSystem.onAfterUpdate event. So run the Resize function in the example above (getting the localPosition.y from the camera, and divide why a default height to get a scale value to apply to the CameraOffset or XR rig GameObject) when this event was triggered instead, and it seems to work. Will need some more testing to confirm everything works fine.
private void OnEnable()
{
InputSystem.onAfterUpdate += InputSystemOnonAfterUpdate;
}
private void OnDisable()
{
InputSystem.onAfterUpdate -= InputSystemOnonAfterUpdate;
}
private void InputSystemOnonAfterUpdate()
{
Resize();
}
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 10 months ago