VertexBuffer.PositionKind returing null for gltf object

Hi I am using gltf files and it is loading very well in the scene. Now i want to get all the positions / vertices of the loaded gltf object.
I tried using var positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind).
But this is returning null in the position variable.
It would be helpful if someone can point in the direction of fetching the vertices / position of gltf loaded object.
Thanks in Advance.


what mesh are you referencing here? The root mesh? Want to show us a demo?

Hi I was able to resolve this issue. My glb file has a collection of mesh under one parent mesh. The parent mesh is a virtual mesh i.e. it does not have any vertices or positions and hence this function was returning null. When i try the same function for a child mesh within the parent it works :slight_smile: