Thanks repeatuntil :)
I have try this function to convert a mesh into collider
the TOKRB_SetCollisionID MEsh,TOK_StaticMeshCollisionID is correct ?
I have try this function to convert a mesh into collider
Function TOK_MakeTokCollider(mesh) Local offsetv Local offsett Local scount Local vertices Local triangles Local surface Local tric Local cvt scount=CountSurfaces(mesh) For ind=1 To scount surface=GetSurface(mesh,ind) ttltris=ttltris+CountTriangles(surface) ttlvert=ttlvert+CountVertices(surface) Next vertices=CreateBank(16*ttlvert) triangles=CreateBank(24*ttltris) offsetv=0 offsett=0 For ind=1 To scount surface = GetSurface(mesh,ind) ctr=CountTriangles(surface) tric=tric+cvt cvt=CountVertices(surface) ;fill bank with vertices For v=0 To cvt-1 PokeFloat vertices,offsetv,VertexX#(surface,v) PokeFloat vertices,offsetv+4,VertexY#(surface,v) PokeFloat vertices,offsetv+8,VertexZ#(surface,v) PokeFloat vertices,offsetv+12,0.0 offsetv=offsetv+16 Next ;fill bank with triangles For v=0 To ctr-1 PokeInt triangles,offsett,tric+TriangleVertex(surface,v,0) PokeInt triangles,offsett+4,tric+TriangleVertex(surface,v,1) PokeInt triangles,offsett+8,tric+TriangleVertex(surface,v,2) PokeInt triangles,offsett+12,2 ; Material ID PokeInt triangles,offsett+16,0 PokeInt triangles,offsett+20,0 offsett=offsett+24 Next Next TOKSIM_SetStaticMesh vertices,ttlvert,triangles,ttltris TOKRB_SetCollisionID MEsh,TOK_StaticMeshCollisionID ; On libere les banques FreeBank vertices FreeBank triangles End Function
the TOKRB_SetCollisionID MEsh,TOK_StaticMeshCollisionID is correct ?