Skip to content

Commit 2102489

Browse files
authored
Fix Capsule mesh generation (#475)
Signed-off-by: Addisu Z. Taddese <[email protected]>
1 parent ade3fa2 commit 2102489

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

graphics/src/MeshManager.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -975,11 +975,10 @@ void MeshManager::CreateCapsule(const std::string &_name,
975975
x = -sin(u * (IGN_PI * 2.0));
976976
y = cos(u * (IGN_PI * 2.0));
977977

978-
math::Vector3d p(
979-
x * _radius * w, y, -z * _radius * w);
978+
math::Vector3d p(x * _radius * w, y * _radius * w, z);
980979
// Compute vertex
981980
subMesh.AddVertex(math::Vector3d(
982-
p + math::Vector3d(0.0, 0.5 * _length, 0.0)));
981+
p + math::Vector3d(0.0, 0.0, 0.5 * _length)));
983982
subMesh.AddTexCoord({u, v * oneThird});
984983
subMesh.AddNormal(p.Normalize());
985984

0 commit comments

Comments
 (0)