Navigation
API > API/Runtime > API/Runtime/Engine
DefaultPawn implements a simple Pawn with spherical collision and built-in flying movement.
| Name | ADefaultPawn |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/GameFramework/DefaultPawn.h |
| Include Path | #include "GameFramework/DefaultPawn.h" |
Syntax
UCLASS (Config=Game, Blueprintable, BlueprintType, MinimalAPI)
class ADefaultPawn : public APawn
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → APawn → ADefaultPawn
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ADefaultPawn
(
const FObjectInitializer& ObjectInitializer |
GameFramework/DefaultPawn.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| CollisionComponentName | FName | Name of the CollisionComponent. | GameFramework/DefaultPawn.h |
| MeshComponentName | FName | Name of the MeshComponent. | GameFramework/DefaultPawn.h |
| MovementComponentName | FName | Name of the MovementComponent. | GameFramework/DefaultPawn.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAddDefaultMovementBindings | uint32 | If true, adds default input bindings for movement and camera look. | GameFramework/DefaultPawn.h |
|
| BaseLookUpRate | float | Base lookup rate, in deg/sec. Other scaling may affect final lookup rate. | GameFramework/DefaultPawn.h |
|
| BaseTurnRate | float | Base turn rate, in deg/sec. Other scaling may affect final turn rate. | GameFramework/DefaultPawn.h |
|
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CollisionComponent | TObjectPtr< USphereComponent > | DefaultPawn collision component | GameFramework/DefaultPawn.h |
|
| MeshComponent | TObjectPtr< UStaticMeshComponent > | The mesh associated with this Pawn. | GameFramework/DefaultPawn.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USphereComponent * GetCollisionComponent() |
Returns CollisionComponent subobject | GameFramework/DefaultPawn.h | |
UStaticMeshComponent * GetMeshComponent() |
Returns MeshComponent subobject | GameFramework/DefaultPawn.h | |
virtual void LookUpAtRate
(
float Rate |
Called via input to look up at a given rate (or down if Rate is negative). | GameFramework/DefaultPawn.h |
|
virtual void MoveForward
(
float Val |
Input callback to move forward in local space (or backward if Val is negative). | GameFramework/DefaultPawn.h |
|
virtual void MoveRight
(
float Val |
Input callback to strafe right in local space (or left if Val is negative). | GameFramework/DefaultPawn.h |
|
virtual void MoveUp_World
(
float Val |
Input callback to move up in world space (or down if Val is negative). | GameFramework/DefaultPawn.h |
|
virtual void TurnAtRate
(
float Rate |
Called via input to turn at a given rate. | GameFramework/DefaultPawn.h |
|
Overridden from APawn
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UPawnMovementComponent * GetMovementComponent () |
Return our PawnMovementComponent, if we have one. | GameFramework/DefaultPawn.h | |
virtual void SetupPlayerInputComponent
(
UInputComponent* PlayerInputComponent |
Allows a Pawn to set up custom input bindings. | GameFramework/DefaultPawn.h | |
virtual void UpdateNavigationRelevance() |
Update all components relevant for navigation generators to match bCanAffectNavigationGeneration flag | GameFramework/DefaultPawn.h |