ADefaultPawn

DefaultPawn implements a simple Pawn with spherical collision and built-in flying movement.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

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

Include

#include "GameFramework/DefaultPawn.h"

Syntax

class ADefaultPawn : public APawn

Remarks

DefaultPawn implements a simple Pawn with spherical collision and built-in flying movement.

Variables

Name Description

Public variable

uint32: 1

 

bAddDefaultMovementBindings

If true, adds default input bindings for movement and camera look.

Public variable

float

 

BaseLookUpRate

Base lookup rate, in deg/sec. Other scaling may affect final lookup rate.

Public variable

float

 

BaseTurnRate

Base turn rate, in deg/sec. Other scaling may affect final turn rate.

Protected variable

UPawnMovementCo...

 

MovementComponent

DefaultPawn movement component

Constructors

Name Description

Public function

ADefaultPawn

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

USphereCompo...

 

GetCollisionComponent()

Returns CollisionComponent subobject

Public function Const

UStaticMeshC...

 

GetMeshComponent()

Returns MeshComponent subobject

Public function Virtual

void

 

LookUpAtRate

(
    float Rate
)

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

Public function Virtual

void

 

MoveForward

(
    float Val
)

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

Public function Virtual

void

 

MoveRight

(
    float Val
)

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

Public function Virtual

void

 

MoveUp_World

(
    float Val
)

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

Public function Virtual

void

 

TurnAtRate

(
    float Rate
)

Called via input to turn at a given rate.

Overridden from APawn

Name Description

Public function Virtual Const

UPawnMovemen...

 

GetMovementComponent()

Return our PawnMovementComponent, if we have one.

Public function Virtual

void

 

SetupPlayerInputComponent

(
    UInputComponent* PlayerInputCo...
)

Allows a Pawn to set up custom input bindings.

Public function Virtual

void

 

UpdateNavigationRelevance()

Update all components relevant for navigation generators to match bCanAffectNavigationGeneration flag

Constants

Name

Description

CollisionComponentName

Name of the CollisionComponent.

MeshComponentName

Name of the MeshComponent.

MovementComponentName

Name of the MovementComponent.

See Also

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