diff --git a/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp b/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp index 21fce4bb..50839b5a 100644 --- a/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp +++ b/Source/glTFRuntime/Private/glTFRuntimeParserSkeletalMeshes.cpp @@ -458,20 +458,12 @@ USkeletalMesh* FglTFRuntimeParser::CreateSkeletalMeshFromLODs(TSharedRef Points; + int32 Base = 0; for (int32 PrimitiveIndex = 0; PrimitiveIndex < LOD.Primitives.Num(); PrimitiveIndex++) { FglTFRuntimePrimitive& Primitive = LOD.Primitives[PrimitiveIndex]; - int32 Base = Points.Num(); - for (FVector& Point : Primitive.Positions) - { - SkeletalMeshContext->BoundingBox += Point * SkeletalMeshContext->SkeletalMeshConfig.BoundsScale; - Points.Add(Point); - } - new(&LodRenderData->RenderSections[PrimitiveIndex]) FSkelMeshRenderSection(); FSkelMeshRenderSection& MeshSection = LodRenderData->RenderSections[PrimitiveIndex]; @@ -483,6 +475,8 @@ USkeletalMesh* FglTFRuntimeParser::CreateSkeletalMeshFromLODs(TSharedRef> OverlappingVertices; MeshSection.DuplicatedVerticesBuffer.Init(MeshSection.NumVertices, OverlappingVertices); @@ -491,6 +485,7 @@ USkeletalMesh* FglTFRuntimeParser::CreateSkeletalMeshFromLODs(TSharedRefBoundingBox += ModelVertex.Position * SkeletalMeshContext->SkeletalMeshConfig.BoundsScale; ModelVertex.TangentX = FVector::ZeroVector; ModelVertex.TangentZ = FVector::ZeroVector; if (Index < Primitive.Normals.Num())