Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Unity MARS populating a Body Tracking Proxy at runtime

Discussion in 'Unity MARS' started by Orphen, Nov 6, 2023.

  1. Orphen

    Orphen

    Joined:
    Nov 10, 2013
    Posts:
    1
    Hey all,

    Any idea how to populate the body tracking proxy with a custom rig and model at runtime? It doesn't seem to hook into the relevant events if done in the simplest way or a variation of that. Unfortunately my knowledge of skinnedMeshRenderer/skeleton relationships is limited as is my understanding MARS tech.

    For context, I'm trying to dress up myself up with different costumes.

    I've tried:
    1. Instantiating model/rig with parent animator but cannot seem to find a way to hook into the Proxy system's Body Pose Tracking component to assign this new animator at runtime.

    2. Having an existing in-scene gameObject that has a pre-assigned animator attached and hooked this into the Proxy Body Pose Tracking component. Then instantiated the prefab model/rig below that. This allows the body tracking system to correctly anchor the model but it does not track poses at all.

    3. Variations of the above using an existing rig (common across models) and only instantiating the model with no luck. (Likely an issue with the rig / model pairing, more than MARS but listing for completeness).

    4. I've attempted to reset the AR Session once the new outfit is populated but that didn't work.
    The only successful way I've got an outfit to track is if its the scene when it's loaded, which isn't ideal. Any advice?