# How to get position from mesh vertex data

**URL:** <https://forum.babylonjs.com/t/how-to-get-position-from-mesh-vertex-data/48254>\
**Category:** Questions\
**Created:** [February 23, 2024, 8:17pm UTC](https://forum.babylonjs.com/t/how-to-get-position-from-mesh-vertex-data/48254 "2024-02-23T20:17:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liam\_Kruger](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/liam_kruger/32/37912_2.png) [@Liam\_Kruger](https://forum.babylonjs.com/u/Liam_Kruger)\
**Post date:** [February 23, 2024, 8:17pm UTC](https://forum.babylonjs.com/t/how-to-get-position-from-mesh-vertex-data/48254/1 "2024-02-23T20:17:02Z")

</div>

I have this function that creates a mesh and then applies vertex data to it  
export function createCustomMeshFormVertexData(vertexData: VertexData, scene: Scene): Mesh {  
vertexData.normals =   
VertexData.ComputeNormals(vertexData.positions, vertexData.indices, vertexData.normals)  
const mesh = new Mesh(‘mesh’, scene)  
vertexData.applyToMesh(mesh, true)  
return mesh  
}  
however when i go to get this mesh’s position elsewhere its showing as 0,0,0 . is there anyway to use the vertex data to get a mesh’s position?

---

<div class="post-metadata">

**Author:** ![SvenFrankson](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/svenfrankson/32/29446_2.png) [@SvenFrankson](https://forum.babylonjs.com/u/SvenFrankson)\
**Post date:** [February 24, 2024, 3:01am UTC](https://forum.babylonjs.com/t/how-to-get-position-from-mesh-vertex-data/48254/2 "2024-02-24T03:01:03Z")

</div>

In this snippet you don’t update the mesh’s position, you assign its vertices positions (number array).

You can get the vertices positions (number array) with

`mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);`

If all worked well that’s where you will find the vertices positions (number array).

I don’t think using VertexData to get a mesh’s position (vector3) make sense, the VertexData is not an object instantiated in the scene, it has no transform.
