VR Expansion Plugin

Hello !

Long time user here since 2018, I currently run into some blocks on the thoughts about the performance in my VR game. Hope you can share some ideas.

My game is a FPS VR Shooter, currently Im trying to save movement costs on player characters.

Character hierarchy is:
SimpleVRCharacter
- Capsule
- Camera
- ParentRelative
- BodyMesh
- Holsters
- WeaponsHolstered
- MotionControllerComp
- WeaponHeld

From profiling, lots of movement cost are involved with repeatedly moving things deep in the hierarchy each frame. For example, every frame, CharacterMovement , MotionController , Weapon it self all move the weapon’s capsule collision because of the hierarchy(UpdateChildransform and UpdateOverlaps). Tick order is also CharacterMovement->MotionController->Weapon.

I also noticed you can set RelativeLocation and RelativeRotation on USceneComponent without incurring an update on movement, that value should come in effect next time the parent updates movement, in a deferred manner.
So my idea is to reverse the tick order, so that weapon set its “desired” relative transform deferred, and then motion controller set its relative transform defered, then character movement finally updates the movement in the EndScoped Movement update. In case, the weapon, the motion controller only update the movement once each frame.

Does sounds like a good plan?
Also, in general, is it ok to tick motion controller before character movement? I see that unreal tends to add parent as the attached component’s Prereq Tick comp. But is it fair to say, as long as children only cares about Relative Transforms, they dont really need to know their parents’ world transform?

Thanks,