In ConvertQueryImpactHitImp, MaterialIndex is looked up from InternalFaceIndex, but FTriangleMeshImplicitObject:: MaterialIndices is an array by ExternalFaceIndex, so it returns incorrect material index.
Here is a workaround
uint16 FTriangleMeshImplicitObject::GetMaterialIndex(uint32 HintIndex) const { #if 0 if (MaterialIndices.IsValidIndex(HintIndex)) { return MaterialIndices[HintIndex]; } #else int32 ExternalFaceIndex = GetExternalFaceIndexFromInternal(HintIndex/*InternalFaceIndex*/); if (ExternalFaceIndex > -1 && MaterialIndices.IsValidIndex(ExternalFaceIndex)) { return MaterialIndices[ExternalFaceIndex]; } #endif // 0 should always be the default material for a shape return 0; }
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-172946 in the post.
6 |
Component | UE - Simulation - Physics |
---|---|
Affects Versions | 5.1 |
Target Fix | 5.1.1 |
Created | Dec 15, 2022 |
---|---|
Resolved | Jan 4, 2023 |
Updated | Jan 9, 2023 |