@Leonidas ah I must be doing something wrong, I tried the following:
if (this.entity.model) {
var meshInstances = this.entity.model.meshInstances;
for (var i = 0; i < meshInstances.length; ++i) {
var mi = meshInstances[i];
var cur = mi.node;
while(cur) {
if(cur.parent === cur) {
break;
}
cur = cur.parent;
}
console.log(mi.node.name + " " + JSON.stringify(mi.node.getLocalPosition()));
if (mi.node.name == this.nodeName) {
this.targetPosition = mi.node.getLocalPosition();
}
}
}
I’ve imported your model in Blender and I think the local position you are getting back is correct. All Blender nodes are positioned at 0,0,0 local space. Their vertices are displaced but the pivot point of each node is at 0,0,0.
You could change the pivot point for each node to be at the mass center to get it to be closer at where the corresponding vertices are.