Notifications
Clear all

[Closed] Get untransformed vertex in Maxscript

Hi all!

Is there a way to get the unfransformed position in Maxscript?

Bye and thanks!

Alex

1 Reply

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
)