# Finding the depth of the body with KinectPV2 library

**URL:** https://discourse.processing.org/t/finding-the-depth-of-the-body-with-kinectpv2-library/30451
**Category:** Libraries
**Created:** [June 2, 2021, 7:42pm UTC](https://discourse.processing.org/t/finding-the-depth-of-the-body-with-kinectpv2-library/30451 "2021-06-02T19:42:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![l3ehfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/l3ehfar/32/4074_2.png) [@l3ehfar](https://discourse.processing.org/u/l3ehfar)
#### Post date: [June 2, 2021, 7:42pm UTC](https://discourse.processing.org/t/finding-the-depth-of-the-body-with-kinectpv2-library/30451/1 "2021-06-02T19:42:46Z")

</div>

Can anyone help me with finding the depth of the body with KinectPV2?  
I mean I can track the body positions and I can track the depth data but I have no idea how to get the depth data of for example just the hands or even the whole body?

---

<div class="post-metadata">

### Author: ![micuat](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micuat/32/19407_2.png) [@micuat](https://discourse.processing.org/u/micuat)
#### Post date: [June 2, 2021, 8:13pm UTC](https://discourse.processing.org/t/finding-the-depth-of-the-body-with-kinectpv2-library/30451/2 "2021-06-02T20:13:55Z")

</div>

would `joint.getZ()` work?

> <https://github.com/ThomasLengeling/KinectPV2/blob/master/KinectPV2/examples/SkeletonMaskDepth/SkeletonMaskDepth.pde#L127>

---

<div class="post-metadata">

### Author: ![l3ehfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/l3ehfar/32/4074_2.png) [@l3ehfar](https://discourse.processing.org/u/l3ehfar)
#### Post date: [June 3, 2021, 8:33pm UTC](https://discourse.processing.org/t/finding-the-depth-of-the-body-with-kinectpv2-library/30451/3 "2021-06-03T20:33:51Z")

</div>

thanks, I had tried it before but the getZ() value is always returned as 0.0, do you have any idea about it?

---

<div class="post-metadata">

### Author: ![l3ehfar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/l3ehfar/32/4074_2.png) [@l3ehfar](https://discourse.processing.org/u/l3ehfar)
#### Post date: [June 5, 2021, 6:21am UTC](https://discourse.processing.org/t/finding-the-depth-of-the-body-with-kinectpv2-library/30451/4 "2021-06-05T06:21:14Z")

</div>

[example "SkeletonColor" why joints[jointType].getZ() always zero · Issue #60 · ThomasLengeling/KinectPV2 · GitHub](https://github.com/ThomasLengeling/KinectPV2/issues/60) I found the solution!
