oculus-samples / Unity-Movement

Body, Eye and Face Tracking code sample.
Other
278 stars 47 forks source link

Request: `BodyPoseBoneTransforms` can parse a `BodyPose` Asset in either world or local space #89

Open cloudcover opened 1 month ago

cloudcover commented 1 month ago

I am currently dealing with an issue where I am using the retargeted humanoid from the Body Tracking for Fitness examples to load in a BodyPose that I have pre-recorded. The issue is that I cannot place the pose guide in the location that I would like to, because the serialized data for a BodyPoseData Asset is ingested by the BodyPoseBoneTransforms Component in world space.

I personally don't feel that this is very useful in general. It seems to me that if one ever wanted to load in pre-recorded BodyPoseData Assets in the spirit of why this toolset was created (for matching poses in fitness games), they would always be expected to be parsed in local space, otherwise every pose would be in a different location relative to where they incidentally happened to be captured in the capturer's tracking space on startup at runtime.

Nevertheless, it seems prudent that BodyPoseBoneTransform should either take in a local space BodyPose by default, or allow you the top-level option to stipulate upon getting a valid bodyPose reference. I got where I needed to go by faking an input to BodyPoseBoneTransforms that subtracts the root offset of the first bone from every bone in the list as a faked world space position, but this is a hack and definitely not ideal.