Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/AController
Description
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.
| Name | AttachToPawn |
| Type | function |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/Controller.h |
| Include Path | #include "GameFramework/Controller.h" |
| Source | /Engine/Source/Runtime/Engine/Private/Controller.cpp |
virtual void AttachToPawn
(
APawn * InPawn
)