|
CARLA
|
Possesses every walker pawn. More...
#include <WalkerController.h>
Inheritance diagram for AWalkerController:Public Member Functions | |
| void | ApplyWalkerControl (const FWalkerControl &InControl) |
| AWalkerController (const FObjectInitializer &ObjectInitializer) | |
| void | BlendPose (float Blend) |
| void | GetBonesTransform (FWalkerBoneControlOut &WalkerBones) |
| float | GetMaximumWalkSpeed () const |
| Maximum walk speed allowed in centimetres per second. | |
| void | GetPoseFromAnimation () |
| const FWalkerControl | GetWalkerControl () const |
| bool | GoToNavLocation (const FVector &WorldLocation) |
| Path-follow to WorldLocation (world-local centimeters) on the navmesh through the crowd following component. | |
| bool | IsNavigationActive () const |
| void | OnPossess (APawn *InPawn) override |
| void | SetBonesTransform (const FWalkerBoneControlIn &WalkerBones) |
| bool | SetNavMaxSpeed (float SpeedCmPerSec) |
| Walking speed used while navigating, in cm/s. | |
| bool | StartNavigation (bool bIsCrosser=false) |
| – Server-side navmesh navigation ------------------------------------— | |
| bool | StopNavigation () |
| Abort any navigation request and return to manual control. | |
| void | Tick (float DeltaSeconds) override |
Private Member Functions | |
| void | SetNavigationActive (bool bActive) |
Private Attributes | |
| bool | bNavCrosser = false |
| Whether this walker may traverse road/crosswalk nav areas. | |
| bool | bNavigationActive = false |
| FWalkerControl | Control |
| float | NavMaxSpeed = 139.0f |
| Walking speed applied while navigating, cm/s (defaults to the usual pedestrian speed the Python clients use, 1.39 m/s). | |
Possesses every walker pawn.
Historically a plain AController that only relayed the client-computed FWalkerControl into the character movement; it is now an AAIController with a UCrowdFollowingComponent so the server can also path-follow on the engine navmesh (server-side pedestrian navigation on World Partition maps). Manual FWalkerControl input and navmesh following are mutually exclusive: applying a manual control aborts any active navigation request.
Definition at line 32 of file WalkerController.h.
| AWalkerController::AWalkerController | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 23 of file WalkerController.cpp.
| void AWalkerController::ApplyWalkerControl | ( | const FWalkerControl & | InControl | ) |
Definition at line 54 of file WalkerController.cpp.
References bNavigationActive, Control, and StopNavigation().
| void AWalkerController::BlendPose | ( | float | Blend | ) |
Definition at line 240 of file WalkerController.cpp.
References UWalkerAnim::Blend.
Referenced by CarlaReplayerHelper::ProcessReplayerWalkerBones().
| void AWalkerController::GetBonesTransform | ( | FWalkerBoneControlOut & | WalkerBones | ) |
Definition at line 164 of file WalkerController.cpp.
References FWalkerBoneControlOutData::Component, FWalkerBoneControlOutData::Relative, WalkerBones, and FWalkerBoneControlOutData::World.
|
inline |
Maximum walk speed allowed in centimetres per second.
Definition at line 46 of file WalkerController.h.
Referenced by OnPossess(), SetNavigationActive(), SetNavMaxSpeed(), and Tick().
| void AWalkerController::GetPoseFromAnimation | ( | ) |
Definition at line 260 of file WalkerController.cpp.
References UWalkerAnim::Snap.
|
inline |
Definition at line 55 of file WalkerController.h.
| bool AWalkerController::GoToNavLocation | ( | const FVector & | WorldLocation | ) |
Path-follow to WorldLocation (world-local centimeters) on the navmesh through the crowd following component.
Implies StartNavigation().
Definition at line 81 of file WalkerController.cpp.
References bNavCrosser, and StartNavigation().
|
inline |
Definition at line 95 of file WalkerController.h.
|
override |
Definition at line 32 of file WalkerController.cpp.
References GetMaximumWalkSpeed().
| void AWalkerController::SetBonesTransform | ( | const FWalkerBoneControlIn & | WalkerBones | ) |
Definition at line 199 of file WalkerController.cpp.
References UWalkerAnim::Snap, and WalkerBones.
Referenced by CarlaReplayerHelper::ProcessReplayerWalkerBones().
|
private |
Definition at line 137 of file WalkerController.cpp.
References bNavigationActive, Control, GetMaximumWalkSpeed(), and NavMaxSpeed.
Referenced by StartNavigation(), and StopNavigation().
| bool AWalkerController::SetNavMaxSpeed | ( | float | SpeedCmPerSec | ) |
Walking speed used while navigating, in cm/s.
The manual control path scales its input against GetMaximumWalkSpeed(), so the character's MaxWalkSpeed is only lowered to this value while navigation is active and restored when it stops.
Definition at line 109 of file WalkerController.cpp.
References bNavigationActive, GetMaximumWalkSpeed(), and NavMaxSpeed.
| bool AWalkerController::StartNavigation | ( | bool | bIsCrosser = false | ) |
– Server-side navmesh navigation ------------------------------------—
Enter navigation mode (idempotent). Returns false if no walker pawn is possessed. The manual control input is suppressed while navigating. bIsCrosser selects the query filter: crossers may traverse road/crosswalk nav areas (drawn once per walker by the episode with probability pedestrians_cross_factor); the flag is ignored when navigation is already active, so repeated Start calls cannot re-draw.
Definition at line 66 of file WalkerController.cpp.
References bNavCrosser, bNavigationActive, and SetNavigationActive().
Referenced by GoToNavLocation().
| bool AWalkerController::StopNavigation | ( | ) |
Abort any navigation request and return to manual control.
Definition at line 127 of file WalkerController.cpp.
References bNavigationActive, and SetNavigationActive().
Referenced by ApplyWalkerControl().
|
override |
Definition at line 280 of file WalkerController.cpp.
References bNavigationActive, Control, FWalkerControl::Direction, GetMaximumWalkSpeed(), FWalkerControl::Jump, FWalkerControl::Speed, and Tick().
Referenced by Tick().
|
private |
Whether this walker may traverse road/crosswalk nav areas.
Drawn once per walker when its navigation starts.
Definition at line 114 of file WalkerController.h.
Referenced by GoToNavLocation(), and StartNavigation().
|
private |
Definition at line 110 of file WalkerController.h.
Referenced by ApplyWalkerControl(), SetNavigationActive(), SetNavMaxSpeed(), StartNavigation(), StopNavigation(), and Tick().
|
private |
Definition at line 104 of file WalkerController.h.
Referenced by ApplyWalkerControl(), SetNavigationActive(), and Tick().
|
private |
Walking speed applied while navigating, cm/s (defaults to the usual pedestrian speed the Python clients use, 1.39 m/s).
Definition at line 108 of file WalkerController.h.
Referenced by SetNavigationActive(), and SetNavMaxSpeed().