Show / Hide Table of Contents

Class Pawn

Pawn is the base class of all actors that can be possessed by players or AI.

Inheritance
System.Object
UObject
Actor
Pawn
Character
DefaultPawn
WheeledVehicle
Inherited Members
Actor.K2_OnBecomeViewTarget
Actor.K2_OnEndViewTarget
Actor.K2_OnReset
Actor.ReceiveActorBeginCursorOver
Actor.ReceiveActorBeginOverlap
Actor.ReceiveActorEndCursorOver
Actor.ReceiveActorEndOverlap
Actor.ReceiveActorOnClicked
Actor.ReceiveActorOnInputTouchBegin
Actor.ReceiveActorOnInputTouchEnd
Actor.ReceiveActorOnInputTouchEnter
Actor.ReceiveActorOnInputTouchLeave
Actor.ReceiveActorOnReleased
Actor.ReceiveAnyDamage
Actor.ReceiveBeginPlay
Actor.ReceiveDestroyed
Actor.ReceiveEndPlay
Actor.ReceiveHit
Actor.ReceivePointDamage
Actor.ReceiveRadialDamage
Actor.ReceiveTick
Actor.UserConstructionScript
Actor.ActorHasTag(Name)
Actor.AddComponent(Name, Boolean, Transform, UObject)
Actor.AddTickPrerequisiteActor(Actor)
Actor.AddTickPrerequisiteComponent(ActorComponent)
Actor.DetachRootComponentFromParent(Boolean)
Actor.DisableInput(PlayerController)
Actor.EnableInput(PlayerController)
Actor.FlushNetDormancy()
Actor.ForceNetUpdate()
Actor.GetActorBounds(Boolean)
Actor.GetActorEnableCollision()
Actor.GetActorEyesViewPoint()
Actor.GetActorForwardVector()
Actor.GetActorLabel()
Actor.GetActorRelativeScale3D()
Actor.GetActorRightVector()
Actor.GetActorScale3D()
Actor.GetActorTickInterval()
Actor.GetActorTimeDilation()
Actor.GetActorUpVector()
Actor.GetAllChildActors(Boolean)
Actor.GetAttachedActors()
Actor.GetAttachParentActor()
Actor.GetAttachParentSocketName()
Actor.GetComponentByClass(SubclassOf<ActorComponent>)
Actor.GetComponentsByClass(SubclassOf<ActorComponent>)
Actor.GetComponentsByTag(SubclassOf<ActorComponent>, Name)
Actor.GetDistanceTo(Actor)
Actor.GetDotProductTo(Actor)
Actor.GetFolderPath(Name)
Actor.GetGameTimeSinceCreation()
Actor.GetHorizontalDistanceTo(Actor)
Actor.GetHorizontalDotProductTo(Actor)
Actor.GetInputAxisKeyValue(Key)
Actor.GetInputAxisValue(Name)
Actor.GetInputVectorAxisValue(Key)
Actor.GetInstigator()
Actor.GetInstigatorController()
Actor.GetLifeSpan()
Actor.GetLocalRole()
Actor.GetOverlappingActors(SubclassOf<Actor>)
Actor.GetOverlappingComponents()
Actor.GetOwner()
Actor.GetParentActor()
Actor.GetParentComponent()
Actor.GetRemoteRole()
Actor.GetSquaredDistanceTo(Actor)
Actor.GetTickableWhenPaused()
Actor.GetTransform()
Actor.GetVelocity()
Actor.GetVerticalDistanceTo(Actor)
Actor.HasAuthority()
Actor.IsActorBeingDestroyed()
Actor.IsActorTickEnabled()
Actor.IsChildActor()
Actor.IsEditable()
Actor.IsHiddenEd()
Actor.IsHiddenEdAtStartup()
Actor.IsOverlappingActor(Actor)
Actor.IsSelectable()
Actor.IsTemporarilyHiddenInEditor(Boolean)
Actor.K2_AddActorLocalOffset(Vector, Boolean, Boolean)
Actor.K2_AddActorLocalRotation(Rotator, Boolean, Boolean)
Actor.K2_AddActorLocalTransform(Transform, Boolean, Boolean)
Actor.K2_AddActorWorldOffset(Vector, Boolean, Boolean)
Actor.K2_AddActorWorldRotation(Rotator, Boolean, Boolean)
Actor.K2_AddActorWorldTransform(Transform, Boolean, Boolean)
Actor.K2_AttachRootComponentTo(SceneComponent, Name, Byte, Boolean)
Actor.K2_AttachRootComponentToActor(Actor, Name, Byte, Boolean)
Actor.K2_AttachToActor(Actor, Name, EAttachmentRule, EAttachmentRule, EAttachmentRule, Boolean)
Actor.K2_AttachToComponent(SceneComponent, Name, EAttachmentRule, EAttachmentRule, EAttachmentRule, Boolean)
Actor.K2_DestroyActor()
Actor.K2_DestroyComponent(ActorComponent)
Actor.K2_DetachFromActor(EDetachmentRule, EDetachmentRule, EDetachmentRule)
Actor.K2_GetActorLocation()
Actor.K2_GetActorRotation()
Actor.K2_GetRootComponent()
Actor.K2_SetActorLocation(Vector, Boolean, Boolean)
Actor.K2_SetActorLocationAndRotation(Vector, Rotator, Boolean, Boolean)
Actor.K2_SetActorRelativeLocation(Vector, Boolean, Boolean)
Actor.K2_SetActorRelativeRotation(Rotator, Boolean, Boolean)
Actor.K2_SetActorRelativeTransform(Transform, Boolean, Boolean)
Actor.K2_SetActorRotation(Rotator, Boolean)
Actor.K2_SetActorTransform(Transform, Boolean, Boolean)
Actor.K2_TeleportTo(Vector, Rotator)
Actor.MakeMIDForMaterial(MaterialInterface)
Actor.MakeNoise(Single, Pawn, Vector, Single, Name)
Actor.PrestreamTextures(Single, Boolean, Int32)
Actor.RemoveTickPrerequisiteActor(Actor)
Actor.RemoveTickPrerequisiteComponent(ActorComponent)
Actor.SetActorEnableCollision(Boolean)
Actor.SetActorHiddenInGame(Boolean)
Actor.SetActorLabel(String, Boolean)
Actor.SetActorRelativeScale3D(Vector)
Actor.SetActorScale3D(Vector)
Actor.SetActorTickEnabled(Boolean)
Actor.SetActorTickInterval(Single)
Actor.SetFolderPath(Name)
Actor.SetIsTemporarilyHiddenInEditor(Boolean)
Actor.SetLifeSpan(Single)
Actor.SetNetDormancy(Byte)
Actor.SetOwner(Actor)
Actor.SetReplicateMovement(Boolean)
Actor.SetReplicates(Boolean)
Actor.SetTickableWhenPaused(Boolean)
Actor.SetTickGroup(Byte)
Actor.SnapRootComponentTo(Actor, Name)
Actor.TearOff()
Actor.WasRecentlyRendered(Single)
Actor.PrimaryActorTick
Actor.bHidden
Actor.bNetTemporary
Actor.bNetStartup
Actor.bOnlyRelevantToOwner
Actor.bAlwaysRelevant
Actor.bReplicateMovement
Actor.bTearOff
Actor.bExchangedRoles
Actor.bNetLoadOnClient
Actor.bNetUseOwnerRelevancy
Actor.bRelevantForNetworkReplays
Actor.bReplayRewindable
Actor.bAllowTickBeforeBeginPlay
Actor.bAutoDestroyWhenFinished
Actor.bBlockInput
Actor.bCanBeDamaged
Actor.bCollideWhenPlacing
Actor.bFindCameraComponentWhenViewTarget
Actor.bGenerateOverlapEventsDuringLevelStreaming
Actor.bIgnoresOriginShifting
Actor.bEnableAutoLODGeneration
Actor.bIsEditorOnlyActor
Actor.bActorSeamlessTraveled
Actor.bReplicates
Actor.bCanBeInCluster
Actor.bAllowReceiveTickEventOnDedicatedServer
Actor.bActorEnableCollision
Actor.bActorIsBeingDestroyed
Actor.RemoteRole
Actor.ReplicatedMovement
Actor.InitialLifeSpan
Actor.CustomTimeDilation
Actor.AttachmentReplication
Actor.Owner
Actor.NetDriverName
Actor.Role
Actor.NetDormancy
Actor.AutoReceiveInput
Actor.InputPriority
Actor.InputComponent
Actor.NetCullDistanceSquared
Actor.NetTag
Actor.NetUpdateFrequency
Actor.MinNetUpdateFrequency
Actor.NetPriority
Actor.Instigator
Actor.Children
Actor.RootComponent
Actor.PivotOffset
Actor.ControllingMatineeActors
Actor.GroupActor
Actor.SpriteScale
Actor.FolderPath
Actor.bHiddenEd
Actor.bIsEditorPreviewActor
Actor.bHiddenEdLayer
Actor.bHiddenEdLevel
Actor.bLockLocation
Actor.bActorLabelEditable
Actor.bEditable
Actor.bListedInSceneOutliner
Actor.bHiddenEdTemporary
Actor.InstanceComponents
Actor.BlueprintCreatedComponents
UObject.TransientPackage
UObject.CastTo<T>(UObject)
UObject.CastTo(UObject, Type)
UObject.RemoveObject(UObject)
UObject.MakeObjectArrayField<T>(NativeArray*)
UObject.NotImplemented<T>()
UObject.Construct()
UObject.GetHashCode()
UObject.GetName()
UObject.ToString()
UObject.Name
UObject._None
UObject.None
UObject.ObjPointer
UObject.LoadObjectFromClass(Class, UObject, String, String, LoadFlags, PackageMap, Boolean)
UObject.LoadClass(Class, UObject, String, String, LoadFlags, PackageMap)
UObject.GetPropertyFor<T>(Name)
UObject.ExecuteUbergraph
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: UE4.Engine
Assembly: UE4DotNet.dll
Syntax
public class Pawn : Actor
Remarks

