Pawn

Pawn

Choose your operating system:

Windows

macOS

Linux

On this page

Actions

Detach from Controller Pending Destroy

Call this function to detach safely pawn from its controller, knowing that we will be destroyed soon.

Target is Pawn

Get Base Aim Rotation

Return the aim rotation for the Pawn. If we have a controller, by default we aim at the player's 'eyes' direction that is by default the Pawn rotation for AI, and camera (crosshair) rotation for human players.

Target is Pawn

Get Control Rotation

Get the control rotation. This is the full aim rotation, which may be different than a camera orientation (for example in a third person view), and may differ from the rotation of the controlled Pawn (which may choose not to visually pitch or roll, for example).

Target is Controller

Get Controlled Pawn

Return the Pawn that is currently 'controlled' by this PlayerController

Target is Controller

Get Controller

Returns controller for this actor.

Target is Pawn

Get Desired Rotation

Get the desired pawn target rotation

Target is Controller

Get Focal Location

Returns the location the PlayerController is focused on. If there is a possessed Pawn, returns the Pawn's location. If there is a spectator Pawn, returns that Pawn's location. Otherwise, returns the PlayerController's spawn location (usually the last known Pawn location after it has died).

Target is Player Controller

Get Local Viewing Player Controller

Returns local Player Controller viewing this pawn, whether it is controlling or spectating

Target is Pawn

Get Movement Base Actor

Gets the owning actor of the Movement Base Component on which the pawn is standing.

Target is Pawn

Get Movement Component

Return our PawnMovementComponent, if we have one.

Target is Pawn

Get Nav Agent Location

Basically retrieved pawn's location on navmesh

Target is Pawn

Get Player View Point

Returns Player's Point of View For the AI this means the Pawn's 'Eyes' ViewPoint For a Human player, this means the Camera's ViewPoint

@output out_Location, view location of player @output out_rotation, view rotation of player

Target is Controller

Get Spectator Pawn

Get the Pawn used when spectating. nullptr when not spectating.

Target is Player Controller

Get View Target

Get the actor the controller is looking at

Target is Controller

Is Bot Controlled

Returns true if controlled by a bot.

Target is Pawn

Is Controlled

Is Controlled

Target is Pawn

Is Local Controller

Returns whether this Controller is a local controller.

Target is Controller

Is Local Player Controller

Returns whether this Controller is a locally controlled PlayerController.

Target is Controller

Is Locally Controlled

Returns true if controlled by a local (not network) Controller.

Target is Pawn

Is Locally Viewed

Is this pawn the ViewTarget of a local PlayerController? Helpful for determining whether the pawn is visible/critical for any VFX. NOTE: Technically there may be some cases where locally controlled pawns return false for this, such as if you are using a remote camera view of some sort. But generally it will be true for locally controlled pawns, and it will always be true for pawns that are being spectated in-game or in Replays.

Target is Pawn

Is Pawn Controlled

Check if this actor is currently being controlled at all (the actor has a valid Controller, which will be false for remote clients)

Target is Pawn

Is Player Controlled

Returns true if controlled by a human player (possessed by a PlayerController). This returns true for players controlled by remote clients

Target is Pawn

Is Player Controller

Returns whether this Controller is a PlayerController.

Target is Controller

Look Up at Rate

Called via input to look up at a given rate (or down if Rate is negative).

Target is Default Pawn

Move Forward

Input callback to move forward in local space (or backward if Val is negative).

Target is Default Pawn

Move Right

Input callback to strafe right in local space (or left if Val is negative).

Target is Default Pawn

Move Up World

Input callback to move up in world space (or down if Val is negative).

Target is Default Pawn

On Possessed Pawn Changed

On Possessed Pawn Changed: Called on both authorities and clients when the possessed pawn changes (either OldPawn or NewPawn might be nullptr)

Possess

Handles attaching this controller to the specified pawn. Only runs on the network authority (where HasAuthority() returns true). Derived native classes can override OnPossess to filter the specified pawn. When possessed pawn changed, blueprint class gets notified by ReceivePossess and OnNewPawn delegate is broadcasted.

Target is Controller

Receive Controller Changed Delegate

Receive Controller Changed Delegate: Event called after a pawn's controller has changed, on the server and owning client. This will happen at the same time as the delegate on GameInstance

Receive Restarted Delegate

Receive Restarted Delegate: Event called after a pawn has been restarted, usually by a possession change. This is called on the server for all pawns and the owning client for player pawns

Set Control Rotation

Set the control rotation.

Target is Controller

Set Initial Location and Rotation

Set the initial location and rotation of the controller, as well as the control rotation. Typically used when the controller is first created.

Target is Controller

Spawn Default Controller

Spawn default controller for this Pawn, and get possessed by it.

Target is Pawn

Turn at Rate

Called via input to turn at a given rate.

Target is Default Pawn

Un Possess

Called to unpossess our pawn for any reason that is not the pawn being destroyed (destruction handled by PawnDestroyed()).

Target is Controller

Update Stereo Atlas

Update Stereo Atlas

Target is Stereo Capture Pawn

Categories

Components

Components

Input

These are nodes that provide input from various sources (keyboard, mouse, gamepad etc.)