Hi,
我做了些实验,找到一些思路,不过不适合提交进引擎,你们可以根据需要自己改一下:
- 把UPrimitiveComponent::GetRenderMatrix函数改成下面这样,可以在PrimitiveComponent上面加一个property,用于判断是否走这个分支。
FMatrix UPrimitiveComponent::GetRenderMatrix() const { if (1) { return FRotationMatrix::Make(GetComponentTransform().GetRotation()) * FScaleMatrix::Make(GetComponentTransform().GetScale3D()) * FTranslationMatrix::Make(GetComponentTransform().GetTranslation()); } else { return GetComponentTransform().ToMatrixWithScale(); } }
1. 把DataDrivenPlatformInfo.ini里所有的bSupportsSceneDataCompressedTransforms都设置成false,因为这个功能跟GPUScene的压缩不兼容。