Ok I am sure I am missing something basic, but after two days of trying to find it, I thought I would ask before I pull what little hair I have left out.

I am trying to create a morphing system for character creation in my game. I use to know how to do it with the old vec_for_mesh and vec_to_mesh functions but having difficulty with the ent_setvertex and ent_getvertex...

I have two structs each holding the positions of the verts for the base and morph...

Here is my function
Code:
function morph_ent(ENTITY* ent, morID,s)
{
	VECTOR start;
	VECTOR end;

	var percent = s / 100;
	
	var a;
	
	switch(morID)
	{
		case MORPH_HUMAN_MALE_JAW:
			for(a=0;a<humanMaleVerts;a++)
			{
				//Starting Postion
				start.x = morphMaleBase[0].vert[a].x;
				start.y = morphMaleBase[0].vert[a].y;
				start.z = morphMaleBase[0].vert[a].z;
				
				//Ending Postion
				end.x = morphMaleJaw[0].vert[a].x;
				end.y = morphMaleJaw[0].vert[a].y;
				end.z = morphMaleJaw[0].vert[a].z;
				
				CONTACT* c = ent_getvertex(ent,NULL,a);
				c.x = start.x + (percent* (end.x - start.x));
				c.y = start.y + (percent* (end.y - start.y));
				c.z = start.z + (percent* (end.z - start.z));
				ent_setvertex(ent,c,a);
			}
		break;
	}
	
	
	wait(1);
	c_updatehull(ent,0);
}


The idea is when the slider is moved , the verts on the entity should move a percentage the distance of the verts on the morph

I have tested the slider and know the value is being sent...but the entity is not changing at all.....any ideas of where to look or start, I have searched the forums for ideas, and have read the manual ...and still hopelessly lost...any help would be appreciated


John C Leutz II