They are the physical representations of players and creatures in a level.

@see https://docs.unrealengine.com/latest/INT/Gameplay/Framework/Pawn/

Properties

| Improve this Doc View Source

AIControllerClass

Default class to use when pawn is controlled by AI.

Declaration
public SubclassOf<Controller> AIControllerClass { get; set; }
Property Value
Type Description
SubclassOf<Controller>
| Improve this Doc View Source

AutoPossessPlayer

Determines which PlayerController, if any, should automatically possess the pawn when the level starts or when the pawn is spawned.

Declaration
public byte AutoPossessPlayer { get; set; }
Property Value
Type Description
System.Byte
Remarks

@see AutoPossessAI

| Improve this Doc View Source

BaseEyeHeight

Base eye height above collision center.

Declaration
public float BaseEyeHeight { get; set; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

bCanAffectNavigationGeneration

Declaration
public bool bCanAffectNavigationGeneration { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bUseControllerRotationPitch

Declaration
public bool bUseControllerRotationPitch { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bUseControllerRotationRoll

Declaration
public bool bUseControllerRotationRoll { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

bUseControllerRotationYaw

Declaration
public bool bUseControllerRotationYaw { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

ControlInputVector

Accumulated control input vector, stored in world space.

Declaration
public Vector ControlInputVector { get; set; }
Property Value
Type Description
Vector
Remarks

This is the pending input, which is cleared (zeroed) once consumed. @see GetPendingMovementInputVector(), AddMovementInput()

| Improve this Doc View Source

Controller

Controller currently possessing this Actor

Declaration
public Controller Controller { get; set; }
Property Value
Type Description
Controller
| Improve this Doc View Source

DefaultObject

Get UE4 Default Object for this Class

Declaration
public static Pawn DefaultObject { get; }
Property Value
Type Description
Pawn
| Improve this Doc View Source

LastControlInputVector

The last control input vector that was processed by ConsumeMovementInputVector().

Declaration
public Vector LastControlInputVector { get; set; }
Property Value
Type Description
Vector
Remarks

@see GetLastMovementInputVector()

| Improve this Doc View Source

LastHitBy

Controller of the last Actor that caused us damage.

Declaration
public Controller LastHitBy { get; }
Property Value
Type Description
Controller
| Improve this Doc View Source

PlayerState

If Pawn is possessed by a player, points to its Player State. Needed for network play as controllers are not replicated to clients.

Declaration
public PlayerState PlayerState { get; }
Property Value
Type Description
PlayerState
| Improve this Doc View Source

RemoteViewPitch

Replicated so we can see where remote clients are looking.

Declaration
public byte RemoteViewPitch { get; set; }
Property Value
Type Description
System.Byte
| Improve this Doc View Source

StaticClass

Get UE4 Class

Declaration
public static Class StaticClass { get; }
Property Value
Type Description
Class

Methods

| Improve this Doc View Source

AddControllerPitchInput(Single)

Add input (affecting Pitch) to the Controller's ControlRotation, if it is a local PlayerController.

Declaration
public void AddControllerPitchInput(float Val)
Parameters
Type Name Description
System.Single Val
Remarks

This value is multiplied by the PlayerController's InputPitchScale value. @param Val Amount to add to Pitch. This value is multiplied by the PlayerController's InputPitchScale value. @see PlayerController::InputPitchScale

| Improve this Doc View Source

AddControllerRollInput(Single)

Add input (affecting Roll) to the Controller's ControlRotation, if it is a local PlayerController.

Declaration
public void AddControllerRollInput(float Val)
Parameters
Type Name Description
System.Single Val
Remarks

This value is multiplied by the PlayerController's InputRollScale value. @param Val Amount to add to Roll. This value is multiplied by the PlayerController's InputRollScale value. @see PlayerController::InputRollScale

| Improve this Doc View Source

AddControllerYawInput(Single)

Add input (affecting Yaw) to the Controller's ControlRotation, if it is a local PlayerController.

Declaration
public void AddControllerYawInput(float Val)
Parameters
Type Name Description
System.Single Val
Remarks

This value is multiplied by the PlayerController's InputYawScale value. @param Val Amount to add to Yaw. This value is multiplied by the PlayerController's InputYawScale value. @see PlayerController::InputYawScale

| Improve this Doc View Source

AddMovementInput(Vector, Single, Boolean)

Declaration
public void AddMovementInput(Vector WorldDirection, float ScaleValue, bool bForce)
Parameters
Type Name Description
Vector WorldDirection
System.Single ScaleValue
System.Boolean bForce
| Improve this Doc View Source

ConsumeMovementInputVector()

Returns the pending input vector and resets it to zero.

Declaration
public Vector ConsumeMovementInputVector()
Returns
Type Description
Vector
Remarks

This should be used during a movement update (by the Pawn or PawnMovementComponent) to prevent accumulation of control input between frames. Copies the pending input vector to the saved input vector (GetLastMovementInputVector()). @return The pending input vector.

| Improve this Doc View Source

DetachFromControllerPendingDestroy()

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

Declaration
public void DetachFromControllerPendingDestroy()
| Improve this Doc View Source

GetBaseAimRotation()

Return the aim rotation for the Pawn.

Declaration
public Rotator GetBaseAimRotation()
Returns
Type Description
Rotator
Remarks

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.

| Improve this Doc View Source

GetController()

Returns controller for this actor.

Declaration
public Controller GetController()
Returns
Type Description
Controller
| Improve this Doc View Source

GetControlRotation()

Get the rotation of the Controller, often the 'view' rotation of this Pawn.

Declaration
public Rotator GetControlRotation()
Returns
Type Description
Rotator
| Improve this Doc View Source

GetLastMovementInputVector()

Return the last input vector in world space that was processed by ConsumeMovementInputVector(), which is usually done by the Pawn or PawnMovementComponent.

Declaration
public Vector GetLastMovementInputVector()
Returns
Type Description
Vector
Remarks

Any user that needs to know about the input that last affected movement should use this function. For example an animation update would want to use this, since by default the order of updates in a frame is: PlayerController (device input) -> MovementComponent -> Pawn -> Mesh (animations)

@return The last input vector in world space that was processed by ConsumeMovementInputVector(). @see AddMovementInput(), GetPendingMovementInputVector(), ConsumeMovementInputVector()

| Improve this Doc View Source

GetMovementBaseActor(Pawn)

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

Declaration
public static Actor GetMovementBaseActor(Pawn Pawn)
Parameters
Type Name Description
Pawn Pawn
Returns
Type Description
Actor
| Improve this Doc View Source

GetMovementComponent()

Return our PawnMovementComponent, if we have one.

Declaration
public PawnMovementComponent GetMovementComponent()
Returns
Type Description
PawnMovementComponent
| Improve this Doc View Source

GetNavAgentLocation()

Basically retrieved pawn's location on navmesh

Declaration
public Vector GetNavAgentLocation()
Returns
Type Description
Vector
| Improve this Doc View Source

GetPendingMovementInputVector()

Return the pending input vector in world space.

Declaration
public Vector GetPendingMovementInputVector()
Returns
Type Description
Vector
Remarks

This is the most up-to-date value of the input vector, pending ConsumeMovementInputVector() which clears it, Usually only a PawnMovementComponent will want to read this value, or the Pawn itself if it is responsible for movement.

@return The pending input vector in world space. @see AddMovementInput(), GetLastMovementInputVector(), ConsumeMovementInputVector()

| Improve this Doc View Source

IsControlled()

See if this actor is currently being controlled

Declaration
public bool IsControlled()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsLocallyControlled()

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

Declaration
public bool IsLocallyControlled()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsMoveInputIgnored()

Helper to see if move input is ignored. If our controller is a PlayerController, checks Controller->IsMoveInputIgnored().

Declaration
public bool IsMoveInputIgnored()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPlayerControlled()

@return true if controlled by a human player (possessed by a PlayerController).

Declaration
public bool IsPlayerControlled()
Returns
Type Description
System.Boolean
| Improve this Doc View Source

K2_GetMovementInputVector()

(Deprecated) Return the input vector in world space.

Declaration
public Vector K2_GetMovementInputVector()
Returns
Type Description
Vector
| Improve this Doc View Source

LaunchPawn(Vector, Boolean, Boolean)

Launch Pawn

Declaration
public void LaunchPawn(Vector LaunchVelocity, bool bXYOverride, bool bZOverride)
Parameters
Type Name Description
Vector LaunchVelocity
System.Boolean bXYOverride
System.Boolean bZOverride
| Improve this Doc View Source

New(UObject, Name)

Spawn an object of this class

Declaration
public static Pawn New(UObject obj = null, Name name = default(Name))
Parameters
Type Name Description
UObject obj
Name name
Returns
Type Description
Pawn
| Improve this Doc View Source

PawnMakeNoise(Single, Vector, Boolean, Actor)

Inform AIControllers that you've made a noise they might hear (they are sent a HearNoise message if they have bHearNoises==true) The instigator of this sound is the pawn which is used to call MakeNoise.

Declaration
public void PawnMakeNoise(float Loudness, Vector NoiseLocation, bool bUseNoiseMakerLocation, Actor NoiseMaker)
Parameters
Type Name Description
System.Single Loudness
Vector NoiseLocation
System.Boolean bUseNoiseMakerLocation
Actor NoiseMaker
Remarks

@param Loudness - is the relative loudness of this noise (range 0.0 to 1.0). Directly affects the hearing range specified by the AI's HearingThreshold. @param NoiseLocation - Position of noise source. If zero vector, use the actor's location. @param bUseNoiseMakerLocation - If true, use the location of the NoiseMaker rather than NoiseLocation. If false, use NoiseLocation. @param NoiseMaker - Which actor is the source of the noise. Not to be confused with the Noise Instigator, which is responsible for the noise (and is the pawn on which this function is called). If not specified, the pawn instigating the noise will be used as the NoiseMaker

| Improve this Doc View Source

SetCanAffectNavigationGeneration(Boolean, Boolean)

Use SetCanAffectNavigationGeneration to change this value at runtime.

Declaration
public void SetCanAffectNavigationGeneration(bool bNewValue, bool bForceUpdate)
Parameters
Type Name Description
System.Boolean bNewValue
System.Boolean bForceUpdate
Remarks

Note that calling this function at runtime will result in any navigation change only if runtime navigation generation is enabled.

| Improve this Doc View Source

SpawnDefaultController()

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

Declaration
public void SpawnDefaultController()

Events

| Improve this Doc View Source

ReceivePossessed

Event called when the Pawn is possessed by a Controller (normally only occurs on the server/standalone).

Declaration
public event Pawn.ReceivePossessed_delegate ReceivePossessed
Event Type
Type Description
Pawn.ReceivePossessed_delegate
| Improve this Doc View Source

ReceiveUnpossessed

Event called when the Pawn is no longer possessed by a Controller.

Declaration
public event Pawn.ReceiveUnpossessed_delegate ReceiveUnpossessed
Event Type
Type Description
Pawn.ReceiveUnpossessed_delegate

Operators

| Improve this Doc View Source

Implicit(IntPtr to Pawn)

Convert from IntPtr to UObject

Declaration
public static implicit operator Pawn(IntPtr p)
Parameters
Type Name Description
System.IntPtr p
Returns
Type Description
Pawn
  • Improve this Doc
  • View Source
Back to top Generated by DocFX