12-18-2019, 12:17 PM
Nothing!always says is not a member.
I found centre of the mesh using bouds and bouds.size (like x=bouds.x+bouds.size.x/2, y=bouds.y+bouds.size.y/2 z=bouds.z+bouds.size.z/2) Is not the same thing?
But i need to find and move only the positions with the same coordinates in mesh1 and mesh2.
I will explain...
my mesh1 is a jaw and mesh2 is a tooth. If i move the tooth i need to stretch mesh1 moving the positions that, before moving the tooth, had the same coordinates.
I need to mantain the contact between mesh1 and mesh2 after moving the tooth.
I tried to :
1 - read all positions on mesh1 and check which have the same coordinates on mesh2,
2- if yes marked them for moving,
3 - calculate vector of mouvement (mesh2.center - mesh2.newcenter)
4 - move all the positions marked using this vector
Maybe it works but my mesh1 has 158000 vertices and code works 20 minutes!!
Some suggestions?
I found centre of the mesh using bouds and bouds.size (like x=bouds.x+bouds.size.x/2, y=bouds.y+bouds.size.y/2 z=bouds.z+bouds.size.z/2) Is not the same thing?
But i need to find and move only the positions with the same coordinates in mesh1 and mesh2.
I will explain...
my mesh1 is a jaw and mesh2 is a tooth. If i move the tooth i need to stretch mesh1 moving the positions that, before moving the tooth, had the same coordinates.
I need to mantain the contact between mesh1 and mesh2 after moving the tooth.
I tried to :
1 - read all positions on mesh1 and check which have the same coordinates on mesh2,
2- if yes marked them for moving,
3 - calculate vector of mouvement (mesh2.center - mesh2.newcenter)
4 - move all the positions marked using this vector
Maybe it works but my mesh1 has 158000 vertices and code works 20 minutes!!
Some suggestions?

