# Change in TransformNode.lookAt() from 3.3 -\> 4.x

**URL:** <https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858>\
**Category:** Questions\
**Created:** [September 25, 2019, 5:25am UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858 "2019-09-25T05:25:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianzinn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brianzinn/32/28013_2.png) [@brianzinn](https://forum.babylonjs.com/u/brianzinn)\
**Post date:** [September 25, 2019, 5:25am UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/1 "2019-09-25T05:25:25Z")

</div>

I am converting GUI code to latest version. Here is an old playground of mine that looks right in v3.3:  
[https://www.babylonjs-playground.com/#Q81PBV#1](https://www.babylonjs-playground.com/#Q81PBV#1)

In latest versions (besides % warnings and other oddities) the mesh plane no longer faces the camera. I think it may be in a stored translation/billboard - was already digging a bit… I will be checking it out fully this weekend to PR, but just wanted to share here in case anybody had any thoughts.

I tried simple 180 degree correction `lookAt(camera.position, Math.PI / 2)`, but it’s not just because it’s the backface 🙂

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [September 25, 2019, 11:32am UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/2 "2019-09-25T11:32:17Z")

</div>

Why dont you use the billboard mode?  
[https://www.babylonjs-playground.com/#Q81PBV#12](https://www.babylonjs-playground.com/#Q81PBV#12)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [September 25, 2019, 11:33am UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/3 "2019-09-25T11:33:16Z")

</div>

But that didnt answer your question 🙂  
I honestly have no idea why it happened, I can only assume that it was something repaired in the math or the actual lookAt function.

---

<div class="post-metadata">

**Author:** ![adam](https://avatars.discourse-cdn.com/v4/letter/a/4af34b/32.png) [@adam](https://forum.babylonjs.com/u/adam)\
**Post date:** [September 25, 2019, 1:45pm UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/4 "2019-09-25T13:45:40Z")

</div>

I remember @Deltakosh saying that they changed lookAt so that it uses the positive z axis instead of the negative z. Something like that. This should have been added to the breaking changes section of the release notes. I wasn’t able to find it there, though.

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 25, 2019, 2:15pm UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/5 "2019-09-25T14:15:52Z")

</div>

Yep it was actually a bug in the look at function

---

<div class="post-metadata">

**Author:** ![brianzinn](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/brianzinn/32/28013_2.png) [@brianzinn](https://forum.babylonjs.com/u/brianzinn)\
**Post date:** [September 25, 2019, 6:55pm UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/6 "2019-09-25T18:55:05Z")

</div>

It seems less intuitive that I have to have a plane with GUI attached to look **away** from the camera to see the “front” face (while BILLBOARDMODE\_ALL shows correctly facing). I will do more investigation - Thanks for the feedback and tips 🙂  
ie: this has the GUI not mirrored:  
plane.lookAt(camera.position.add(camera.getForwardRay().direction.scale(50)))

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [September 25, 2019, 8:22pm UTC](https://forum.babylonjs.com/t/change-in-transformnode-lookat-from-3-3-4-x/5858/7 "2019-09-25T20:22:40Z")

</div>

> [@brianzinn](#):
>
> Math.PI / 2

this should work as well: [https://www.babylonjs-playground.com/#Q81PBV#13](https://www.babylonjs-playground.com/#Q81PBV#13)
