ACharacter::Restart
#include "GameFramework/Character.h"
Access: public
Specifiers: virtualoverride
Description
Called by the Controller when the pawn is restarted after being possessed. ACharacter uses this to re-enable tick and reset the jump state so the character is ready to receive input.
Caveats & Gotchas
- • Restart is called by AController::Restart() after possession is established — do not call it manually as a substitute for re-possessing the pawn; use `Controller->Possess(Pawn)` instead.
- • If you call Super::Restart() and the character was previously turned off via TurnOff(), it will re-enable actor tick; make sure any other frozen state you set in TurnOff() is also cleared here.
Signature
ENGINE_API virtual void Restart() override; Return Type
void Example
Reset custom state when pawn is restarted C++
void AMyCharacter::Restart()
{
Super::Restart();
// Clear any death state so the character is fully operational again
bIsDead = false;
GetMesh()->SetSimulatePhysics(false);
} See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?