尝试给位置加offset,没完全成功

This commit is contained in:
2025-11-13 23:58:18 +08:00
parent 9d92b65af6
commit 1b97830536
4 changed files with 9 additions and 1 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
+9 -1
View File
@@ -119,7 +119,15 @@ UTextureRenderTarget2D* AIronBlock::CreateDeformRT(const FString& RTName, int32
RenderTarget->bAutoGenerateMips = false;
RenderTarget->AddressX = TA_Clamp;
RenderTarget->AddressY = TA_Clamp;
// 定义你要清除的颜色 (R=0.5, G=0.5, B=0.5)
const FLinearColor ClearColor(128.0f, 128.0f, 128.0f, 256.0f);
// 调用 Kismet Rendering Library 的清除函数
UKismetRenderingLibrary::ClearRenderTarget2D(
this->GetWorld(), // 通常传入你的 World 或 Actor
RenderTarget,
ClearColor
);
// 立即创建RHI资源
//RenderTarget->UpdateResource();
}