I need to get a map of edges out of max to use for collision detection in our game. This is what I have so far.
rollout new "Edgemap Exporter"( label lab "Export Edgemap" button btn_export "Export" on btn_export pressed do ( out_name = getSaveFileName types: "Edge Map(*.emap) |*.emap|" out_file = createfile out_name edgemap = snapshotAsMesh selection[1] --I need to get a list of the edges of the object here --num_verts = edgemap.numEdges --format "%\n" num_verts to:out_file --vert1 = getVert tmesh num_verts --vert2 = getVert tmesh 1 --format "% % % %\n" (vert1.x) (vert1.y) (vert2.x) (vert2.y) to:out_file --for v = 2 to num_verts do --( --vert1 = getVert tmesh v - 1 --vert2 = getVert tmesh v --format "% % % %\n" (vert1.x) (vert1.y) (vert2.x) (vert2.y) to:out_file --) close out_file ))CreateDialog new
I have got the thing saving a file properly and everything, but I need a way to get a list of all the edges of a spline(with all corners).
can anyone point me in the right direction?
thanks for any help on this.