vault backup: 2024-06-11 17:03:30
This commit is contained in:
parent
a68c2971bd
commit
9dfa4bb3c2
@ -23,6 +23,49 @@
|
||||
7. [x] ~~TsSimpleLevelManager.ts~~
|
||||
1. SwitchLiveArea()中调用,只调用了Idol.BeiLa,属于容错语句。
|
||||
8. ~~CameraDebug.cpp ~~(这个不需求)
|
||||
|
||||
## MotionProcess可疑的地方
|
||||
```ts
|
||||
// #region 角色创建
|
||||
static ServerCreateIdolControllerAtLiveArea(World: UE.World, IdolRootTag: UE.GameplayTag, variance:number, LiveAreaGIUD: UE.Guid): TsIdolControllerActor {
|
||||
let bpClass = UE.Class.Load(this.BluePrintPath)
|
||||
if (bpClass == null) {
|
||||
console.error("IdolController BluePrint is null")
|
||||
return null;
|
||||
}
|
||||
|
||||
let levelController = TsLevelAreaManager.Get(World)
|
||||
if (levelController) {
|
||||
let liveArea = levelController.GetLiveArea(LiveAreaGIUD)
|
||||
if (liveArea == null) {
|
||||
console.error("Cannot create idol because of invalid livearea guid!!")
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
let spawnTransform = new UE.Transform()
|
||||
let controller = UE.GameplayStatics.BeginDeferredActorSpawnFromClass(World, bpClass, spawnTransform) as TsIdolControllerActor
|
||||
controller.LiveAreaGIUD = LiveAreaGIUD
|
||||
if (variance < 0) {
|
||||
variance = this.GetVarianceNumber(World, IdolRootTag)
|
||||
}
|
||||
controller.Identity = new UE.IdolIdentity(IdolRootTag, variance)
|
||||
controller.visibility = true
|
||||
var mgr = Utils.GetPropManager(controller.GetWorld())
|
||||
controller.Index = mgr.CharacterIndex
|
||||
mgr.CharacterIndex += 1
|
||||
UE.GameplayStatics.FinishSpawningActor(controller, spawnTransform)
|
||||
controller.SetTransformToLiveArea()
|
||||
controller.PropComp.ServerLoadPropPreset(0)
|
||||
DirectorEventSystem.Emit(World, DirectorEvent.CharacterGeneratedServer, controller, controller.Identity.RootTag.TagName)
|
||||
|
||||
console.log("Successfully load " + controller.GetIdentityName())
|
||||
return controller
|
||||
}
|
||||
```
|
||||
|
||||
`DirectorEventSystem.Emit(World, DirectorEvent.CharacterGeneratedServer, controller, controller.Identity.RootTag.TagName)`
|
||||
|
||||
# AVCharacter
|
||||
主要实现了`virtual void OnRep_AttachmentReplication() override;`,声明了若干BlueprintNativeEvent:
|
||||
- bool CanSyncRelativeTransform();
|
||||
|
Loading…
x
Reference in New Issue
Block a user