# Position Plane along the surface of picked point

**URL:** <https://forum.babylonjs.com/t/position-plane-along-the-surface-of-picked-point/11796>\
**Category:** Questions\
**Created:** [June 18, 2020, 8:13am UTC](https://forum.babylonjs.com/t/position-plane-along-the-surface-of-picked-point/11796 "2020-06-18T08:13:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HiteshSahu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hiteshsahu/32/50817_2.png) [@HiteshSahu](https://forum.babylonjs.com/u/HiteshSahu)\
**Post date:** [June 18, 2020, 8:13am UTC](https://forum.babylonjs.com/t/position-plane-along-the-surface-of-picked-point/11796/1 "2020-06-18T08:13:22Z")

</div>

I am trying to move a plane to the clicked point but it should rotate parallel to the picked surface (wall/roof/ground).

For example, imagine a hanging painting on the wall. When you click anywhere in the room then it should hang on the clicked position.

This is what I have done so far, it works well for the ground but on the ceiling & the wall, I get the perpendicular rotation.

[https://www.babylonjs-playground.com/#14VWOV#9](https://www.babylonjs-playground.com/#14VWOV#9)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/6/6e46fa0309a694408dcf8a7a15c651c187ca84ac.png)  
Please I need help

---

<div class="post-metadata">

**Author:** ![Raggar](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raggar/32/20672_2.png) [@Raggar](https://forum.babylonjs.com/u/Raggar)\
**Post date:** [June 18, 2020, 8:56am UTC](https://forum.babylonjs.com/t/position-plane-along-the-surface-of-picked-point/11796/2 "2020-06-18T08:56:49Z")

</div>

You need to use the world-space normals:  
var axis1 = pickInfo.getNormal(true);  
[https://www.babylonjs-playground.com/#14VWOV#10](https://www.babylonjs-playground.com/#14VWOV#10)  
Another way of doing it:  
[https://www.babylonjs-playground.com/#14VWOV#11](https://www.babylonjs-playground.com/#14VWOV#11)  
No idea which one is better, I guess that comes down to testing.

---

<div class="post-metadata">

**Author:** ![HiteshSahu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/hiteshsahu/32/50817_2.png) [@HiteshSahu](https://forum.babylonjs.com/u/HiteshSahu)\
**Post date:** [June 18, 2020, 9:17am UTC](https://forum.babylonjs.com/t/position-plane-along-the-surface-of-picked-point/11796/3 "2020-06-18T09:17:27Z")

</div>

Perfect 👌 Thank you @Raggar

---

<div class="post-metadata">

**Author:** ![Jo\_Mantelers](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@Jo\_Mantelers](https://forum.babylonjs.com/u/Jo_Mantelers)\
**Post date:** [November 18, 2022, 11:50am UTC](https://forum.babylonjs.com/t/position-plane-along-the-surface-of-picked-point/11796/4 "2022-11-18T11:50:04Z")

</div>

Try this, muchos less code:

> [@How to get correct rotation value from pickinfo.getnormal()](https://forum.babylonjs.com/t/how-to-get-correct-rotation-value-from-pickinfo-getnormal/14280/5):
>
> @Vijayxd totally agree: too many complications going on here. Initially I assumed the geometry is bad so I scolded the 3D artist, well, actually I checked the vertex normals in Inspector. Geometry is ok. So I checked the src code of getNormal and found the normal is negated in some cases, like this: // Flip the normal if the picking ray is in the same direction. if (this.ray && Vector3.Dot(result, this.ray.direction) \> 0) { result.negateInPlace(); } I guess…
