# How to get correct rotation value from pickinfo.getnormal()

**URL:** <https://forum.babylonjs.com/t/how-to-get-correct-rotation-value-from-pickinfo-getnormal/14280>\
**Category:** Questions\
**Tags:** documentation, tutorial\
**Created:** [September 19, 2020, 5:12am UTC](https://forum.babylonjs.com/t/how-to-get-correct-rotation-value-from-pickinfo-getnormal/14280 "2020-09-19T05:12:53Z")\
**Posts on this page:** 1\
**Showing post:** 5

<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:46am UTC](https://forum.babylonjs.com/t/how-to-get-correct-rotation-value-from-pickinfo-getnormal/14280/5 "2022-11-18T11:46:01Z")

</div>

@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:

```auto
        // 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 this is why the doc for getNormal says “_Note that the returned normal will always point towards the picking ray_.”. I fail to see the reason for this.

Anyway, the wrong normal can be flipped back like this:

```auto
      let norm = pickinfo.getNormal(true);
      if(pickinfo.ray) {
        let dd = BABYLON.Vector3.Dot(norm, pickinfo.ray.direction)
        if(dd > 0) norm.negateInPlace();
      }

```

Now all normals will be as expected.

---

_[View the full topic](https://forum.babylonjs.com/t/how-to-get-correct-rotation-value-from-pickinfo-getnormal/14280)._
