From 8e61710b3cb6d17777ec80fae3f1915f59a6e88e Mon Sep 17 00:00:00 2001 From: BlueRose <378100977@qq.com> Date: Tue, 28 May 2024 15:12:43 +0800 Subject: [PATCH] vault backup: 2024-05-28 15:12:43 --- .../DAWA/ASoul/导播台笔记/RuntimeEditor.md | 28 +++++++++++++++++-- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/02-Note/DAWA/ASoul/导播台笔记/RuntimeEditor.md b/02-Note/DAWA/ASoul/导播台笔记/RuntimeEditor.md index dd4cb9d..a692deb 100644 --- a/02-Note/DAWA/ASoul/导播台笔记/RuntimeEditor.md +++ b/02-Note/DAWA/ASoul/导播台笔记/RuntimeEditor.md @@ -80,13 +80,35 @@ Run(CMDStr: $Ref) : void{ } ``` - - ## SetDirectorModeStr 位于`ULiveDirectorGameInstance` TsLiveDirectorGameInstance.ts +## 其他有用函数 +```ts +static _HipsTranslation(gameInstance: TsLiveDirectorGameInstance, value:number): void { + var actors = UE.NewArray(UE.Actor) + UE.GameplayStatics.GetAllActorsOfClass(gameInstance, TsIdolActor.StaticClass(), $ref(actors)) + for (var i = 0; i < actors.Num(); i++) { + var model = actors.GetRef(i) as TsIdolActor + if (model) { + var anim = model.Mesh.GetAnimInstance() as UE.IdolAnimInstance + let fullbodyNode = Reflect.get(anim, 'AnimGraphNode_Fullbody') as UE.AnimNode_FullBody + if (fullbodyNode) { + //fullbodyNode.bUseHipsTranslation = value > 0 + } + anim.SetRootMotionMode(value > 0 ? UE.ERootMotionMode.NoRootMotionExtraction : UE.ERootMotionMode.RootMotionFromEverything) + model.RootComponent.K2_SetRelativeLocationAndRotation(new UE.Vector(0, 0, model.CapsuleComponent.CapsuleHalfHeight), new UE.Rotator(0, 0, 0), false, null, false) + console.warn("use hips translation " + (value > 0)) + } + } +} +``` # RuntimeEditor插件 # 三级导播台 -run 3 \ No newline at end of file +run 3 + +# MotionProcess +资产位于:UIAssets/Character/WBP_CharacterItem +UI逻辑位于:TsCharacterItem.ts的TsCharacterItem