# Absolute position is not working

**URL:** <https://forum.babylonjs.com/t/absolute-position-is-not-working/14768>\
**Category:** Bugs\
**Created:** [October 8, 2020, 11:52am UTC](https://forum.babylonjs.com/t/absolute-position-is-not-working/14768 "2020-10-08T11:52:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![artteq](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@artteq](https://forum.babylonjs.com/u/artteq)\
**Post date:** [October 8, 2020, 11:52am UTC](https://forum.babylonjs.com/t/absolute-position-is-not-working/14768/1 "2020-10-08T11:52:28Z")

</div>

Hi guys,

I’m trying to change and read positions and absolute positions of objects in a scene, but seemingly the absolute positions module is just not working. Please see the following PG for example:  
[https://playground.babylonjs.com/#4F33I3#24](https://playground.babylonjs.com/#4F33I3#24)

Is it a bug or am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![Vinc3r](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/vinc3r/32/25340_2.png) [@Vinc3r](https://forum.babylonjs.com/u/Vinc3r)\
**Post date:** [October 8, 2020, 12:20pm UTC](https://forum.babylonjs.com/t/absolute-position-is-not-working/14768/2 "2020-10-08T12:20:43Z")

</div>

[setAbsolutePosition](https://doc.babylonjs.com/api/classes/babylon.mesh#setabsoluteposition) was not used as it should: (l.31) [https://playground.babylonjs.com/#4F33I3#25](https://playground.babylonjs.com/#4F33I3#25)

That’s said, I don’t know why the `sphere1.absolutePosition` is still equal to [0,0,0] (l.29), doesn’t should be [2,0,0]?

* * *

Actually it’s weird:

- when opening the playground, then once the scene loaded opening the console, I’ve the correct `sp1 absPos` values:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/1/18b13da44a87dae006b8184c55080242e688e207.png)
- if I click on Play button, values are now wrong:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/8/864a1d98ec2d917edcb99c28ba5ab8ebe444f270.png)
- BUT! if I unfold these values, they’re right… what the fuck? 😃  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/f/f7afa170d8c3c3f8051f87d932faa376ca501c1f.png)

And it’s not only due to my Firefox Nightly, here same bug in Chrome:  
 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/f/f8fe2785876ae606d8c932d81cc9ef10a96b61e0.png)

Same when using `sphere1.getAbsolutePosition()`

---

<div class="post-metadata">

**Author:** ![artteq](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@artteq](https://forum.babylonjs.com/u/artteq)\
**Post date:** [October 8, 2020, 1:27pm UTC](https://forum.babylonjs.com/t/absolute-position-is-not-working/14768/3 "2020-10-08T13:27:33Z")

</div>

Yeah, sure, thanks, just forgot it’s not a property but a method, just too tired already)

And yes, it happened it is the same with my browser. The correct values are only in the unfolded view but it is only the initial string that shows wrong values.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [October 8, 2020, 3:43pm UTC](https://forum.babylonjs.com/t/absolute-position-is-not-working/14768/4 "2020-10-08T15:43:57Z")

</div>

You should clone the vectors when dumping them in the console, else the properties are reused and updated by subsequent function calls.
