ozRocker Posted April 21, 2018 Share Posted April 21, 2018 I have an OBJ that starts like this: v -212.947922 761.461914 28.203093 v -213.405563 766.404602 28.193245 v -214.460007 771.238403 28.648092 v -214.639648 776.197327 28.477924 v -215.033905 781.149658 28.498495 v -215.717438 786.059753 28.729038 I copied the vertices to an array using mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind) When I look at vertices[0] I expected to get -212.947922 (the first value in the OBJ file) but it comes up with a value that's somewhere else in the OBJ file. How can I map a value from getVerticesData() to a location in the OBJ file? So for example a value I get from getVerticesData could be -215.033905 which would map to 12th value in the OBJ file. Quote Link to comment Share on other sites More sharing options...
ozRocker Posted April 22, 2018 Author Share Posted April 22, 2018 I figured it out. The vertices data is in order of the vertices from the faces data GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted April 25, 2018 Share Posted April 25, 2018 Well done! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.