UCharacterMovementComponent::RequestedVelocity
#include "GameFramework/CharacterMovementComponent.h"
Access: public
Specifiers: UPROPERTY(Transient)
Description
Velocity requested by path following (e.g. an AI move task) for the current move, set via RequestDirectMove().
Caveats & Gotchas
- • Only meaningful when bHasRequestedVelocity is true — read that flag before trusting the value, since it isn't cleared to zero when unused.
- • This is the requested value for the current update; once consumed it's copied into LastUpdateRequestedVelocity rather than mutated in place.
- • Setting this directly instead of calling RequestDirectMove() won't set bHasRequestedVelocity, so the movement component will ignore it.
Signature
FVector RequestedVelocity Example
Reading a pending path-following request C++
UCharacterMovementComponent* Movement = GetCharacterMovement();
if (Movement->bHasRequestedVelocity)
{
const FVector Requested = Movement->RequestedVelocity;
// React to the AI's requested move direction/speed
} See Also
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?