Hi,
Is there a way to adjust the size of the avatar during body tracking in UE? For example, to the size of the user?
Hi,
Not out-of-the-box, no.
The data you get from the SDK is scaled, though, so there is room to implement that, but it’s not included in the plugin.
Am I right in assuming that all avatars will be scaled the same? I mean, if I have people of different heights, will their avatars all be the same?
They will, yes.
We did some tests with some sort of scaling internally, but the results were difficult to exploit, it also brought root motion and animation questions.
So we sticked to 1-size-fits-all for the sample.
Thanks, do you have an approach to applying the correct scaling factor? Would it be possible to scale based on the user’s height and the avatar’s height? I am not sure how to get the users height from the given body data.
That’s a tough one, especially for stable and accurate results.
There are several approaches you could take given what’s available to you.
You’ve got access to all bones’ ID and lengths. Matching a given bone or chain of bones to the equivalent in the avatar you’re using can give you a ratio, it can be a good starting point.
There are probably other ways, but we’ve not implemented/explored this scaling, so that’s exploratory work!
Are the dimensions in BodyData given in cm? As I understand it, the 2nd value is at least an approximate height of the user?
I think the dimensions are in meters even though we pass them to UE5, but at worst it’s a x100 ratio, it should appear obvious when you test.
Which second value are you talking about? You could get by by using the height in Dimensions, but this value will change if the subject is standing or sitting, or even occluded by the camera if the fitting is not enabled.
I think measuring only certain bones that are often seen, like the torso, can give you a good approximation, but as I said, exploratory stuff.