Uh, solved the original problem, but how can I find out what vertices are around a particular polygon?
Oh, and how can I change the colour of a particular triangle?
Oh, and how can I change the colour of a particular triangle?
;selecting polygons ;NOTE: CURRENTLY, YOU CAN ONLY SUPPORT SELECTION OF SINGLE OBJECTS BECAUSE THE PICKED POLYGON IS ;STORED IN A VARIABLE. MAKE THE BELOW VARIABLE AN ARRAY OR DATABANK OR TYPE INSTANCE If MouseDown(1) ;if the user left clicks ;camera click where the mouse is to selec the vertex CameraPick camera,MouseX(),MouseY() ;check if a proper entity is being clicked on. ;Without this, you'll get a memory access violation If Not PickedEntity() = 0 ;save the picked triangle in a variable ;NOTE: THIS IS WHAT YOU WOULD ALTER TO ALLOW FOR MULTIPLE SELECTIONS... tri = PickedTriangle() ;find the picked surface to allow for vertex finding surface = PickedSurface() ;find vertices attached to the selected surface ;NOTE: this section should be moved out of here and in to where it's used ;otherwise you'll have to go through piles of junk with storing this for no reason tri_vertex0 = TriangleVertex(surface,tri,0) tri_vertex1 = TriangleVertex(surface,tri,1) tri_vertex2 = TriangleVertex(surface,tri,2) ;the the vertex colouring. Deosn't work yet... ;FIX THIS YOU IMBECILE, DYLAN VertexColor surface,tri_vertex0,255,0,0,1 VertexColor surface,tri_vertex1,255,0,0,1 VertexColor surface,tri_vertex2,255,0,0,1 EndIf EndIf