VECTOR normal1,normal2,normal_new; CONTACT* c1=ent_getvertex(ent1,NULL,vertexID1); vec_set(normal1,vector(c1.nx,c1.ny,c1.nz)); CONTACT* c2=ent_getvertex(ent2,NULL,vertexID2); vec_set(normal2,vector(c2.nx,c2.ny,c2.nz)); vec_lerp(normal_new,normal1,normal2,0.5); vec_normalize(normal_new,1); CONTACT* c1=ent_getvertex(ent1,NULL,vertexID1); c1.v.nx=normal_new.x; c1.v.ny=normal_new.z; c1.v.nz=normal_new.y; ent_setvertex(ent1,c1,vertexID1); CONTACT* c2=ent_getvertex(ent2,NULL,vertexID2); c2.v.nx=normal_new.x; c2.v.ny=normal_new.z; c2.v.nz=normal_new.y; ent_setvertex(ent2,c2,vertexID2);
Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy
oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de