diff --git a/src/easymesh/easymesh.cpp b/src/easymesh/easymesh.cpp index 9ce2b894..08b2cdc7 100644 --- a/src/easymesh/easymesh.cpp +++ b/src/easymesh/easymesh.cpp @@ -367,10 +367,10 @@ void EasyMesh::AppendCapsule(int ndivisions, float h, float r) Array vertices; /* Fill in the icosahedron vertices, rotating them so that there - * is a vertex at [0 0 1] and [0 0 -1] after normalisation. */ + * is a vertex at [0 1 0] and [0 -1 0] after normalisation. */ float phi = 0.5f + 0.5f * sqrt(5.f); mat3 mat = mat3::rotate(asin(1.f / sqrt(2.f + phi)) * (180.f / M_PI), - vec3(1.f, 0.f, 0.f)); + vec3(0.f, 0.f, 1.f)); for (int i = 0; i < 4; i++) { float x = (i & 1) ? 0.5f : -0.5f; @@ -418,7 +418,7 @@ void EasyMesh::AppendCapsule(int ndivisions, float h, float r) if (h > 0.f) { for (int k = 0; k < 4; k++) - p[k].z += (p[k].z > 0.f) ? 0.5f * h : -0.5f * h; + p[k].y += (p[k].y > 0.f) ? 0.5f * h : -0.5f * h; } /* Add zero, one or two triangles */ diff --git a/test/PhysicObject.h b/test/PhysicObject.h index 94901d90..45cd32ff 100644 --- a/test/PhysicObject.h +++ b/test/PhysicObject.h @@ -74,12 +74,12 @@ public: int CapsLimit = MeshRand.Count(); - MeshRand << "[sc#add scb#add asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]"; - MeshRand << "[sc#dad scb#dad asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]"; - MeshRand << "[sc#dda scb#dda asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]"; - MeshRand << "[sc#daa scb#daa asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]"; - MeshRand << "[sc#ada scb#ada asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]"; - MeshRand << "[sc#aad scb#aad asph6 1 1 1 ty-1 my ac16 2 1 1 0 0]"; + MeshRand << "[sc#add scb#add acap3 2 1]"; + MeshRand << "[sc#dad scb#dad acap3 2 1]"; + MeshRand << "[sc#dda scb#dda acap3 2 1]"; + MeshRand << "[sc#daa scb#daa acap3 2 1]"; + MeshRand << "[sc#ada scb#ada acap3 2 1]"; + MeshRand << "[sc#aad scb#aad acap3 2 1]"; int RandValue = (int)(lol::RandF() * (MeshRand.Count() - 1));