Interacting with Body Tracking Module - Attaching an object to the character created by the Body Tracking Module

Hello, I’m trying to make a project in unity that involves Body Tracking Module using ZED2 camera. I would like to attach an object to the character created by body tracking module. The object will be attached to a limb. I dont have a lot of experience with unity. In a typical Unity project, I’d attach my object to a specific joint of the character. However, I’m unsure about the specific procedure for this in the context of ZED2’s Body Tracking Module since the characters are created by body tracking module, when it detects a body.
Should I modify the C# code to achieve this?

Hi @calebhunter, welcome to the forums!

What our plugin does is instantiate the avatars when the Body Tracking module detects people. However, it does not “create” it, it instantiates a prefab.
In your context, I think you can go like with a typical Unity project, navigate to the avatar you use in the BodyTrackingModule (it should be under Assets/ZED/Examples/Body Tracking/Prefabs/Avatar) and modify it to add your object under a limb.

There should be no C# involved.

Do not hesitate to show us your project on the forums, it’s always pleasing for us to see things achieved with the ZED cameras!

@JPlou , does the same hold true for the SDK sphere+cylinder “avatar”? I.e., is this a PreFab, or is this created programatically?


The skeleton is created at runtime, from scratch, using basic primitives (cylinders and spheres).

You can find the code related to that here :