0
\$\begingroup\$

Hope all is well with you! I am messing around with a game idea in Unity. I am working on getting a good IK rig going on for the player since it will be an important part of the gameplay.

I currently have hands that work just like I want them to, updating live to my real-life hand location. With this, I can tell where my hand is actually located in relation to the IK rig. So essentially I have two components, my controller, and my IK rig's arm/hand updating its potion to my controller's position.

It acts as expected and the models overlap perfectly until I stretch out my arms fully. When I do this I can see the model's arms are not as long as my real-life arms, this creates a jarring disconnect.

How do I solve this? Obviously I can adjust the model to perfectly fit me, but I want the arms to be the correct length for all players, not just a model custom fit to me..

My first idea was to create some allowable stretching in the bicep or forearm. That way the IK rig's hand can always update to my controller's position exactly. Is this viable? If so, how would that be achieved?

This creates another question.. I am 6'. what about people who are shorter with shorter arms. If the player model has longer arms than the actual player, wouldn't the IK rig's arms awkwardly bend when the player's arms are simply down at their side? Is there a solution to this?

Lots of games seem to have these problems solved as far as I can tell. I don't know what they are doing under the hood, so some guidance on this would be great! Thank you so so much!!

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

The range of human proportions and ranges of motion is quite large, so you may need to incorporate some degree of per-user calibration.

This doesn't need to be an explicit step in the game setup/menus - you can do it implicitly. Early in the game (or in each session, if you can), have some task that requires fully extending the arms - like matching a pose or reaching for a needed control. When the player does that action, measure the reported offsets between the controllers or from one controller to the HMD. This gives you an estimate of the player's reach.

Now you can form a correction factor. Take the reach measurement you designed for and divide it by the measurement you've taken for the player. This gives you a ratio to convert from runtime player metrics to design-time metrics. You can then do one of two things:

  1. Scale your character model/rig by the reciprocal of this ratio, so that the maximum reach of your rig now matches the maximum reach you measured for the player.

    or

  2. Scale your controller offsets from the HMD by this ratio before feeding them to the IK targets in each update - effectively scaling your player's arms until they match the standard character size metrics you designed for.

When the player boots up the app for the first time, this ratio is just 1.0 - your best starting guess for a size that might work. You can continually measure the player whenever they perform an arm-spread pose to update the estimate, and save it as a player preference so they default to a better fit at the start of the next session.

You may be able to slowly blend the scale factor during play as you refine your estimate, but be careful with this as it might increase the risk of simulation sickness. A safer bet is to apply your latest values when the player teleports or accesses a UI screen, so they don't perceive any lurch unrelated to their real-world movements.

The arms might look a little janky on the first reach, before you've calibrated this ratio, but once you get into the right ballpark it should look smooth from there on.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .