Hey community,

I'm trying to get the Vertex numbers of the face a user clicks on. I have tried to get them with ent_buffers, here is my code:

Php Code:
if(c_trace (from,to, SCAN_TEXTURE|USE_POLYGON)>0)
{
				CONTACT* c = ent_getvertex(hit.entity, NULL, hit.vertex); 
		short* trianlgeBuffer;
		ent_buffers(hit.entity,0,0,NULL,&trianlgeBuffer,NULL);
		short sv1=trianlgeBuffer[hit.triangle*3];
		short sv2=trianlgeBuffer[hit.triangle*3+1];
		short sv3=trianlgeBuffer[hit.triangle*3+2];
		printf("clicked:%i / triangle vertexes:%i ; %i ; %i",(short)(int)c.vertex,sv1,sv2,sv3);
		if(hit.vertex==sv1||hit.vertex==sv2||hit.vertex==sv3) printf("This should always pop up :S");		   
} 




However the vertex numbers of the triangle are not the same as the vertex number of hit, but they are in the same range confused

regards, Alain smile

P.S: is here a welcome thread to present myself?