Browse Source

[ue4] Closes #2032, set bGenerateMirroredCollision when SpineSkeletonRenderer has negative scale.

badlogic 3 năm trước cách đây
mục cha
commit
e6688e2514

+ 1 - 0
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/Private/SpineSkeletonRendererComponent.cpp

@@ -165,6 +165,7 @@ void USpineSkeletonRendererComponent::Flush(int &Idx, TArray<FVector> &Vertices,
 		}
 	}
 	
+	GetBodySetup()->bGenerateMirroredCollision = GetComponentScale().X < 0 || GetComponentScale().Y < 0 || GetComponentScale().Z < 0;
 	CreateMeshSection(Idx, Vertices, Indices, Normals, Uvs, Colors, TArray<FProcMeshTangent>(), bShouldCreateCollision);
 
 	Vertices.SetNum(0);