# How to measure the vertical distance between two points?

**URL:** <https://forum.techsoft3d.com/t/how-to-measure-the-vertical-distance-between-two-points/3240>\
**Category:** HOOPS Visualize Web\
**Created:** [February 5, 2024, 3:12am UTC](https://forum.techsoft3d.com/t/how-to-measure-the-vertical-distance-between-two-points/3240 "2024-02-05T03:12:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![619944680](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/619944680/32/516_2.png) [@619944680](https://forum.techsoft3d.com/u/619944680)\
**Post date:** [February 5, 2024, 3:12am UTC](https://forum.techsoft3d.com/t/how-to-measure-the-vertical-distance-between-two-points/3240/1 "2024-02-05T03:12:42Z")

</div>

It that mean draw a right angle between two points and obtain the vertical distance between them in hoops Communicator.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [February 5, 2024, 1:36pm UTC](https://forum.techsoft3d.com/t/how-to-measure-the-vertical-distance-between-two-points/3240/2 "2024-02-05T13:36:22Z")

</div>

Hello @619944680,

I’m not really sure if this is what you are looking for – but to get the distance between two points you can [subtract](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Point3.html#Communicator.Point3.subtract) the two points to create a vector and then get the [length](https://docs.techsoft3d.com/communicator/latest/api_ref/viewing/classes/Communicator.Point3.html#Communicator.Point3.length) (distance) of that vector. Here’s a code snippet:

```auto
var p1 = new Communicator.Point3(3, 2, 1);
var p2 = new Communicator.Point3(1, 1, 1);
var vec1 = p1.subtract(p2);
var len = vec1.length();

```

Thanks,  
Tino
