I would like to detect multiple skeletons in my unity Scene. However the example shown in the reference only provides an example for UI skeletons with the script SkeletonController.cs.
Is it possible to do it with 3D skeletons ?
I have trying to change variables of SkeletonController.cs. SimpleSkeletonAvatar to SimpleSkeletonAvatar3d but it didn’t work.
Thank You !
Here is a possible solution:
- Go to
SkeletonController.cs and replace all
- In Unity editor, open the RGBandSkeletons scene.
- Set the position of Main Camera to 0, 0, 0
- Change settings of Color Frame Canvas: Render Mode = ‘Screen Space - Camera’.
Drag-and-drop Main Camera (from p.2 ) to Render Camera.
- Delete Skeleton Canvas.
- Create an empty object and name it Skeleton3d (make sure that its position and rotation are set to 0, 0, 0). Drag-and-drop SimpleSkeletonAvatar3d to this object. Fill in the fields (joint prefab - JointSphere prefab, Connection Prefab - Connection prefab). Save as prefab and delete from the scene.
- Create an empty object Skeleton Controller (make sure that its position and rotation are set to 0, 0, 0), drag-and-drop Skeleton Controller to this object. Drag-and-drop the Skeleton3d prefab (from p. 5) to the Skeleton field.
If you need RGB background:
- The aspect ratio of the window should be the same as the aspect ratio of your sensor (for example, 4:3).
- If the skeleton size is incorrect, you have to change Field of view of Camera to the necessary value (so that the skeleton and RGB image correspond) (for example, 40).
If you don’t need RGB, just delete Color Frame Canvas and don’t follow p. 4 from the previous instructions.
Thank you very much for your response !
Everything is working !