# mesh.setAbsolutePosition not change mesh position

**URL:** <https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695>\
**Category:** Questions\
**Created:** [October 5, 2020, 9:48pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695 "2020-10-05T21:48:53Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![cpusam](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cpusam](https://forum.babylonjs.com/u/cpusam)\
**Post date:** [October 5, 2020, 9:48pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/1 "2020-10-05T21:48:53Z")

</div>

Hi,  
I’m trying to set the position of a loaded mesh (exported from blender 2.8), but it stays at the same position 0,0,0. I use mesh.setAbsolutePoistion(otherVector3), but the mesh not update its position.

I’ve searched for a answer without sucess. I use the SceneLoader.ImportMeshAsync to load the meshes and I get one to be the player, and that don’t move.

I’m forgetting to do something?

---

<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:** [October 5, 2020, 9:58pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/2 "2020-10-05T21:58:22Z")

</div>

Hey, we will need to see the mesh and the scene  
can you load your asset in the pg?

> **[Using External Assets - Babylon.js Documentation](https://doc.babylonjs.com/resources/external_pg_assets)**

---

<div class="post-metadata">

**Author:** ![cpusam](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cpusam](https://forum.babylonjs.com/u/cpusam)\
**Post date:** [October 5, 2020, 10:18pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/3 "2020-10-05T22:18:39Z")

</div>

Man, I don’t know how to setup the scene at the PG, but my code from set the player mesh, is just:

```auto
  const view = document.getElementById("view") as HTMLCanvasElement;
  const engine = new Engine(view, true);
  const scene = new Scene(engine);
  BABYLON.SceneLoader.ImportMeshAsync(null, "https://raw.githubusercontent.com/cpusam/cpusam.github.io/master/tux/", "TUX.rEMESHblend.babylon", scene)
.then((result) => {
  let playerMesh = result.meshes.find(m => m.name === "playerTux");
  //now add the mesh to player 
  //and finally, add the player.update() at the registerBeforeRender
  //this update is where the player move, just a position.x += 0.05
  //and before quit update, it do playerMesh.setAbsolutePosition(this.position);
});

```

---

<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:** [October 5, 2020, 11:01pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/4 "2020-10-05T23:01:32Z")

</div>

well as you can imagine this does not help me helping you

---

<div class="post-metadata">

**Author:** ![cpusam](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cpusam](https://forum.babylonjs.com/u/cpusam)\
**Post date:** [October 5, 2020, 11:04pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/5 "2020-10-05T23:04:13Z")

</div>

hahaha ok man, I don’t have some time free, because it’s monday and I was working.  
But, maybe at the saturday I will prepare to you a full minimal source to you help me.  
So, just wait a little. And if you have some ideia, share here.

---

<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 6, 2020, 9:44am UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/6 "2020-10-06T09:44:24Z")

</div>

Even at work if you ask for help it’s often worth to spend time for it, you will be more efficient once answered 😉

If you had read the doc’ above, you could have notice that you just had to change the mesh url from the playground example of `using raw.githubusercontent.com` part.

Anyway, I don’t see any issue about the absolutePosition tweaking of your Tux, try to edit this playground to show us your code: [https://www.babylonjs-playground.com/#YIU90M#178](https://www.babylonjs-playground.com/#YIU90M#178)

---

<div class="post-metadata">

**Author:** ![JCPalmer](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/jcpalmer/32/42_2.png) [@JCPalmer](https://forum.babylonjs.com/u/JCPalmer)\
**Post date:** [October 6, 2020, 10:42am UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/7 "2020-10-06T10:42:13Z")

</div>

There is one way that this will happen that, while unlikely, will be very difficult to find. There is a freezeworldmatrix custom Blender property. If that was checked, it will not move, because you asked it not to.

The two most likely reasons are:

- a spelling error on the function name, just like you did in the first post.
- Your code for getting mesh is flawed. I use scene.getMeshById(). To rule out, run the dispose() method. If still there, then this is the problem.

I shouldn’t have to say it, but check the console too.

---

<div class="post-metadata">

**Author:** ![cpusam](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cpusam](https://forum.babylonjs.com/u/cpusam)\
**Post date:** [October 6, 2020, 8:34pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/8 "2020-10-06T20:34:00Z")

</div>

@Vinc3r  
Wow, man, I will look at my code to see where I’m doing wrong.

@JCPalmer  
Thanks for the info!

---

<div class="post-metadata">

**Author:** ![cpusam](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cpusam](https://forum.babylonjs.com/u/cpusam)\
**Post date:** [October 6, 2020, 11:19pm UTC](https://forum.babylonjs.com/t/mesh-setabsoluteposition-not-change-mesh-position/14695/9 "2020-10-06T23:19:37Z")

</div>

I now know why my code was wrong, I was setting the mesh with name “playerTux” and not the true mesh of name “TUXrEMESH3”.  
Thanks for the code!
