When playing lots of strategy idle animations for many units at the same time, it can be quite noticeable when units are playing the same animation.
A change somewhere around here can help to alleviate that problem for Unit Pawns:
|
if(AnimTreeController.CanPlayAnimation(PlayAnimParams.AnimName)) |
|
{ |
|
PlayAnimParams.BlendTime = 0.5f; |
|
PlayAnimParams.Looping = true; |
|
PlayAnimParams.PlayRate = class'XComIdleAnimationStateMachine'.static.GetNextIdleRate(); |
|
AnimTreeController.PlayFullBodyDynamicAnim(PlayAnimParams); |
|
} |
|
if(AnimTreeController.CanPlayAnimation(PlayAnimParams.AnimName)) |
|
{ |
|
PlayAnimParams.BlendTime = BlendTime; |
|
PlayAnimParams.Looping = bLooping; |
|
PlayAnimParams.PlayRate = class'XComIdleAnimationStateMachine'.static.GetNextIdleRate(); |
|
Sequence = AnimTreeController.PlayFullBodyDynamicAnim(PlayAnimParams); |
|
} |
Changes in XComAlienPawn for Gremlins etc. would be nice to have too.
Code pointer: SkeletalMeshComponent (via self.Mesh) has a function FindAnimSequence(Name AnimSeqName) that returns an AnimSequence with a property SequenceLength. Randomize between [0, SequenceLength] and set PlayAnimParams.StartOffsetTime.
Potential pitfall: We may end up skipping crucial Notifies. Restrict the random roll to [0, FirstNotifyTime]?
When playing lots of strategy idle animations for many units at the same time, it can be quite noticeable when units are playing the same animation.
A change somewhere around here can help to alleviate that problem for Unit Pawns:
X2WOTCCommunityHighlander/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComHumanPawn.uc
Lines 2497 to 2503 in 50d24a1
X2WOTCCommunityHighlander/X2WOTCCommunityHighlander/Src/XComGame/Classes/XComUnitPawn.uc
Lines 3309 to 3315 in 50d24a1
Changes in XComAlienPawn for Gremlins etc. would be nice to have too.
Code pointer:
SkeletalMeshComponent(viaself.Mesh) has a functionFindAnimSequence(Name AnimSeqName)that returns anAnimSequencewith a propertySequenceLength. Randomize between[0, SequenceLength]and setPlayAnimParams.StartOffsetTime.Potential pitfall: We may end up skipping crucial Notifies. Restrict the random roll to
[0, FirstNotifyTime]?