UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
PawnMovementComponent.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
7#pragma once
8
9#include "CoreMinimal.h"
12#include "PawnMovementComponent.generated.h"
13
14class APawn;
15class UPrimitiveComponent;
16
20UENUM()
35
41UCLASS(abstract, MinimalAPI)
43{
45
46public:
47
49 ENGINE_API virtual void SetUpdatedComponent(USceneComponent* NewUpdatedComponent) override;
50
59 UFUNCTION(BlueprintCallable, Category="Pawn|Components|PawnMovement")
60 ENGINE_API virtual void AddInputVector(FVector WorldVector, bool bForce = false);
61
68 UFUNCTION(BlueprintCallable, Category="Pawn|Components|PawnMovement", meta=(Keywords="GetInput"))
69 ENGINE_API FVector GetPendingInputVector() const;
70
77 UFUNCTION(BlueprintCallable, Category="Pawn|Components|PawnMovement", meta=(Keywords="GetInput"))
78 ENGINE_API FVector GetLastInputVector() const;
79
80 /* Returns the pending input vector and resets it to zero.
81 * This should be used during a movement update (by the Pawn or PawnMovementComponent) to prevent accumulation of control input between frames.
82 * Copies the pending input vector to the saved input vector (GetLastMovementInputVector()).
83 * @return The pending input vector.
84 */
85 UFUNCTION(BlueprintCallable, Category="Pawn|Components|PawnMovement")
86 ENGINE_API virtual FVector ConsumeInputVector();
87
89 UFUNCTION(BlueprintCallable, Category="Pawn|Components|PawnMovement")
90 ENGINE_API virtual bool IsMoveInputIgnored() const;
91
93 UFUNCTION(BlueprintCallable, Category="Pawn|Components|PawnMovement")
94 ENGINE_API class APawn* GetPawnOwner() const;
95
97 virtual void NotifyBumpedPawn(APawn* BumpedPawn) {}
98
99 // UNavMovementComponent override for input operations
100 ENGINE_API virtual void RequestPathMove(const FVector& MoveInput) override;
101
102 ENGINE_API virtual void OnTeleported() override;
103
105 ENGINE_API void ApplyAsyncPhysicsStateAction(const UPrimitiveComponent* ActionComponent, const FName& BoneName,
107
108protected:
109
111 UPROPERTY(Transient, DuplicateTransient)
112 TObjectPtr<class APawn> PawnOwner;
113
115 ENGINE_API virtual AController* GetController() const;
116
121 ENGINE_API void MarkForClientCameraUpdate();
122
123public:
124
126
127private:
128
131 ENGINE_API void ServerAsyncPhysicsStateAction(const UPrimitiveComponent* ActionComponent, const FName BoneName, const FAsyncPhysicsTimestamp Timestamp,
133
135 UFUNCTION(NetMulticast, Reliable)
136 ENGINE_API void MulticastAsyncPhysicsStateAction(const UPrimitiveComponent* ActionComponent, const FName BoneName, const FAsyncPhysicsTimestamp Timestamp,
138
140 ENGINE_API void ExecuteAsyncPhysicsStateAction(const UPrimitiveComponent* ActionComponent, const FName& BoneName, const FAsyncPhysicsTimestamp& Timestamp,
142};
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
EPhysicsStateAction
Definition PawnMovementComponent.h:22
uint8_t uint8
Definition binka_ue_file_header.h:8
Definition Controller.h:41
Definition Archive.h:1208
Definition NameTypes.h:617
Definition NavMovementComponent.h:27
Definition PawnMovementComponent.h:43
virtual void NotifyBumpedPawn(APawn *BumpedPawn)
Definition PawnMovementComponent.h:97
Definition PlayerController.h:231
Definition ObjectPtr.h:488
static TVector< double > Zero()
Definition Vector.h:112