Reputation: 4150
I made a function to get the geometry's vertices position but if I drag the geometry in other part of screen it shows me always the old coordinates.
for(var j=0 ; j<geometryContainer.length ; j++) {
for (var i=0 ; i<geometryContainer[j].geometry.vertices.length ; i++){
geometryContainer[j].geometry.verticesNeedUpdate=true;
x=geometryContainer[j].geometry.vertices[i].x;
y=geometryContainer[j].geometry.vertices[i].y;
z=geometryContainer[j].geometry.vertices[i].z;
console.log(x + ',' + y + ',' + z);
}
}
Upvotes: 0
Views: 405
Reputation: 446
The vertices's position are relative to the object itself.If you want to get the vertices's position relative to the coordinate,get the geometry's position and add the offset of the vertex.
Upvotes: 1