RealDocs

ACharacter::ApplyAsyncOutput

function Engine Since unknown
#include "GameFramework/Character.h"
Access: public

Description

Writes the results of an async Character Movement simulation back onto the character's authoritative game-thread state. Called at the end of the async tick to synchronize position, velocity, and movement mode.

Caveats & Gotchas

  • This runs on the game thread after the async simulation completes. Any game-thread changes to movement state made between FillAsyncInput and ApplyAsyncOutput will be overwritten — do not mutate movement properties during the async window.
  • Applying an Output produced from stale Input (e.g. from a previous frame) will desync the character's visual position from its physics state, causing jitter that is difficult to diagnose.

Signature

ENGINE_API void ApplyAsyncOutput(const FCharacterAsyncOutput& Output);

Parameters

Name Type Description Default
Output const FCharacterAsyncOutput& The completed async simulation result to apply back to the character's game-thread state.

Return Type

void

Example

Read custom output data before the base class applies it C++
void AMyCharacter::ApplyAsyncOutput(const FCharacterAsyncOutput& Output)
{
	if (const FMyCharacterAsyncOutput* MyOutput = static_cast<const FMyCharacterAsyncOutput*>(&Output))
	{
		bWasAirborneLastAsync = MyOutput->bWasAirborne;
	}
	Super::ApplyAsyncOutput(Output);
}

Version History

Introduced in: unknown

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.