# There are any doc or PG to show how does SurfaceMagnetismBehavior work?

**URL:** <https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880>\
**Category:** Questions\
**Created:** [March 9, 2023, 8:48am UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880 "2023-03-09T08:48:36Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![VerandaLouis](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/verandalouis/32/19395_2.png) [@VerandaLouis](https://forum.babylonjs.com/u/VerandaLouis)\
**Post date:** [March 9, 2023, 8:48am UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/1 "2023-03-09T08:48:36Z")

</div>

The question is in the title 🙂

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [March 9, 2023, 9:31am UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/2 "2023-03-09T09:31:59Z")

</div>

A quick search leads to this doc:

> **[SurfaceMagnetismBehavior | Babylon.js Documentation](https://doc.babylonjs.com/typedoc/classes/BABYLON.SurfaceMagnetismBehavior)**
>
> A behavior that allows a transform node to stick to a surface position/orientation \[API\]

and 1 in the playgrounds:

> **[Babylon.js Playground](https://playground.babylonjs.com/#2YZFA0%23275)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![VerandaLouis](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/verandalouis/32/19395_2.png) [@VerandaLouis](https://forum.babylonjs.com/u/VerandaLouis)\
**Post date:** [July 18, 2023, 3:30pm UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/3 "2023-07-18T15:30:17Z")

</div>

I made [this PG](https://playground.babylonjs.com/#2YZFA0#367) to try some possibilities.

I just don’t really understand what does the [updateAttachPoint methode](https://doc.babylonjs.com/typedoc/classes/BABYLON.SurfaceMagnetismBehavior#updateAttachPoint) do.

---

<div class="post-metadata">

**Author:** ![VerandaLouis](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/verandalouis/32/19395_2.png) [@VerandaLouis](https://forum.babylonjs.com/u/VerandaLouis)\
**Post date:** [July 18, 2023, 3:52pm UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/4 "2023-07-18T15:52:48Z")

</div>

in additional, do I have the possibility to choose which face of the behavior of mesh is magnetised ?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [July 18, 2023, 3:58pm UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/5 "2023-07-18T15:58:33Z")

</div>

it updates the hook point when geometry is changed.

---

<div class="post-metadata">

**Author:** ![VerandaLouis](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/verandalouis/32/19395_2.png) [@VerandaLouis](https://forum.babylonjs.com/u/VerandaLouis)\
**Post date:** [July 26, 2023, 1:45pm UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/6 "2023-07-26T13:45:51Z")

</div>

Do we have the possibility to choose which face of the behavior of mesh is magnetised ?

---

<div class="post-metadata">

**Author:** ![Cedric](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/cedric/32/2742_2.png) [@Cedric](https://forum.babylonjs.com/u/Cedric)\
**Post date:** [August 3, 2023, 10:22am UTC](https://forum.babylonjs.com/t/there-are-any-doc-or-pg-to-show-how-does-surfacemagnetismbehavior-work/38880/7 "2023-08-03T10:22:08Z")

</div>

I don’t think so. I think you can change the properties to set the behavior but you can’t choose which face to use.
