AController::AttachToPawn

Physically attach the Controller to the specified Pawn, so that our position reflects theirs.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/GameFramework/Controller.h

Include

#include "GameFramework/Controller.h"

Source

/Engine/Source/Runtime/Engine/Private/Controller.cpp

Syntax

virtual void AttachToPawn
(
    APawn * InPawn
)

Remarks

Physically attach the Controller to the specified Pawn, so that our position reflects theirs. The attachment persists during possession of the pawn. The Controller's rotation continues to match the ControlRotation. Attempting to attach to a nullptr Pawn will call DetachFromPawn() instead.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss