How to handle Character Physics and IK with dynamically scaled world (character, platforms, etc)

wuche

Member
I am prototyping a scene where the game world and the character is parented to a root transform, and that root transform that can be dynamically rescaled during runtime.

While testing this out, I am running into two issues so far:

Character Physics:

With Physics, I noticed that physics seem to be based off of world values rather than local values. So for example, if I scale down the world and the character, I will also need to reduce the Max Step Height to prevent the character from being able to walk on top of relatively large objects (whereas when the parent scale was default world 1,1,1, I did not have this issue.

Is this a matter of determining an optimal curve depending on scale and readjusting the Character's parameters during runtime? So for example, if the parent scale 1, and the character max step height is 0.35, then if the parent scale is 0.25, then I would want the character max step height to be 0.35 * 0.25? Would I need to do that with all physics related properties? And should I be concerned about these not behaving appropriately if I scale them linearly like in the example above?

Character IK:

If I scale down the Atlas' character from the Demo scene, the more I scale him down, the more it seems like Atlas is crouching, when they should be standing as normal. When I disable Character IK during runtime, they return back to looking like they are fully standing. I've tried playing around with the hip and foot offsets, but they do not help.

Here is an example of Atlas being scaled down to 0.25, 0.25, 0.25 (they are in an Idle standing state, but it looks like they are crouching)

1705805609738.png

Any help here would be greatly appreciated!
 
Last edited:
@Cheo was kind enough to test this out also on their end, and confirmed the Character IK issue when scaling:

"It's exactly as you said, both when scaling the child model down or the root object. It also seems that changing Override Foot IK Weight does nothing. "
 
As a starting point the character cannot be a child of another object. It doesn't take into account the parent object transform so you will get undefined results if you make the character a child.

Beyond that some of the values, such as the step height and IK offsets, are absolute values, so if you scale the character you will also need to scale those values.
 
Top