soulhuntre opened this issue on Jun 27, 2001 ยท 6 posts
bushi posted Thu, 28 June 2001 at 1:02 PM
There are functions already built into the Pro-Pack that let you manipulate the positions of vertices. The problem is figuring out which vertices are in-bounds or out-of-bounds. In-bounds in this case would be laying within the volume enclosed by the clothing and out-of-bounds would be laying 'above' the volume. If you know that a figure vertex is above a clothing polygon, you can use some simple vector algebra to move the vertex along the normal to put it inside the volume. Looking for edges of the figure intersecting the polygons of the clothing is one approach for checking bounds. Another uses the normals of the clothing polygons to do this check. The big problem is in the special cases where the figure's vertices are just above an edge or vertex of the clothing. So far, I'm hashing together an algorithm that works for general cases. The devil will be in the details on this one. ;-)