Animations
Gameplay Debugger
The Gameplay Debugger has a custom category for Gunsmith with an animation subcategory that when enabled, will compare the animation state between the client and server for each frame. When these states get out of sync, the tracked rollback components will be drawn along with a comprehensive comparison of animation tree node states which should hopefully give more insight into where the desync might have happened.
All nodes in white are the same on both server and client. The green text shows the servers representation and the red text is the clients. This view will hide all matching nodes by default which can be toggled with the Shift+L hotkey.
Tolerances that must be triggered for this text to show can be modified with the following commands:
Gunsmith.Debug.DebugLocationTolerance- How far apart locations of colliders need to be before triggering the debug tool. Default: 5.0f.Gunsmith.Debug.DebugRotationTolerance- How far apart, in radians, rotation of colliders need to be before triggering the debug tool. Default: 0.1f.Gunsmith.Debug.DebugScaleTolerance- How far apart scale of colliders need to be before triggering the debug tool. Default: 0.001f.Gunsmith.Debug.TimeBetweenAnimationDesyncDraw- Animation desync reports are disabled for X seconds after the last to prevent writing to the screen too often and missing data. Default: 2.0f.
Enabling on Custom Pawns
To enable tracking of this extra animation data, a special debug-only rollback history must be added to your rollback component. This allows the server to send this debug information to the client when the category is active.
void ACustomCharacter::BeginPlay()
{
if (UGSAnimationDebugHistory* DebugHistory = RollbackComponent->RegisterDebugHistory<UGSAnimationDebugHistory, GSAnimationDebugHistoryFrame>())
{
DebugHistory->SkeletalMeshComponent = GetMesh();
}
}Visual Logger
The Visual logger can be used to compare the differences between the client and server every frame. The following console commands enable additional debugging modes to help:
Gunsmith.Debug.DisplayServerLocationOnTick 1- Displays the full complex collider setup for each GSCharacter on the server on tick.Gunsmith.Debug.DisplaySimulatedClientsLocationOnTick 1- Displays the full complex collider setup for each GSCharacter on the client on tick. When using interpolated mode, this will also work out the value at the non-interpolated location so that full frames can be compared with the server.
