Navigation
Unreal Engine C++ API Reference > Runtime > Engine > GameFramework > AController
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 |
virtual void AttachToPawn
&40;
APawn &42; InPawn
&41;
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.