# Highlight/Snap the vertex of geometry on mouse hovering

**URL:** <https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347>\
**Category:** Questions\
**Tags:** geometry\
**Created:** [February 28, 2019, 10:23am UTC](https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347 "2019-02-28T10:23:13Z")\
**Posts on this page:** 4\
**Page:** 2

<div class="post-metadata">

**Author:** ![J450NP13](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@J450NP13](https://discourse.threejs.org/u/J450NP13)\
**Post date:** [January 1, 2022, 4:58am UTC](https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347/22 "2022-01-01T04:58:44Z")

</div>

@prisoner849 How about this?

A rough example with using of barycentric coordinates of faces of a non-indexed buffer geometry (an STL-model from examples):  
[https://jsfiddle.net/prisoner849/jx9rfq5n/](https://jsfiddle.net/prisoner849/jx9rfq5n/)

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [January 1, 2022, 12:10pm UTC](https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347/23 "2022-01-01T12:10:29Z")

</div>

> [@J450NP13](#):
>
> How about this?

What about this? Works as expected 😃

---

<div class="post-metadata">

**Author:** ![J450NP13](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@J450NP13](https://discourse.threejs.org/u/J450NP13)\
**Post date:** [January 1, 2022, 2:27pm UTC](https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347/24 "2022-01-01T14:27:12Z")

</div>

@prisoner849 I love you dude

---

<div class="post-metadata">

**Author:** ![J450NP13](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@J450NP13](https://discourse.threejs.org/u/J450NP13)\
**Post date:** [January 2, 2022, 6:16am UTC](https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347/25 "2022-01-02T06:16:50Z")

</div>

@prisoner849

I’m working on combine these two pens of yours. I’m not real familiar with Three.js yet but is the

```javascript
camera.position.setScalar(7);

```

have anything to do with the placement of each of the spheres for the hovering and the click to get the line drawn to measure?

[Previous page](https://discourse.threejs.org/t/highlight-snap-the-vertex-of-geometry-on-mouse-hovering/6347.md?page=1)
