Notifications
                
            
                Clear all
    
            
        [Closed] Get untransformed vertex in Maxscript
Jan 08, 2007 1:09 am
                      Hi all!
Is there a way to get the unfransformed position in Maxscript?
Bye and thanks!
Alex
                             1 Reply                        
                    Jan 08, 2007 1:09 am
                      You have to transform the vertex position by the inverse of the object transform matrix. Something like this:
fn getUntransformedVertices obj = (
	local theMesh = snapshotAsMesh obj
	local invMat = inverse obj.transform
	local vertices = for i = 1 to theMesh.numVerts collect (
		(getVert theMesh i) * invMat    -- vertex from world-space to object-space
	)
	delete theMesh
	
	return vertices
)