CharacterMovementComponent handles movement logic for the associated Character owner. 更多...
#include <CharacterMovementComponent.h>
类 UCharacterMovementComponent 继承关系图:类 | |
| struct | FStepDownResult |
| Struct updated by StepUp() to return result of final step down, if applicable. 更多... | |
Public 类型 | |
| enum class | ERootMotionMapping : uint32 |
| Collection of the most recent ID mappings | |
Public 成员函数 | |
| virtual void | AddForce (FVector Force) |
| Add force to character. 更多... | |
| virtual void | AddImpulse (FVector Impulse, bool bVelocityChange=false) |
| Add impulse to character. 更多... | |
| virtual void | AddRadialForce (const FVector &Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff) override |
| Adds force from radial force components. 更多... | |
| virtual void | AddRadialImpulse (const FVector &Origin, float Radius, float Strength, enum ERadialImpulseFalloff Falloff, bool bVelChange) override |
| Adds impulse from radial force components. 更多... | |
| virtual void | AdjustFloorHeight () |
| Adjust distance from floor, trying to maintain a slight offset from the floor when walking (based on CurrentFloor). | |
| virtual void | ApplyAccumulatedForces (float DeltaSeconds) |
| Applies momentum accumulated through AddImpulse() and AddForce(), then clears those forces. 更多... | |
| virtual void | ApplyDownwardForce (float DeltaSeconds) |
| Applies downward force when walking on top of physics objects. 更多... | |
| virtual void | ApplyRepulsionForce (float DeltaSeconds) |
| Applies repulsion force to all touched components. | |
| virtual bool | ApplyRequestedMove (float DeltaTime, float MaxAccel, float MaxSpeed, float Friction, float BrakingDeceleration, FVector &OutAcceleration, float &OutRequestedSpeed) |
| Use velocity requested by path following to compute a requested acceleration and speed. 更多... | |
| uint16 | ApplyRootMotionSource (TSharedPtr< FRootMotionSource > SourcePtr) |
| Apply a RootMotionSource to current root motion 更多... | |
| virtual void | ApplyWorldOffset (const FVector &InOffset, bool bWorldShift) override |
| Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location 更多... | |
| virtual void | BeginDestroy () override |
| Called before destroying the object. 更多... | |
| virtual FVector | CalcAnimRootMotionVelocity (const FVector &RootMotionDeltaMove, float DeltaSeconds, const FVector &CurrentVelocity) const |
| Calculate velocity from anim root motion. 更多... | |
| virtual void | CalcAvoidanceVelocity (float DeltaTime) |
| calculate RVO avoidance and apply it to current velocity | |
| virtual void | CalcVelocity (float DeltaTime, float Friction, bool bFluid, float BrakingDeceleration) |
| Updates Velocity and Acceleration based on the current state, applying the effects of friction and acceleration or deceleration. 更多... | |
| virtual bool | CanAttemptJump () const |
| Returns true if current movement state allows an attempt at jumping. 更多... | |
| virtual bool | CanCrouchInCurrentState () const |
| Returns true if the character is allowed to crouch in the current state. 更多... | |
| virtual bool | CanStartPathFollowing () const override |
| Returns true if path following can start | |
| virtual bool | CanStepUp (const FHitResult &Hit) const |
| Returns true if we can step up on the actor in the given FHitResult. | |
| virtual bool | CanStopPathFollowing () const override |
| check if current move target can be reached right now if positions are matching (e.g. 更多... | |
| virtual bool | CanWalkOffLedges () const |
| Returns whether this pawn is currently allowed to walk off ledges | |
| virtual bool | CheckFall (const FFindFloorResult &OldFloor, const FHitResult &Hit, const FVector &Delta, const FVector &OldLocation, float remainingTime, float timeTick, int32 Iterations, bool bMustJump) |
| Check if pawn is falling | |
| virtual bool | CheckLedgeDirection (const FVector &OldLocation, const FVector &SideStep, const FVector &GravDir) const |
| Returns true if there is a suitable floor SideStep from current position. | |
| virtual bool | CheckWaterJump (FVector CheckPoint, FVector &WallNormal) |
| Check if swimming pawn just ran into edge of the pool and should jump out. | |
| virtual void | ClearAccumulatedForces () |
| Clears forces accumulated through AddImpulse() and AddForce(), and also pending launch velocity. | |
| virtual void | ClientAckGoodMove (float TimeStamp) |
| If no client adjustment is needed after processing received ServerMove(), ack the good move so client can remove it from SavedMoves | |
| virtual void | ClientAdjustPosition (float TimeStamp, FVector NewLoc, FVector NewVel, UPrimitiveComponent *NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode) |
| Replicate position correction to client, associated with a timestamped servermove. 更多... | |
| virtual void | ClientAdjustRootMotionPosition (float TimeStamp, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent *ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode) |
| Replicate position correction to client when using root motion for movement. 更多... | |
| virtual void | ClientAdjustRootMotionSourcePosition (float TimeStamp, FRootMotionSourceGroup ServerRootMotion, bool bHasAnimRootMotion, float ServerMontageTrackPosition, FVector ServerLoc, FVector_NetQuantizeNormal ServerRotation, float ServerVelZ, UPrimitiveComponent *ServerBase, FName ServerBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode) |
| Replicate root motion source correction to client when using root motion for movement. | |
| virtual void | ClientHandleMoveResponse (const FCharacterMoveResponseDataContainer &MoveResponse) |
| On the client, handles the move response from the server after it has been received and unpacked in MoveResponsePacked_ClientReceive. 更多... | |
| virtual void | ComputeFloorDist (const FVector &CapsuleLocation, float LineDistance, float SweepDistance, FFindFloorResult &OutFloorResult, float SweepRadius, const FHitResult *DownwardSweepResult=NULL) const |
| Compute distance to the floor from bottom sphere of capsule and store the result in OutFloorResult. 更多... | |
| virtual FRotator | ComputeOrientToMovementRotation (const FRotator &CurrentRotation, float DeltaTime, FRotator &DeltaRotation) const |
| Compute a target rotation based on current movement. 更多... | |
| virtual bool | ComputePerchResult (const float TestRadius, const FHitResult &InHit, const float InMaxFloorDist, FFindFloorResult &OutPerchFloorResult) const |
| Compute the sweep result of the smaller capsule with radius specified by GetValidPerchRadius(), and return true if the sweep contacts a valid walkable normal within InMaxFloorDist of InHit.ImpactPoint. 更多... | |
| virtual FVector | ConstrainAnimRootMotionVelocity (const FVector &RootMotionVelocity, const FVector &CurrentVelocity) const |
| Constrain components of root motion velocity that may not be appropriate given the current movement mode (e.g. 更多... | |
| void | ConvertRootMotionServerIDsToLocalIDs (const FRootMotionSourceGroup &LocalRootMotionToMatchWith, FRootMotionSourceGroup &InOutServerRootMotion, float TimeStamp) |
| Converts received server IDs in a root motion group to local IDs | |
| virtual void | Crouch (bool bClientSimulation=false) |
| Checks if new capsule size fits (no encroachment), and call CharacterOwner->OnStartCrouch() if successful. 更多... | |
| virtual void | Deactivate () override |
| Deactivates the SceneComponent. | |
| virtual void | DisableMovement () |
| Make movement impossible (sets movement mode to MOVE_None). | |
| virtual void | DisplayDebug (class UCanvas *Canvas, const FDebugDisplayInfo &DebugDisplay, float &YL, float &YPos) |
| Draw important variables on canvas. 更多... | |
| virtual bool | DoJump (bool bReplayingMoves) |
| Perform jump. 更多... | |
| virtual void | FindFloor (const FVector &CapsuleLocation, FFindFloorResult &OutFloorResult, bool bCanUseCachedLocation, const FHitResult *DownwardSweepResult=NULL) const |
| Sweeps a vertical trace to find the floor for the capsule at the given location. 更多... | |
| virtual bool | FindNavFloor (const FVector &TestLocation, FNavLocation &NavFloorLocation) const |
| Project a location to navmesh to find adjusted height. 更多... | |
| FVector | FindWaterLine (FVector Start, FVector End) |
| Get as close to waterline as possible, staying on same side as currently. | |
| virtual bool | FloorSweepTest (struct FHitResult &OutHit, const FVector &Start, const FVector &End, ECollisionChannel TraceChannel, const struct FCollisionShape &CollisionShape, const struct FCollisionQueryParams &Params, const struct FCollisionResponseParams &ResponseParam) const |
| Sweep against the world and return the first blocking hit. 更多... | |
| void | ForceClientAdjustment () |
| Force a client adjustment. 更多... | |
| virtual void | ForceReplicationUpdate () |
| Force a client update by making it appear on the server that the client hasn't updated in a long time. | |
| virtual FVector | GetAirControl (float DeltaTime, float TickAirControl, const FVector &FallAcceleration) |
| Get the air control to use during falling movement. 更多... | |
| float | GetAnalogInputModifier () const |
| Returns modifier [0..1] based on the magnitude of the last input vector, which is used to modify the acceleration and max speed during movement. | |
| virtual FVector | GetBestDirectionOffActor (AActor *BaseActor) const |
| Can be overridden to choose to jump based on character velocity, base actor dimensions, etc. | |
| ACharacter * | GetCharacterOwner () const |
| Get the Character that owns UpdatedComponent. | |
| FVector | GetCurrentAcceleration () const |
| Returns current acceleration, computed from input vector each update. | |
| virtual FRotator | GetDeltaRotation (float DeltaTime) const |
| Returns how far to rotate character during the time interval DeltaTime. | |
| virtual FVector | GetFallingLateralAcceleration (float DeltaTime) |
| Get the lateral acceleration to use during falling movement. 更多... | |
| virtual float | GetGravityZ () const override |
| Returns gravity that affects this component | |
| EMovementMode | GetGroundMovementMode () const |
| Get current GroundMovementMode value. 更多... | |
| virtual FVector | GetImpartedMovementBaseVelocity () const |
| If we have a movement base, get the velocity that should be imparted by that base, usually when jumping off of it. 更多... | |
| FVector | GetLastUpdateLocation () const |
| Returns the location at the end of the last tick. | |
| FQuat | GetLastUpdateQuat () const |
| Returns the rotation Quat at the end of the last tick. | |
| FRotator | GetLastUpdateRotation () const |
| Returns the rotation at the end of the last tick. | |
| FVector | GetLastUpdateVelocity () const |
| Returns the velocity at the end of the last tick. | |
| virtual FVector | GetLedgeMove (const FVector &OldLocation, const FVector &Delta, const FVector &GravDir) const |
| virtual float | GetMaxAcceleration () const |
| Returns maximum acceleration for the current state. | |
| virtual float | GetMaxBrakingDeceleration () const |
| Returns maximum deceleration for the current state when braking (ie when there is no acceleration). | |
| virtual float | GetMaxJumpHeight () const |
| Compute the max jump height based on the JumpZVelocity velocity and gravity. 更多... | |
| virtual float | GetMaxJumpHeightWithJumpTime () const |
| Compute the max jump height based on the JumpZVelocity velocity and gravity. 更多... | |
| virtual float | GetMaxSpeed () const override |
| Returns maximum speed of component in current movement mode. | |
| virtual float | GetMinAnalogSpeed () const |
| Returns maximum acceleration for the current state. | |
| UPrimitiveComponent * | GetMovementBase () const |
| Return PrimitiveComponent we are based on (standing and walking on). | |
| virtual FString | GetMovementName () const |
| Returns MovementMode string | |
| virtual float | GetNetworkSafeRandomAngleDegrees () const |
| Generate a random angle in degrees that is approximately equal between client and server. 更多... | |
| virtual float | GetPathFollowingBrakingDistance (float MaxSpeed) const override |
| Returns braking distance for acceleration driven path following | |
| float | GetPerchRadiusThreshold () const |
| Returns The distance from the edge of the capsule within which we don't allow the character to perch on the edge of a surface. | |
| virtual class FNetworkPredictionData_Client * | GetPredictionData_Client () const override |
| Get prediction data for a client game. 更多... | |
| virtual class FNetworkPredictionData_Server * | GetPredictionData_Server () const override |
| Get prediction data for a server game. 更多... | |
| TSharedPtr< FRootMotionSource > | GetRootMotionSource (FName InstanceName) |
| Get a RootMotionSource from current root motion by name | |
| TSharedPtr< FRootMotionSource > | GetRootMotionSourceByID (uint16 RootMotionSourceID) |
| Get a RootMotionSource from current root motion by ID | |
| int32 | GetRVOAvoidanceUIDFast () const |
| END IRVOAvoidanceInterface 更多... | |
| FORCEINLINE float | GetServerLastTransformUpdateTimeStamp () const |
| Get the value of ServerLastTransformUpdateTimeStamp. | |
| float | GetSimulationTimeStep (float RemainingTime, int32 Iterations) const |
| Compute remaining time step given remaining time and current iterations. 更多... | |
| ETeleportType | GetTeleportType () const |
| When moving the character, we should inform physics as to whether we are teleporting. 更多... | |
| float | GetValidPerchRadius () const |
| Returns the radius within which we can stand on the edge of a surface without falling (if this is a walkable surface). 更多... | |
| FORCEINLINE float | GetWalkableFloorAngle () const |
| Get the max angle in degrees of a walkable surface for the character. | |
| FORCEINLINE float | GetWalkableFloorZ () const |
| Get the Z component of the normal of the steepest walkable surface for the character. 更多... | |
| virtual bool | HandlePendingLaunch () |
| Handle a pending launch during an update. 更多... | |
| virtual void | HandleWalkingOffLedge (const FVector &PreviousFloorImpactNormal, const FVector &PreviousFloorContactNormal, const FVector &PreviousLocation, float TimeDelta) |
| Trigger OnWalkingOffLedge event on CharacterOwner. | |
| bool | HasAnimRootMotion () const |
| Returns true if we have Root Motion from animation to use in PerformMovement() physics. 更多... | |
| bool | HasRootMotionSources () const |
| Returns true if we have Root Motion from any source to use in PerformMovement() physics. | |
| virtual bool | HasValidData () const |
| Return true if we have a valid CharacterOwner and UpdatedComponent. | |
| virtual bool | IsCrouching () const override |
| Returns true if currently crouching | |
| virtual bool | IsFalling () const override |
| Returns true if currently falling (not flying, in a non-fluid volume, and not on the ground) | |
| virtual bool | IsFlying () const override |
| Returns true if currently flying (moving through a non-fluid volume without resting on the ground) | |
| bool | IsMovementInProgress () const |
| Returns true if currently performing a movement update. 更多... | |
| virtual bool | IsMovingOnGround () const override |
| Returns true if currently moving on the ground (e.g. 更多... | |
| virtual bool | IsSwimming () const override |
| Returns true if currently swimming (moving through a fluid volume) | |
| virtual bool | IsValidLandingSpot (const FVector &CapsuleLocation, const FHitResult &Hit) const |
| Verify that the supplied hit result is a valid landing spot when falling. | |
| virtual bool | IsWalkable (const FHitResult &Hit) const |
| Return true if the hit result should be considered a walkable surface for the character. | |
| bool | IsWalking () const |
| Returns true if the character is in the 'Walking' movement mode. | |
| virtual bool | IsWithinEdgeTolerance (const FVector &CapsuleLocation, const FVector &TestImpactPoint, const float CapsuleRadius) const |
| Return true if the 2D distance to the impact point is inside the edge tolerance (CapsuleRadius minus a small rejection threshold). 更多... | |
| virtual void | JumpOff (AActor *MovementBaseActor) |
| Force this pawn to bounce off its current base, which isn't an acceptable base for it. | |
| virtual void | JumpOutOfWater (FVector WallNormal) |
| Jump onto shore from water | |
| virtual void | K2_ComputeFloorDist (FVector CapsuleLocation, float LineDistance, float SweepDistance, float SweepRadius, FFindFloorResult &FloorResult) const |
| Compute distance to the floor from bottom sphere of capsule and store the result in FloorResult. 更多... | |
| virtual void | K2_FindFloor (FVector CapsuleLocation, FFindFloorResult &FloorResult) const |
| Sweeps a vertical trace to find the floor for the capsule at the given location. 更多... | |
| virtual float | K2_GetModifiedMaxAcceleration () const |
| Returns maximum acceleration for the current state, based on MaxAcceleration and any additional modifiers. | |
| float | K2_GetWalkableFloorAngle () const |
| Get the max angle in degrees of a walkable surface for the character. | |
| float | K2_GetWalkableFloorZ () const |
| Get the Z component of the normal of the steepest walkable surface for the character. 更多... | |
| virtual void | Launch (FVector const &LaunchVel) |
| Queue a pending launch with velocity LaunchVel. | |
| virtual void | MaybeSaveBaseLocation () |
| Call SaveBaseLocation() if not deferring updates (bDeferUpdateBasedMovement is false). | |
| virtual void | MaybeUpdateBasedMovement (float DeltaSeconds) |
| Update or defer updating of position based on Base movement | |
| virtual void | MoveSmooth (const FVector &InVelocity, const float DeltaSeconds, FStepDownResult *OutStepDownResult=NULL) |
| Moves along the given movement direction using simple movement rules based on the current movement mode (usually used by simulated proxies). 更多... | |
| virtual FVector | NewFallVelocity (const FVector &InitialVelocity, const FVector &Gravity, float DeltaTime) const |
| Compute new falling velocity from given velocity and gravity. 更多... | |
| virtual void | NotifyBumpedPawn (APawn *BumpedPawn) override |
| Notify of collision in case we want to react, such as waking up avoidance or pathing code. | |
| virtual void | NotifyJumpApex () |
| Called if bNotifyApex is true and character has just passed the apex of its jump. | |
| virtual void | OnRegister () override |
| Overridden to update component properties that should be updated while being edited. | |
| virtual void | OnRootMotionSourceBeingApplied (const FRootMotionSource *Source) |
| Called during ApplyRootMotionSource call, useful for project-specific alerts for "something is about to be altering our movement" | |
| virtual void | OnTeleported () override |
| Called by owning Character upon successful teleport from AActor::TeleportTo(). | |
| virtual void | PerformAirControlForPathFollowing (FVector Direction, float ZDiff) |
| If ShouldPerformAirControlForPathFollowing() returns true, it will update Velocity and Acceleration to air control in the desired Direction for character using path following. 更多... | |
| virtual void | PhysFalling (float deltaTime, int32 Iterations) |
| Handle falling movement. | |
| virtual void | PhysicsRotation (float DeltaTime) |
| Perform rotation over deltaTime | |
| virtual void | PhysicsVolumeChanged (class APhysicsVolume *NewVolume) override |
| Delegate when PhysicsVolume of UpdatedComponent has been changed | |
| virtual void | PostLoad () override |
| Do any object-specific cleanup required immediately after loading an object. 更多... | |
| virtual void | PostPhysicsTickComponent (float DeltaTime, FCharacterMovementComponentPostPhysicsTickFunction &ThisTickFunction) |
| Tick function called after physics (sync scene) has finished simulation, before cloth | |
| virtual void | PostProcessAvoidanceVelocity (FVector &NewVelocity) |
| allows modifing avoidance velocity, called when bUseRVOPostProcess is set | |
| virtual void | RegisterComponentTickFunctions (bool bRegister) override |
| Virtual call chain to register all tick functions 更多... | |
| void | RemoveRootMotionSource (FName InstanceName) |
| Remove a RootMotionSource from current root motion by name | |
| void | RemoveRootMotionSourceByID (uint16 RootMotionSourceID) |
| Remove a RootMotionSource from current root motion by ID | |
| virtual void | RequestDirectMove (const FVector &MoveVelocity, bool bForceMaxSpeed) override |
| path following: request new velocity | |
| virtual void | RequestPathMove (const FVector &MoveInput) override |
| path following: request new move input (normal vector = full strength) | |
| void | RevertMove (const FVector &OldLocation, UPrimitiveComponent *OldBase, const FVector &InOldBaseLocation, const FFindFloorResult &OldFloor, bool bFailMove) |
| Revert to previous position OldLocation, return to being based on OldBase. 更多... | |
| virtual FVector | RoundAcceleration (FVector InAccel) const |
| Round acceleration, for better consistency and lower bandwidth in networked games. | |
| virtual void | SaveBaseLocation () |
| Update OldBaseLocation and OldBaseQuat if there is a valid movement base, and store the relative location/rotation if necessary. 更多... | |
| virtual void | Serialize (FArchive &Archive) override |
| Handles reading, writing, and reference collecting using FArchive. 更多... | |
| virtual void | ServerMove (float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 CompressedMoveFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| Replicated function sent by client to server - contains client movement and view info. 更多... | |
| virtual void | ServerMove_HandleMoveData (const FCharacterNetworkMoveDataContainer &MoveDataContainer) |
| Handle movement data after it's unpacked from the ServerMovePacked_ServerReceive() call. 更多... | |
| virtual void | ServerMove_PerformMovement (const FCharacterNetworkMoveData &MoveData) |
| Check timestamps, generate a delta time, and pass through movement params to MoveAutonomous. 更多... | |
| virtual void | ServerMoveDual (float TimeStamp0, FVector_NetQuantize10 InAccel0, uint8 PendingFlags, uint32 View0, float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 NewFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| Replicated function sent by client to server - contains client movement and view info for two moves. 更多... | |
| virtual void | ServerMoveDualHybridRootMotion (float TimeStamp0, FVector_NetQuantize10 InAccel0, uint8 PendingFlags, uint32 View0, float TimeStamp, FVector_NetQuantize10 InAccel, FVector_NetQuantize100 ClientLoc, uint8 NewFlags, uint8 ClientRoll, uint32 View, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| Replicated function sent by client to server - contains client movement and view info for two moves. 更多... | |
| void | ServerMovePacked_ClientSend (const FCharacterServerMovePackedBits &PackedBits) |
| The actual network RPCs for character movement are passed to ACharacter, which wrap to the _Implementation call here, to avoid Component RPC overhead. 更多... | |
| void | ServerMovePacked_ServerReceive (const FCharacterServerMovePackedBits &PackedBits) |
| On the server, receives packed move data from the Character RPC, unpacks them into the FCharacterNetworkMoveDataContainer returned from GetNetworkMoveDataContainer(), and passes the data container to ServerMove_HandleMoveData(). | |
| void | ServerSendMoveResponse (const FClientAdjustment &PendingAdjustment) |
| On the server, sends a packed move response to the client. 更多... | |
| void | SetAvoidanceEnabled (bool bEnable) |
| Change avoidance state and registers in RVO manager if needed | |
| void | SetAvoidanceVelocityLock (class UAvoidanceManager *Avoidance, float Duration) |
| lock avoidance velocity | |
| virtual void | SetBase (UPrimitiveComponent *NewBase, const FName BoneName=NAME_None, bool bNotifyActor=true) |
| Update the base of the character, which is the PrimitiveComponent we are standing on. | |
| void | SetBaseFromFloor (const FFindFloorResult &FloorResult) |
| Update the base of the character, using the given floor result if it is walkable, or null if not. 更多... | |
| virtual void | SetDefaultMovementMode () |
| Set movement mode to the default based on the current physics volume. | |
| void | SetGroundMovementMode (EMovementMode NewGroundMovementMode) |
| Set movement mode to use when returning to walking movement (either MOVE_Walking or MOVE_NavWalking). 更多... | |
| virtual void | SetMovementMode (EMovementMode NewMovementMode, uint8 NewCustomMode=0) |
| Change movement mode. 更多... | |
| virtual void | SetRVOAvoidanceUID (int32 UID) override |
| BEGIN IRVOAvoidanceInterface | |
| virtual void | SetUpdatedComponent (USceneComponent *NewUpdatedComponent) override |
| Overridden to only allow registration with components owned by a Pawn. | |
| void | SetWalkableFloorAngle (float InWalkableFloorAngle) |
| Set the max angle in degrees of a walkable surface for the character. 更多... | |
| void | SetWalkableFloorZ (float InWalkableFloorZ) |
| Set the Z component of the normal of the steepest walkable surface for the character. 更多... | |
| virtual bool | ShouldCatchAir (const FFindFloorResult &OldFloor, const FFindFloorResult &NewFloor) |
| Whether Character should go into falling mode when walking and changing position, based on an old and new floor result (both of which are considered walkable). 更多... | |
| virtual bool | ShouldCheckForValidLandingSpot (float DeltaTime, const FVector &Delta, const FHitResult &Hit) const |
| Determine whether we should try to find a valid landing spot after an impact with an invalid one (based on the Hit result). 更多... | |
| virtual bool | ShouldComputePerchResult (const FHitResult &InHit, bool bCheckRadius=true) const |
| Check if the result of a sweep test (passed in InHit) might be a valid location to perch, in which case we should use ComputePerchResult to validate the location. 更多... | |
| virtual bool | ShouldJumpOutOfWater (FVector &JumpDir) |
| Determine whether the Character should jump when exiting water. 更多... | |
| virtual bool | ShouldLimitAirControl (float DeltaTime, const FVector &FallAcceleration) const |
| Returns true if falling movement should limit air control. 更多... | |
| virtual bool | ShouldPerformAirControlForPathFollowing () const |
| Whether Character should perform air control via PerformAirControlForPathFollowing when falling and following a path at the same time Default implementation always returns true during MOVE_Falling. | |
| virtual bool | ShouldRemainVertical () const |
| if true, DesiredRotation will be restricted to only Yaw component in PhysicsRotation() | |
| virtual bool | ShouldUsePackedMovementRPCs () const |
| Determines whether to use packed movement RPCs with variable length payloads, or legacy code which has multiple functions required for different situations. 更多... | |
| void | SimulateRootMotion (float DeltaSeconds, const FTransform &LocalRootMotionTransform) |
| Simulate Root Motion physics on Simulated Proxies | |
| virtual void | SmoothCorrection (const FVector &OldLocation, const FQuat &OldRotation, const FVector &NewLocation, const FQuat &NewRotation) override |
| React to new transform from network update. 更多... | |
| virtual void | StartFalling (int32 Iterations, float remainingTime, float timeTick, const FVector &Delta, const FVector &subLoc) |
| Transition from walking to falling | |
| virtual void | StartNewPhysics (float deltaTime, int32 Iterations) |
| changes physics based on MovementMode | |
| void | StartSwimming (FVector OldLocation, FVector OldVelocity, float timeTick, float remainingTime, int32 Iterations) |
| Handle start swimming functionality 更多... | |
| virtual bool | StepUp (const FVector &GravDir, const FVector &Delta, const FHitResult &Hit, struct UCharacterMovementComponent::FStepDownResult *OutStepDownResult=NULL) |
| Move up steps or slope. 更多... | |
| virtual void | StopActiveMovement () override |
| Stops applying further movement (usually zeros acceleration). | |
| virtual void | TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
| Function called every frame on this ActorComponent. 更多... | |
| UCharacterMovementComponent (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get()) | |
| Default UObject constructor. | |
| virtual void | UnCrouch (bool bClientSimulation=false) |
| Checks if default capsule size fits (no encroachment), and trigger OnEndCrouch() on the owner if successful. 更多... | |
| virtual void | UpdateBasedMovement (float DeltaSeconds) |
| Update position based on Base movement | |
| virtual void | UpdateBasedRotation (FRotator &FinalRotation, const FRotator &ReducedRotation) |
| Update controller's view rotation as pawn's base rotates | |
| virtual void | UpdateCharacterStateAfterMovement (float DeltaSeconds) |
| Update the character state in PerformMovement after the position change. 更多... | |
| virtual void | UpdateCharacterStateBeforeMovement (float DeltaSeconds) |
| Update the character state in PerformMovement right before doing the actual position change | |
| virtual void | UpdateFloorFromAdjustment () |
| React to instantaneous change in position. 更多... | |
| virtual void | UpdateProxyAcceleration () |
| Used during SimulateMovement for proxies, this computes a new value for Acceleration before running proxy simulation. 更多... | |
| virtual bool | VerifyClientTimeStamp (float TimeStamp, FNetworkPredictionData_Server_Character &ServerData) |
| On the Server, verify that an incoming client TimeStamp is valid and has not yet expired. 更多... | |
| virtual float | VisualizeMovement () const |
| Draw in-world debug information for character movement (called with p.VisualizeMovement > 0). | |
Public 成员函数 继承自 UPawnMovementComponent | |
| virtual void | AddInputVector (FVector WorldVector, bool bForce=false) |
| Adds the given vector to the accumulated input in world space. 更多... | |
| FVector | GetLastInputVector () const |
| Return the last input vector in world space that was processed by ConsumeInputVector(), which is usually done by the Pawn or PawnMovementComponent. 更多... | |
| class APawn * | GetPawnOwner () const |
| Return the Pawn that owns UpdatedComponent. | |
| FVector | GetPendingInputVector () const |
| Return the pending input vector in world space. 更多... | |
| virtual bool | IsMoveInputIgnored () const |
| Helper to see if move input is ignored. 更多... | |
| FVector | K2_GetInputVector () const |
| (Deprecated) Return the input vector in world space. | |
| virtual void | NotifyBumpedPawn (APawn *BumpedPawn) |
| Notify of collision in case we want to react, such as waking up avoidance or pathing code. | |
| virtual void | OnTeleported () override |
| Called by owning Actor upon successful teleport from AActor::TeleportTo(). | |
| virtual void | RequestPathMove (const FVector &MoveInput) override |
| path following: request new move input (normal vector = full strength) | |
| virtual void | Serialize (FArchive &Ar) override |
| Handles reading, writing, and reference collecting using FArchive. 更多... | |
| virtual void | SetUpdatedComponent (USceneComponent *NewUpdatedComponent) override |
| Overridden to only allow registration with components owned by a Pawn. | |
Public 成员函数 继承自 UNavMovementComponent | |
| FORCEINLINE bool | CanEverCrouch () const |
| Returns true if component can crouch | |
| FORCEINLINE bool | CanEverFly () const |
| Returns true if component can fly | |
| FORCEINLINE bool | CanEverJump () const |
| Returns true if component can jump | |
| FORCEINLINE bool | CanEverMoveOnGround () const |
| Returns true if component can move along the ground (walk, drive, etc) | |
| FORCEINLINE bool | CanEverSwim () const |
| Returns true if component can swim | |
| virtual bool | CanStartPathFollowing () const |
| Returns true if path following can start | |
| virtual bool | CanStopPathFollowing () const |
| check if current move target can be reached right now if positions are matching (e.g. 更多... | |
| void | ClearFixedBrakingDistance () |
| clears fixed braking distance | |
| FORCEINLINE FVector | GetActorFeetLocation () const |
| Returns location of controlled actor's "feet" meaning center of bottom of collision bounding box | |
| virtual FBasedPosition | GetActorFeetLocationBased () const |
| Returns based location of controlled actor | |
| FORCEINLINE FVector | GetActorLocation () const |
| Returns location of controlled actor - meaning center of collision bounding box | |
| FORCEINLINE FVector | GetActorNavLocation () const |
| Returns navigation location of controlled actor | |
| FORCEINLINE FNavAgentProperties & | GetNavAgentPropertiesRef () |
| Returns the NavAgentProps | |
| FORCEINLINE const FNavAgentProperties & | GetNavAgentPropertiesRef () const |
| Returns the NavAgentProps(const) | |
| virtual float | GetPathFollowingBrakingDistance (float MaxSpeed) const |
| Returns braking distance for acceleration driven path following | |
| virtual bool | IsCrouching () const |
| Returns true if currently crouching | |
| virtual bool | IsFalling () const |
| Returns true if currently falling (not flying, in a non-fluid volume, and not on the ground) | |
| virtual bool | IsFlying () const |
| Returns true if currently flying (moving through a non-fluid volume without resting on the ground) | |
| FORCEINLINE bool | IsJumpAllowed () const |
| Returns true if component is allowed to jump | |
| virtual bool | IsMovingOnGround () const |
| Returns true if currently moving on the ground (e.g. 更多... | |
| virtual bool | IsSwimming () const |
| Returns true if currently swimming (moving through a fluid volume) | |
| virtual void | RequestDirectMove (const FVector &MoveVelocity, bool bForceMaxSpeed) |
| path following: request new velocity | |
| virtual void | RequestPathMove (const FVector &MoveInput) |
| path following: request new move input (normal vector = full strength) | |
| void | ResetMoveState () |
| Resets runtime movement state to character's movement capabilities | |
| void | SetFixedBrakingDistance (float DistanceToEndOfPath) |
| set fixed braking distance | |
| FORCEINLINE void | SetJumpAllowed (bool bAllowed) |
| Sets whether this component is allowed to jump | |
| virtual void | StopActiveMovement () |
| Stops applying further movement (usually zeros acceleration). | |
| virtual void | StopMovementImmediately () override |
| Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration). | |
| void | StopMovementKeepPathing () |
| Stops movement immediately (reset velocity) but keeps following current path | |
Public 成员函数 继承自 UMovementComponent | |
| virtual void | AddRadialForce (const FVector &Origin, float Radius, float Strength, ERadialImpulseFalloff Falloff) |
| Adds force from radial force components. 更多... | |
| virtual void | AddRadialImpulse (const FVector &Origin, float Radius, float Strength, ERadialImpulseFalloff Falloff, bool bVelChange) |
| Adds impulse from radial force components. 更多... | |
| virtual FVector | ComputeSlideVector (const FVector &Delta, const float Time, const FVector &Normal, const FHitResult &Hit) const |
| Compute a vector to slide along a surface, given an attempted move, time, and normal. 更多... | |
| virtual FVector | ConstrainDirectionToPlane (FVector Direction) const |
| Constrain a direction vector to the plane constraint, if enabled. 更多... | |
| virtual FVector | ConstrainLocationToPlane (FVector Location) const |
| Constrain a position vector to the plane constraint, if enabled. | |
| virtual FVector | ConstrainNormalToPlane (FVector Normal) const |
| Constrain a normal vector (of unit length) to the plane constraint, if enabled. | |
| virtual void | Deactivate () override |
| Deactivates the SceneComponent. | |
| virtual float | GetGravityZ () const |
| Returns gravity that affects this component | |
| virtual float | GetMaxSpeed () const |
| Returns maximum speed of component in current movement mode. | |
| virtual FVector | GetPenetrationAdjustment (const FHitResult &Hit) const |
| Calculate a movement adjustment to try to move out of a penetration from a failed move. 更多... | |
| virtual APhysicsVolume * | GetPhysicsVolume () const |
| Returns the PhysicsVolume this MovementComponent is using, or the world's default physics volume if none. | |
| EPlaneConstraintAxisSetting | GetPlaneConstraintAxisSetting () const |
| Get the plane constraint axis setting. | |
| const FVector & | GetPlaneConstraintNormal () const |
| Returns the normal of the plane that constrains movement, enforced if the plane constraint is enabled. | |
| const FVector & | GetPlaneConstraintOrigin () const |
| Get the plane constraint origin. 更多... | |
| virtual void | HandleImpact (const FHitResult &Hit, float TimeSlice=0.f, const FVector &MoveDelta=FVector::ZeroVector) |
| Called for Blocking impact 更多... | |
| virtual void | InitCollisionParams (FCollisionQueryParams &OutParams, FCollisionResponseParams &OutResponseParam) const |
| Initialize collision params appropriately based on our collision settings. 更多... | |
| virtual void | InitializeComponent () override |
| Overridden to auto-register the updated component if it starts NULL, and we can find a root component on our owner. | |
| virtual bool | IsExceedingMaxSpeed (float MaxSpeed) const |
| Returns true if the current velocity is exceeding the given max speed (usually the result of GetMaxSpeed()), within a small error tolerance. 更多... | |
| virtual bool | IsInWater () const |
| Returns true if it's in PhysicsVolume with water flag | |
| virtual float | K2_GetMaxSpeedModifier () const |
| Returns a scalar applied to the maximum velocity that the component can currently move. | |
| virtual float | K2_GetModifiedMaxSpeed () const |
| Returns the result of GetMaxSpeed() * GetMaxSpeedModifier(). | |
| bool | K2_MoveUpdatedComponent (FVector Delta, FRotator NewRotation, FHitResult &OutHit, bool bSweep=true, bool bTeleport=false) |
| Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation. 更多... | |
| bool | MoveUpdatedComponent (const FVector &Delta, const FQuat &NewRotation, bool bSweep, FHitResult *OutHit=NULL, ETeleportType Teleport=ETeleportType::None) |
| Moves our UpdatedComponent by the given Delta, and sets rotation to NewRotation. 更多... | |
| virtual void | OnRegister () override |
| Overridden to update component properties that should be updated while being edited. | |
| virtual void | OnTeleported () |
| Called by owning Actor upon successful teleport from AActor::TeleportTo(). | |
| virtual bool | OverlapTest (const FVector &Location, const FQuat &RotationQuat, const ECollisionChannel CollisionChannel, const FCollisionShape &CollisionShape, const AActor *IgnoreActor) const |
| Return true if the given collision shape overlaps other geometry at the given location and rotation. 更多... | |
| virtual void | PhysicsVolumeChanged (class APhysicsVolume *NewVolume) |
| Delegate when PhysicsVolume of UpdatedComponent has been changed | |
| virtual void | PostLoad () override |
| Do any object-specific cleanup required immediately after loading an object. 更多... | |
| virtual void | RegisterComponentTickFunctions (bool bRegister) override |
| Virtual call chain to register all tick functions 更多... | |
| bool | ResolvePenetration (const FVector &Adjustment, const FHitResult &Hit, const FQuat &NewRotation) |
| Try to move out of penetration in an object after a failed move. 更多... | |
| bool | SafeMoveUpdatedComponent (const FVector &Delta, const FQuat &NewRotation, bool bSweep, FHitResult &OutHit, ETeleportType Teleport=ETeleportType::None) |
| Calls MoveUpdatedComponent(), handling initial penetrations by calling ResolvePenetration(). 更多... | |
| virtual void | Serialize (FArchive &Ar) override |
| Handles reading, writing, and reference collecting using FArchive. 更多... | |
| virtual void | SetPlaneConstraintAxisSetting (EPlaneConstraintAxisSetting NewAxisSetting) |
| Set the plane constraint axis setting. 更多... | |
| virtual void | SetPlaneConstraintEnabled (bool bEnabled) |
| Sets whether or not the plane constraint is enabled. | |
| virtual void | SetPlaneConstraintFromVectors (FVector Forward, FVector Up) |
| Uses the Forward and Up vectors to compute the plane that constrains movement, enforced if the plane constraint is enabled. | |
| virtual void | SetPlaneConstraintNormal (FVector PlaneNormal) |
| Sets the normal of the plane that constrains movement, enforced if the plane constraint is enabled. 更多... | |
| virtual void | SetPlaneConstraintOrigin (FVector PlaneOrigin) |
| Sets the origin of the plane that constrains movement, enforced if the plane constraint is enabled. | |
| virtual void | SetUpdatedComponent (USceneComponent *NewUpdatedComponent) |
| Assign the component we move and update. | |
| virtual bool | ShouldSkipUpdate (float DeltaTime) const |
| Possibly skip update if moved component is not rendered or can't move. 更多... | |
| virtual float | SlideAlongSurface (const FVector &Delta, float Time, const FVector &Normal, FHitResult &Hit, bool bHandleImpact=false) |
| Slide smoothly along a surface, and slide away from multiple impacts using TwoWallAdjust if necessary. 更多... | |
| virtual void | SnapUpdatedComponentToPlane () |
| Snap the updated component to the plane constraint, if enabled. | |
| virtual void | StopMovementImmediately () |
| Stops movement immediately (zeroes velocity, usually zeros acceleration for components with acceleration). | |
| virtual void | TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override |
| Function called every frame on this ActorComponent. 更多... | |
| virtual void | TwoWallAdjust (FVector &Delta, const FHitResult &Hit, const FVector &OldHitNormal) const |
| Compute a movement direction when contacting two surfaces. 更多... | |
| virtual void | UpdateComponentVelocity () |
| Update ComponentVelocity of UpdatedComponent. 更多... | |
| virtual void | UpdateTickRegistration () |
| Update tick registration state, determined by bAutoUpdateTickRegistration. 更多... | |
Public 成员函数 继承自 UActorComponent | |
| virtual void | Activate (bool bReset=false) |
| Activates the SceneComponent, should be overridden by native child classes. 更多... | |
| virtual UObject const * | AdditionalStatObject () const |
| Give a readable name for this component, including asset name if applicable | |
| virtual void | AddTickPrerequisiteActor (AActor *PrerequisiteActor) |
| Make this component tick after PrerequisiteActor | |
| virtual void | AddTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent) |
| Make this component tick after PrerequisiteComponent. | |
| FORCEINLINE bool | AllowReregistration () const |
| Check whether the component class allows reregistration during ReregisterAllComponents | |
| virtual void | ApplyWorldOffset (const FVector &InOffset, bool bWorldShift) |
| Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location 更多... | |
| virtual void | BeginDestroy () override |
| Called before destroying the object. 更多... | |
| virtual void | BeginPlay () |
| Begins Play for the component. 更多... | |
| virtual bool | CallRemoteFunction (UFunction *Function, void *Parameters, FOutParmRec *OutParms, FFrame *Stack) override |
| Call the actor's function remotely 更多... | |
| bool | CanEverAffectNavigation () const |
| Can this component potentially influence navigation | |
| void | ClearNeedEndOfFrameUpdate () |
| If we belong to a world, clear the request to do a deferred update. | |
| bool | ComponentHasTag (FName Tag) const |
| See if this component contains the supplied tag | |
| bool | ComponentIsInLevel (const class ULevel *TestLevel) const |
| Returns true if this actor is contained by TestLevel. | |
| bool | ComponentIsInPersistentLevel (bool bIncludeLevelStreamingPersistent) const |
| See if this component is in the persistent level | |
| void | CreatePhysicsState (bool bAllowDeferral=false) |
| Create any physics engine information for this component | |
| virtual void | Deactivate () |
| Deactivates the SceneComponent. | |
| virtual void | DestroyComponent (bool bPromoteChildren=false) |
| Unregister the component, remove it from its outer Actor's Components array and mark for pending kill. | |
| void | DestroyPhysicsState () |
| Shut down any physics engine structure for this component | |
| void | DetermineUCSModifiedProperties () |
| Initializes the list of properties that are modified by the UserConstructionScript | |
| void | DoDeferredRenderUpdates_Concurrent () |
| Uses the bRenderStateDirty/bRenderTransformDirty to perform any necessary work on this component. 更多... | |
| virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) |
| Ends gameplay for this component. 更多... | |
| virtual bool | GetComponentClassCanReplicate () const |
| Returns true if this type of component can ever replicate, override to disable the default behavior | |
| virtual TStructOnScope< FActorComponentInstanceData > | GetComponentInstanceData () const |
| Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation | |
| ULevel * | GetComponentLevel () const |
| Return the ULevel that this Component is part of. | |
| float | GetComponentTickInterval () const |
| Returns the tick interval for this component's primary tick function, which is the frequency in seconds at which it will be executed | |
| virtual int32 | GetFunctionCallspace (UFunction *Function, FFrame *Stack) override |
| Return the space this function should be called. 更多... | |
| FORCEINLINE bool | GetIsReplicated () const |
| Returns whether replication is enabled or not. | |
| virtual void | GetLifetimeReplicatedProps (TArray< FLifetimeProperty > &OutLifetimeProps) const override |
| Returns properties that are replicated for the lifetime of the actor channel | |
| uint32 | GetMarkedForEndOfFrameUpdateState () const |
| Tracks whether the component has been added to one of the world's end of frame update lists | |
| uint32 | GetMarkedForPreEndOfFrameSync () const |
| Tracks whether the component has been added to one of the world's end of frame update lists | |
| ENetMode | GetNetMode () const |
| Get the network mode (dedicated server, client, standalone, etc) for this component. 更多... | |
| AActor * | GetOwner () const |
| Follow the Outer chain to get the AActor that 'Owns' this component | |
| template<class T > | |
| T * | GetOwner () const |
| Templated version of GetOwner(), will return nullptr if cast fails | |
| ENetRole | GetOwnerRole () const |
| Get the network role of the Owner, or ROLE_None if there is no owner. | |
| virtual FString | GetReadableName () const |
| Returns a readable name for this component, including the asset name if applicable By default this appends a space plus AdditionalStatObject() | |
| class FSceneInterface * | GetScene () const |
| Returns the rendering scene associated with this component | |
| void | GetUCSModifiedProperties (TSet< const FProperty * > &ModifiedProperties) const |
| Returns the list of properties that are modified by the UserConstructionScript | |
| int32 | GetUCSSerializationIndex () const |
| Returns the UCS serialization index. 更多... | |
| virtual UWorld * | GetWorld () const override final |
| Getter for the cached world pointer, will return null if the component is not actually spawned in a level | |
| bool | HasBeenCreated () const |
| Indicates that OnCreatedComponent has been called, but OnDestroyedComponent has not yet | |
| bool | HasBeenInitialized () const |
| Indicates that InitializeComponent has been called, but UninitializeComponent has not yet | |
| bool | HasBegunPlay () const |
| Indicates that BeginPlay has been called, but EndPlay has not yet | |
| virtual void | InitializeComponent () |
| Initializes the component. 更多... | |
| void | InvalidateLightingCache () |
| Invalidate lighting cache with default options. | |
| virtual void | InvalidateLightingCacheDetailed (bool bInvalidateBuildEnqueuedLighting, bool bTranslationOnly) |
| Called when this actor component has moved, allowing it to discard statically cached lighting information. | |
| bool | IsActive () const |
| Returns whether the component is active or not 更多... | |
| bool | IsBeingDestroyed () const |
| Returns whether the component is in the process of being destroyed. | |
| virtual bool | IsComponentTickEnabled () const |
| Returns whether this component has tick enabled or not | |
| bool | IsCreatedByConstructionScript () const |
| Returns true if instances of this component are created by either the user or simple construction script | |
| bool | IsEditableWhenInherited () const |
| True if this component can be modified when it was inherited from a parent actor class | |
| virtual bool | IsNameStableForNetworking () const override |
| IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network | |
| virtual bool | IsNavigationRelevant () const |
| Override to specify that a component is relevant to the navigation system | |
| bool | IsNetMode (ENetMode Mode) const |
| Test whether net mode is the given mode. 更多... | |
| bool | IsNetSimulating () const |
| Returns true if we are replicating and this client is not authoritative | |
| bool | IsNetStartupComponent () const |
| Returns true if this component was owned by a net startup actor during level load. | |
| bool | IsOwnerRunningUserConstructionScript () const |
| See if the owning Actor is currently running the UCS | |
| bool | IsOwnerSelected () const |
| Returns whether the component's owner is selected in the editor | |
| bool | IsPhysicsStateCreated () const |
| Returns true if the physics 'state' (e.g. 更多... | |
| virtual bool | IsReadyForOwnerToAutoDestroy () const |
| Overridable check for a component to indicate to its Owner that it should prevent the Actor from auto destroying when finished | |
| FORCEINLINE bool | IsRegistered () const |
| See if this component is currently registered | |
| bool | IsRenderStateCreated () const |
| Returns true if the render 'state' (e.g. 更多... | |
| bool | IsRenderStateDirty () const |
| Is this component in need of its whole state being sent to the renderer? | |
| bool | IsRenderTransformDirty () const |
| Is this component's transform in need of sending to the renderer? | |
| virtual bool | IsSupportedForNetworking () const override |
| IsSupportedForNetworking means an object can be referenced over the network | |
| void | K2_DestroyComponent (UObject *Object) |
| Unregister and mark for pending kill a component. 更多... | |
| void | MarkForNeededEndOfFrameRecreate () |
| If we belong to a world, mark this for a deferred update, otherwise do it now. | |
| void | MarkForNeededEndOfFrameUpdate () |
| If we belong to a world, mark this for a deferred update, otherwise do it now. | |
| void | MarkRenderDynamicDataDirty () |
| Indicate that dynamic data for this component needs to be sent at the end of the frame. | |
| void | MarkRenderStateDirty () |
| Mark the render state as dirty - will be sent to the render thread at the end of the frame. | |
| void | MarkRenderTransformDirty () |
| Marks the transform as dirty - will be sent to the render thread at the end of the frame | |
| virtual bool | NeedsLoadForClient () const override |
| Called during saving to determine the load flags to save with the object. 更多... | |
| virtual bool | NeedsLoadForEditorGame () const override |
| Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. 更多... | |
| virtual bool | NeedsLoadForServer () const override |
| Called during saving to determine the load flags to save with the object. 更多... | |
| virtual void | OnActorEnableCollisionChanged () |
| Called on each component when the Actor's bEnableCollisionChanged flag changes | |
| virtual void | OnComponentCreated () |
| Called when a component is created (not loaded). 更多... | |
| virtual void | OnComponentDestroyed (bool bDestroyingHierarchy) |
| Called when a component is destroyed 更多... | |
| virtual void | OnEndOfFrameUpdateDuringTick () |
| Allows components to handle an EOF update happening mid tick. 更多... | |
| virtual void | OnPreEndOfFrameSync () |
| Allows components to wait on outstanding tasks prior to sending EOF update data. 更多... | |
| virtual void | OnRep_IsActive () |
| Handles replication of active state, handles ticking by default but should be overridden as needed | |
| virtual void | PostInitProperties () override |
| Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多... | |
| virtual void | PostLoad () override |
| Do any object-specific cleanup required immediately after loading an object. 更多... | |
| virtual void | PostRename (UObject *OldOuter, const FName OldName) override |
| Called at the end of Rename(), but only if the rename was actually carried out | |
| virtual void | PreReplication (IRepChangedPropertyTracker &ChangedPropertyTracker) |
| Called on the component right before replication occurs | |
| void | ReceiveBeginPlay () |
| Blueprint implementable event for when the component is beginning play, called before its owning actor's BeginPlay or when the component is dynamically created if the Actor has already BegunPlay. | |
| void | ReceiveEndPlay (EEndPlayReason::Type EndPlayReason) |
| Blueprint implementable event for when the component ends play, generally via destruction or its Actor's EndPlay. | |
| void | ReceiveTick (float DeltaSeconds) |
| Event called every frame if tick is enabled | |
| void | RecreatePhysicsState () |
| Recreate the physics state right way. | |
| void | RecreateRenderState_Concurrent () |
| Recreate the render state right away. 更多... | |
| void | RegisterAllComponentTickFunctions (bool bRegister) |
| When called, will call the virtual call chain to register all of the tick functions Do not override this function or make it virtual 更多... | |
| void | RegisterComponent () |
| Register this component, creating any rendering/physics state. 更多... | |
| void | RegisterComponentWithWorld (UWorld *InWorld, FRegisterComponentContext *Context=nullptr) |
| Registers a component with a specific world, which creates any visual/physical state 更多... | |
| virtual void | RemoveTickPrerequisiteActor (AActor *PrerequisiteActor) |
| Remove tick dependency on PrerequisiteActor. | |
| virtual void | RemoveTickPrerequisiteComponent (UActorComponent *PrerequisiteComponent) |
| Remove tick dependency on PrerequisiteComponent. | |
| void | RemoveUCSModifiedProperties (const TArray< FProperty * > &Properties) |
| Removes specified properties from the list of UCS-modified properties | |
| virtual bool | Rename (const TCHAR *NewName=NULL, UObject *NewOuter=NULL, ERenameFlags Flags=REN_None) override |
| Rename this object to a unique name, or change its outer. 更多... | |
| virtual bool | ReplicateSubobjects (class UActorChannel *Channel, class FOutBunch *Bunch, FReplicationFlags *RepFlags) |
| Allows a component to replicate other subobject on the actor | |
| virtual bool | RequiresGameThreadEndOfFrameRecreate () const |
| return true if this component requires end of frame recreates to happen from the game thread. | |
| virtual bool | RequiresGameThreadEndOfFrameUpdates () const |
| return true if this component requires end of frame updates to happen from the game thread. | |
| virtual bool | RequiresPreEndOfFrameSync () const |
| return true if this component needs to sync to tasks before end of frame updates are executed | |
| void | ReregisterComponent () |
| Unregisters and immediately re-registers component. | |
| virtual void | Serialize (FArchive &Ar) override |
| Handles reading, writing, and reference collecting using FArchive. 更多... | |
| virtual void | SetActive (bool bNewActive, bool bReset=false) |
| Sets whether the component is active or not 更多... | |
| void | SetActiveFlag (const bool bNewIsActive) |
| Sets the value of bIsActive without causing other side effects to this instance. 更多... | |
| virtual void | SetAutoActivate (bool bNewAutoActivate) |
| Sets whether the component should be auto activate or not. 更多... | |
| void | SetCanEverAffectNavigation (bool bRelevant) |
| set value of bCanEverAffectNavigation flag and update navigation octree if needed | |
| virtual void | SetComponentTickEnabled (bool bEnabled) |
| Set this component's tick functions to be enabled or disabled. 更多... | |
| virtual void | SetComponentTickEnabledAsync (bool bEnabled) |
| Spawns a task on GameThread that will call SetComponentTickEnabled 更多... | |
| void | SetComponentTickInterval (float TickInterval) |
| Sets the tick interval for this component's primary tick function. 更多... | |
| void | SetComponentTickIntervalAndCooldown (float TickInterval) |
| Sets the tick interval for this component's primary tick function. 更多... | |
| void | SetIsNetStartupComponent (const bool bInIsNetStartupComponent) |
| This should only be called by the engine in ULevel::InitializeNetworkActors to initialize bIsNetStartupComponent. | |
| void | SetIsReplicated (bool ShouldReplicate) |
| Enable or disable replication. 更多... | |
| void | SetNetAddressable () |
| This signifies the component can be ID'd by name over the network. 更多... | |
| void | SetTickableWhenPaused (bool bTickableWhenPaused) |
| Sets whether this component can tick when paused. | |
| void | SetTickGroup (ETickingGroup NewTickGroup) |
| Changes the ticking group for this component | |
| bool | SetupActorComponentTickFunction (struct FTickFunction *TickFunction) |
| Set up a tick function for a component in the standard way. 更多... | |
| virtual void | TickComponent (float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) |
| Function called every frame on this ActorComponent. 更多... | |
| virtual void | ToggleActive () |
| Toggles the active state of the component | |
| UActorComponent (const FObjectInitializer &ObjectInitializer=FObjectInitializer::Get()) | |
| Default UObject constructor that takes an optional ObjectInitializer. | |
| virtual void | UninitializeComponent () |
| Handle this component being Uninitialized. 更多... | |
| void | UnregisterComponent () |
| Unregister this component, destroying any rendering/physics state. | |
| virtual void | UpdateComponentToWorld (EUpdateTransformFlags UpdateTransformFlags=EUpdateTransformFlags::None, ETeleportType Teleport=ETeleportType::None) |
| Recalculate the value of our component to world transform | |
Public 成员函数 继承自 UObject | |
| void | AbortInsideMemberFunction () const |
| Abort with a member function call at the top of the callstack, helping to ensure that most platforms will stuff this object's memory into the resulting minidump. | |
| virtual bool | AreNativePropertiesIdenticalTo (UObject *Other) const |
| Returns whether native properties are identical to the one of the passed in component. 更多... | |
| virtual void | BeginDestroy () |
| Called before destroying the object. 更多... | |
| virtual void | BuildSubobjectMapping (UObject *OtherObject, TMap< UObject *, UObject * > &ObjectMapping) const |
| Given OtherObject (which will be the same type as 'this'), recursively find any matching sub-objects from 'this' that also exist within OtherObject, and add the mappings to ObjectMapping. 更多... | |
| void | CallAddReferencedObjects (FReferenceCollector &Collector) |
| Helper function to call AddReferencedObjects for this object's class. 更多... | |
| void | CallFunction (FFrame &Stack, RESULT_DECL, UFunction *Function) |
| Internal VM method for executing a function | |
| bool | CallFunctionByNameWithArguments (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor, bool bForceCallWithNonExec=false) |
| Handle calling a function by name when executed from the console or a command line | |
| virtual bool | CallRemoteFunction (UFunction *Function, void *Parms, struct FOutParmRec *OutParms, FFrame *Stack) |
| Call the actor's function remotely 更多... | |
| bool | CheckDefaultSubobjects (bool bForceCheck=false) const |
| Checks default sub-object assumptions. 更多... | |
| void | CollectDefaultSubobjects (TArray< UObject * > &OutDefaultSubobjects, bool bIncludeNestedSubobjects=false) const |
| Uses the TArchiveObjectReferenceCollector to build a list of all components referenced by this object which have this object as the outer 更多... | |
| bool | ConditionalBeginDestroy () |
| Called before destroying the object. 更多... | |
| bool | ConditionalFinishDestroy () |
| Called when an object is actually destroyed, memory should never be accessed again | |
| void | ConditionalPostLoad () |
| PostLoad if needed. | |
| void | ConditionalPostLoadSubobjects (struct FObjectInstancingGraph *OuterInstanceGraph=NULL) |
| Instances subobjects and components for objects being loaded from disk, if necessary. 更多... | |
| DECLARE_FUNCTION (execBreakpoint) | |
| Breakpoint; only observed in the editor; executing it at any other time is a NOP | |
| DECLARE_FUNCTION (execInstrumentation) | |
| Instrumentation event for profiling; only observed in the builds with blueprint instrumentation | |
| DECLARE_FUNCTION (execPopExecutionFlow) | |
| Pops a code offset from the execution flow stack and starts execution there. 更多... | |
| DECLARE_FUNCTION (execPopExecutionFlowIfNot) | |
| Pops a code offset from the execution flow stack and starts execution there, if a condition is not true. 更多... | |
| DECLARE_FUNCTION (execPushExecutionFlow) | |
| Push a code offset onto the execution flow stack for future execution. 更多... | |
| DECLARE_FUNCTION (execReturnNothing) | |
| failsafe for functions that return a value - returns the zero value for a property and logs that control reached the end of a non-void function | |
| DECLARE_FUNCTION (execTracepoint) | |
| Tracepoint; only observed in the editor; executing it at any other time is a NOP | |
| DECLARE_FUNCTION (ProcessInternal) | |
| Internal function call processing. 更多... | |
| void | DestroyNonNativeProperties () |
| Destroy properties that won't be destroyed by the native destructor | |
| void | ExecuteUbergraph (int32 EntryPoint) |
| Execute the ubergraph from a specific entry point | |
| virtual void | ExportCustomProperties (FOutputDevice &Out, uint32 Indent) |
| Exports the property values for the specified object as text to the output device. 更多... | |
| UFunction * | FindFunction (FName InName) const |
| Returns a UFunction with the specified name, wrapper for UClass::FindFunctionByName() | |
| UFunction * | FindFunctionChecked (FName InName) const |
| Version of FindFunction() that will assert if the function was not found | |
| virtual void | FinishDestroy () |
| Called to finish destroying the object. 更多... | |
| UObject * | GetArchetype () const |
| Return the template this object is based on. 更多... | |
| void | GetArchetypeInstances (TArray< UObject * > &Instances) |
| Builds a list of objects which have this object in their archetype chain. 更多... | |
| virtual void | GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const |
| Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects 更多... | |
| virtual const TCHAR * | GetConfigOverridePlatform () const |
| Returns the override config hierarchy platform (if NDAd platforms need defaults to not be in Base*.ini but still want editor to load them) | |
| FString | GetDefaultConfigFilename () const |
| Get the default config filename for the specified UObject | |
| virtual FString | GetDesc () |
| Return a one line description of an object for viewing in the thumbnail view of the generic browser | |
| FString | GetDetailedInfo () const |
| This will return detail info about this specific object. 更多... | |
| virtual FName | GetExporterName (void) |
| Returns the name of the exporter factory used to export this object Used when multiple factories have the same extension | |
| virtual int32 | GetFunctionCallspace (UFunction *Function, FFrame *Stack) |
| Return the space this function should be called. 更多... | |
| FString | GetGlobalUserConfigFilename () const |
| Get the global user override config filename for the specified UObject | |
| virtual void | GetLifetimeReplicatedProps (TArray< class FLifetimeProperty > &OutLifetimeProps) const |
| Returns properties that are replicated for the lifetime of the actor channel | |
| virtual bool | GetNativePropertyValues (TMap< FString, FString > &out_PropertyValues, uint32 ExportFlags=0) const |
| Callback for retrieving a textual representation of natively serialized properties. 更多... | |
| virtual int32 | GetNetPushIdDynamic () const |
| Should only ever be used by internal systems. | |
| virtual void | GetPreloadDependencies (TArray< UObject * > &OutDeps) |
| Called during cooking. 更多... | |
| virtual void | GetPrestreamPackages (TArray< UObject * > &OutPrestream) |
| Called during cooking. 更多... | |
| virtual FPrimaryAssetId | GetPrimaryAssetId () const |
| Returns an Type:Name pair representing the PrimaryAssetId for this object. 更多... | |
| FString | GetProjectUserConfigFilename () const |
| Get the project user override config filename for the specified UObject | |
| SIZE_T | GetResourceSizeBytes (EResourceSizeMode::Type Mode) |
| Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the simple version which just returns the total number of bytes used by this object. 更多... | |
| virtual void | GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) |
| Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多... | |
| virtual FRestoreForUObjectOverwrite * | GetRestoreForUObjectOverwrite () |
| Save information for StaticAllocateObject in the case of overwriting an existing object. 更多... | |
| virtual UScriptStruct * | GetSparseClassDataStruct () const |
| Return the UStruct corresponding to the sidecar data structure that stores data that is constant for all instances of this class. | |
| virtual void | GetSubobjectsWithStableNamesForNetworking (TArray< UObject * > &ObjList) |
| Returns a list of sub-objects that have stable names for networking | |
| template<class T > | |
| FORCEINLINE bool | Implements () const |
| Returns true if this object implements the interface T, false otherwise. | |
| template<class T > | |
| bool | Implements () const |
| Returns true if this object implements the interface T, false otherwise. | |
| virtual void | ImportCustomProperties (const TCHAR *SourceText, FFeedbackContext *Warn) |
| Exports the property values for the specified object as text to the output device. 更多... | |
| void | InstanceSubobjectTemplates (struct FObjectInstancingGraph *InstanceGraph=NULL) |
| Wrapper for calling UClass::InstanceSubobjectTemplates() for this object. | |
| virtual bool | IsAsset () const |
| Returns true if this object is considered an asset. | |
| bool | IsBasedOnArchetype (const UObject *const SomeObject) const |
| Determine if this object has SomeObject in its archetype chain. | |
| virtual bool | IsDestructionThreadSafe () const |
| Called during garbage collection to determine if an object can have its destructor called on a worker thread. 更多... | |
| virtual bool | IsEditorOnly () const |
| Called during saving to determine if the object is forced to be editor only or not 更多... | |
| virtual bool | IsFullNameStableForNetworking () const |
| IsFullNameStableForNetworking means an object can be referred to its full path name over the network | |
| bool | IsInBlueprint () const |
| Returns whether this object is contained in or part of a blueprint object | |
| virtual bool | IsLocalizedResource () const |
| Returns true if this object is considered a localized resource. | |
| virtual bool | IsNameStableForNetworking () const |
| IsNameStableForNetworking means an object can be referred to its path name (relative to outer) over the network | |
| virtual bool | IsPostLoadThreadSafe () const |
| Called during async load to determine if PostLoad can be called on the loading thread. 更多... | |
| virtual bool | IsReadyForAsyncPostLoad () const |
| Called before calling PostLoad() in FAsyncPackage::PostLoadObjects(). 更多... | |
| virtual bool | IsReadyForFinishDestroy () |
| Called to check if the object is ready for FinishDestroy. 更多... | |
| virtual bool | IsSafeForRootSet () const |
| Returns true if this object is safe to add to the root set. | |
| bool | IsSelected () const |
| Test the selection state of a UObject 更多... | |
| virtual bool | IsSupportedForNetworking () const |
| IsSupportedForNetworking means an object can be referenced over the network | |
| void | LoadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL) |
| Imports property values from an .ini file. 更多... | |
| virtual void | MarkAsEditorOnlySubobject () |
| Called during subobject creation to mark this component as editor only, which causes it to get stripped in packaged builds | |
| FORCEINLINE bool | Modify (bool bAlwaysMarkDirty=true) |
| Note that the object will be modified. 更多... | |
| virtual bool | NeedsLoadForClient () const |
| Called during saving to determine the load flags to save with the object. 更多... | |
| virtual bool | NeedsLoadForEditorGame () const |
| Called during saving to include this object in client/servers running in editor builds, even if they wouldn't normally be. 更多... | |
| virtual bool | NeedsLoadForServer () const |
| Called during saving to determine the load flags to save with the object. 更多... | |
| virtual bool | NeedsLoadForTargetPlatform (const class ITargetPlatform *TargetPlatform) const |
| Called during saving to determine the load flags to save with the object. 更多... | |
| void | OutputReferencers (FOutputDevice &Ar, FReferencerInformationList *Referencers=NULL) |
| Outputs a string to an arbitrary output device, describing the list of objects which are holding references to this one. 更多... | |
| virtual void | OverridePerObjectConfigSection (FString &SectionName) |
| Allows PerObjectConfig classes, to override the ini section name used for the PerObjectConfig object. 更多... | |
| void | ParseParms (const TCHAR *Parms) |
| Import an object from a file. | |
| virtual void | PostCDOContruct () |
| Called after the C++ constructor has run on the CDO for a class. 更多... | |
| virtual void | PostDuplicate (bool bDuplicateForPIE) |
| Called after duplication & serialization and before PostLoad. 更多... | |
| virtual void | PostEditImport () |
| Called after importing property values for this object (paste, duplicate or .t3d import) Allow the object to perform any cleanup for properties which shouldn't be duplicated or are unsupported by the script serialization | |
| virtual void | PostInitProperties () |
| Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多... | |
| virtual void | PostInterpChange (FProperty *PropertyThatChanged) |
| This is called when property is modified by InterpPropertyTracks 更多... | |
| virtual void | PostLoad () |
| Do any object-specific cleanup required immediately after loading an object. 更多... | |
| virtual void | PostLoadSubobjects (FObjectInstancingGraph *OuterInstanceGraph) |
| Instances components for objects being loaded from disk, if necessary. 更多... | |
| virtual void | PostNetReceive () |
| Called right after receiving a bunch | |
| virtual void | PostReloadConfig (class FProperty *PropertyThatWasLoaded) |
| Called from ReloadConfig after the object has reloaded its configuration data. | |
| virtual void | PostRename (UObject *OldOuter, const FName OldName) |
| Called at the end of Rename(), but only if the rename was actually carried out | |
| virtual void | PostRepNotifies () |
| Called right after calling all OnRep notifies (called even when there are no notifies) | |
| virtual void | PostSaveRoot (bool bCleanupIsRequired) |
| Called from within SavePackage on the passed in base/root object. 更多... | |
| virtual void | PreDestroyFromReplication () |
| Called right before being marked for destruction due to network replication | |
| virtual void | PreDuplicate (FObjectDuplicationParameters &DupParams) |
| Called before duplication. 更多... | |
| virtual void | PreNetReceive () |
| Called right before receiving a bunch | |
| virtual void | PreSave (const class ITargetPlatform *TargetPlatform) |
| Presave function. 更多... | |
| virtual bool | PreSaveRoot (const TCHAR *Filename) |
| Called from within SavePackage on the passed in base/root object. 更多... | |
| virtual bool | ProcessConsoleExec (const TCHAR *Cmd, FOutputDevice &Ar, UObject *Executor) |
| This function handles a console exec sent to the object; it is virtual so 'nexus' objects like a player controller can reroute the command to several different objects. | |
| virtual void | ProcessEvent (UFunction *Function, void *Parms) |
| Called by VM to execute a UFunction with a filled in UStruct of parameters | |
| virtual UClass * | RegenerateClass (UClass *ClassToRegenerate, UObject *PreviousCDO) |
| Called on the target when a class is loaded with ClassGeneratedBy is loaded. 更多... | |
| void | ReinitializeProperties (UObject *SourceObject=NULL, struct FObjectInstancingGraph *InstanceGraph=NULL) |
| Wrapper function for InitProperties() which handles safely tearing down this object before re-initializing it from the specified source object. 更多... | |
| void | ReloadConfig (UClass *ConfigClass=NULL, const TCHAR *Filename=NULL, uint32 PropagationFlags=UE4::LCPF_None, class FProperty *PropertyToLoad=NULL) |
| Wrapper method for LoadConfig that is used when reloading the config data for objects at runtime which have already loaded their config data at least once. 更多... | |
| virtual bool | Rename (const TCHAR *NewName=nullptr, UObject *NewOuter=nullptr, ERenameFlags Flags=REN_None) |
| Rename this object to a unique name, or change its outer. 更多... | |
| void | RetrieveReferencers (TArray< FReferencerInformation > *OutInternalReferencers, TArray< FReferencerInformation > *OutExternalReferencers) |
| Called by OutputReferencers() to get the internal list of referencers to write | |
| void | SaveConfig (uint64 Flags=CPF_Config, const TCHAR *Filename=NULL, FConfigCacheIni *Config=GConfig, bool bAllowCopyToDefaultObject=true) |
| Save configuration out to ini files 更多... | |
| virtual void | Serialize (FArchive &Ar) |
| Handles reading, writing, and reference collecting using FArchive. 更多... | |
| void | SerializeScriptProperties (FArchive &Ar) const |
| Serializes the script property data located at Data. 更多... | |
| void | SerializeScriptProperties (FStructuredArchive::FSlot Slot) const |
| Serializes the script property data located at Data. 更多... | |
| void | SetLinker (FLinkerLoad *LinkerLoad, int32 LinkerIndex, bool bShouldDetachExisting=true) |
| Changes the linker and linker index to the passed in one. 更多... | |
| virtual void | ShutdownAfterError () |
| After a critical error, perform any mission-critical cleanup, such as restoring the video mode orreleasing hardware resources. | |
| void | SkipFunction (FFrame &Stack, RESULT_DECL, UFunction *Function) |
| advances Stack's code past the parameters to the given Function and if the function has a return value, copies the zero value for that property to the memory for the return value 更多... | |
| virtual void | TagSubobjects (EObjectFlags NewFlags) |
| Tags objects that are part of the same asset with the specified object flag, used for GC checking 更多... | |
| void | UpdateDefaultConfigFile (const FString &SpecificFileLocation="") |
| Saves just the section(s) for this class into the default ini file for the class (with just the changes from base) | |
| void | UpdateGlobalUserConfigFile () |
| Saves just the section(s) for this class into the global user ini file for the class (with just the changes from base) | |
| void | UpdateProjectUserConfigFile () |
| Saves just the section(s) for this class into the project user ini file for the class (with just the changes from base) | |
| void | UpdateSinglePropertyInConfigFile (const FProperty *InProperty, const FString &InConfigIniName) |
| Saves just the property into the global user ini file for the class (with just the changes from base) | |
Public 成员函数 继承自 UObjectBaseUtility | |
| void | AddToCluster (UObjectBaseUtility *ClusterRootOrObjectFromCluster, bool bAddAsMutableObject=false) |
| Adds this objects to a GC cluster that already exists 更多... | |
| FORCEINLINE void | AddToRoot () |
| Add an object to the root set. 更多... | |
| FORCEINLINE void | AppendName (FString &ResultString) const |
| Optimized version of GetName that appends to an existing string | |
| FORCEINLINE bool | AtomicallyClearInternalFlags (EInternalObjectFlags FlagsToClear) const |
| Atomically clears passed in internal flags. 更多... | |
| virtual bool | CanBeClusterRoot () const |
| Called after load to determine if the object can be a cluster root 更多... | |
| virtual bool | CanBeInCluster () const |
| Called during cluster construction if the object can be added to a cluster 更多... | |
| FORCEINLINE void | ClearFlags (EObjectFlags NewFlags) |
| Clears subset of flags for a specific object | |
| FORCEINLINE void | ClearInternalFlags (EInternalObjectFlags FlagsToClear) const |
| Clears passed in internal flags. 更多... | |
| FORCEINLINE void | ClearPendingKill () |
| Unmarks this object as PendingKill. | |
| virtual void | CreateCluster () |
| Called after PostLoad to create UObject cluster | |
| void | DetachExternalPackage () |
| Utility function to temporarily detach the object external package, if any GetPackage will report the outer's package once detached | |
| const UClass * | FindNearestCommonBaseClass (const UClass *TestClass) const |
| Finds the most-derived class which is a parent of both TestClass and this object's class. 更多... | |
| FORCEINLINE EObjectMark | GetAllMarks () const |
| Returns all of the object marks on a specific object 更多... | |
| FString | GetFullGroupName (bool bStartWithOuter) const |
| Walks up the chain of packages until it reaches the top level, which it ignores. 更多... | |
| void | GetFullName (const UObject *StopOuter, FString &ResultString, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const |
| Version of GetFullName() that eliminates unnecessary copies. | |
| FString | GetFullName (const UObject *StopOuter=NULL, EObjectFullNameFlags Flags=EObjectFullNameFlags::None) const |
| Returns the fully qualified pathname for this object as well as the name of the class, in the format: 'ClassName Outermost[.Outer].Name'. 更多... | |
| void * | GetInterfaceAddress (UClass *InterfaceClass) |
| Returns a pointer to this object safely converted to a pointer of the specified interface class. 更多... | |
| FORCEINLINE EInternalObjectFlags | GetInternalFlags () const |
| Gets internal flags. 更多... | |
| class FLinkerLoad * | GetLinker () const |
| Returns the linker for this object. 更多... | |
| int32 | GetLinkerCustomVersion (FGuid CustomVersionKey) const |
| Returns the custom version of the linker for this object corresponding to the given custom version key. 更多... | |
| int32 | GetLinkerIndex () const |
| Returns this object's LinkerIndex. 更多... | |
| int32 | GetLinkerLicenseeUE4Version () const |
| Returns the licensee version of the linker for this object. 更多... | |
| int32 | GetLinkerUE4Version () const |
| Returns the UE4 version of the linker for this object. 更多... | |
| FORCEINLINE EObjectFlags | GetMaskedFlags (EObjectFlags Mask=RF_AllFlags) const |
| Returns object flags that are both in the mask and set on the object. 更多... | |
| FORCEINLINE FString | GetName () const |
| Returns the name of this object (with no path information) 更多... | |
| FORCEINLINE void | GetName (FString &ResultString) const |
| Optimized version of GetName that overwrites an existing string | |
| void * | GetNativeInterfaceAddress (UClass *InterfaceClass) |
| Returns a pointer to the I* native interface object that this object implements. 更多... | |
| const void * | GetNativeInterfaceAddress (UClass *InterfaceClass) const |
| Returns a pointer to the const I* native interface object that this object implements. 更多... | |
| UPackage * | GetOutermost () const |
| Legacy function, has the same behavior as GetPackage use GetPackage instead. 更多... | |
| UObject * | GetOutermostObject () const |
| Walks up the list of outers until it finds the top-level one that isn't a package. 更多... | |
| UPackage * | GetPackage () const |
| Walks up the list of outers until it finds a package directly associated with the object. 更多... | |
| void | GetPathName (const UObject *StopOuter, FString &ResultString) const |
| Versions of GetPathName() that eliminates unnecessary copies and allocations. | |
| FString | GetPathName (const UObject *StopOuter=NULL) const |
| Returns the fully qualified pathname for this object, in the format: 'Outermost[.Outer].Name' 更多... | |
| FORCEINLINE TStatId | GetStatID (bool bForDeferredUse=false) const |
| Returns the stat ID of the object, used for profiling. 更多... | |
| template<typename T > | |
| T * | GetTypedOuter () const |
| Traverses the outer chain searching for the next object of a certain type. 更多... | |
| UObject * | GetTypedOuter (UClass *Target) const |
| Traverses the outer chain searching for the next object of a certain type. 更多... | |
| FORCEINLINE bool | HasAllFlags (EObjectFlags FlagsToCheck) const |
| Used to safely check whether all of the passed in flags are set. 更多... | |
| FORCEINLINE bool | HasAllMarks (EObjectMark Marks) const |
| Tests an object for having ALL of a set of marks 更多... | |
| FORCEINLINE bool | HasAnyFlags (EObjectFlags FlagsToCheck) const |
| Used to safely check whether any of the passed in flags are set. 更多... | |
| FORCEINLINE bool | HasAnyInternalFlags (EInternalObjectFlags FlagsToCheck) const |
| Used to safely check whether any of the passed in internal flags are set. 更多... | |
| FORCEINLINE bool | HasAnyMarks (EObjectMark Marks) const |
| Tests an object for having ANY of a set of marks 更多... | |
| template<class T > | |
| bool | IsA () const |
| Returns true if this object is of the template type. | |
| template<typename OtherClassType > | |
| FORCEINLINE bool | IsA (OtherClassType SomeBase) const |
| Returns true if this object is of the specified type. | |
| bool | IsDefaultSubobject () const |
| Returns whether this component was instanced from a component/subobject template, or if it is a component/subobject template. 更多... | |
| bool | IsIn (const UObject *SomeOuter) const |
Return the dispatch to IsInOuter or IsInPackage depending on SomeOuter's class. 更多... | |
| bool | IsIn (const UPackage *SomePackage) const |
| Overload to determine if an object is in the specified package which can now be different than its outer chain. 更多... | |
| bool | IsInA (const UClass *SomeBaseClass) const |
| Find out if this object is inside (has an outer) that is of the specified class 更多... | |
| bool | IsInOuter (const UObject *SomeOuter) const |
| Returns true if the object is contained in the specified outer. | |
| bool | IsInPackage (const UPackage *SomePackage) const |
| Returns true if the object is contained in the specified package. | |
| FORCEINLINE bool | IsNative () const |
| Checks if the object is native. | |
| FORCEINLINE bool | IsPendingKill () const |
| Checks the PendingKill flag to see if it is dead but memory still valid | |
| FORCEINLINE bool | IsPendingKillOrUnreachable () const |
| Checks if the object is pending kill or unreachable. | |
| FORCEINLINE bool | IsRooted () const |
| Returns true if this object is explicitly rooted 更多... | |
| bool | IsTemplate (EObjectFlags TemplateTypes=RF_ArchetypeObject|RF_ClassDefaultObject) const |
| Determines whether this object is a template object 更多... | |
| FORCEINLINE bool | IsUnreachable () const |
| Checks if the object is unreachable. | |
| FORCEINLINE void | Mark (EObjectMark Marks) const |
| Adds marks to an object 更多... | |
| bool | MarkPackageDirty () const |
| Finds the outermost package and marks it dirty. 更多... | |
| FORCEINLINE void | MarkPendingKill () |
| Marks this object as RF_PendingKill. | |
| virtual void | OnClusterMarkedAsPendingKill () |
| Called during Garbage Collection to perform additional cleanup when the cluster is about to be destroyed due to PendingKill flag being set on it. | |
| FORCEINLINE bool | operator< (const UObjectBaseUtility &Other) const |
| Overloaded < operator. 更多... | |
| void | ReattachExternalPackage () |
| Utility function to reattach the object external package, if any GetPackage will report the object external package if set after this call | |
| FORCEINLINE void | RemoveFromRoot () |
| Remove an object from the root set. | |
| bool | RootPackageHasAnyFlags (uint32 CheckFlagMask) const |
| Checks whether this object's top-most package has any of the specified flags 更多... | |
| FORCEINLINE void | SetFlags (EObjectFlags NewFlags) |
| Modifies object flags for a specific object | |
| FORCEINLINE void | SetInternalFlags (EInternalObjectFlags FlagsToSet) const |
| Clears passed in internal flags. 更多... | |
| FORCEINLINE bool | ThisThreadAtomicallyClearedRFUnreachable () |
| Atomically clear the unreachable flag 更多... | |
| FORCEINLINE void | UnMark (EObjectMark Marks) const |
| Removes marks from and object 更多... | |
Public 成员函数 继承自 UObjectBase | |
| FORCENOINLINE void | AtomicallyClearFlags (EObjectFlags FlagsToClear) |
| Atomically clears the specified flags. 更多... | |
| FORCENOINLINE void | AtomicallySetFlags (EObjectFlags FlagsToAdd) |
| Atomically adds the specified flags. 更多... | |
| FORCEINLINE UClass * | GetClass () const |
| Returns the UClass that defines the fields of this object | |
| UPackage * | GetExternalPackage () const |
| Returns the external UPackage associated with this object, if any | |
| UPackage * | GetExternalPackageInternal () const |
| Returns the external UPackage for this object, if any, NOT THREAD SAFE, used by internal gc reference collecting. | |
| FORCEINLINE EObjectFlags | GetFlags () const |
| Retrieve the object flags directly 更多... | |
| FORCEINLINE FName | GetFName () const |
| Returns the logical name of this object | |
| FORCEINLINE UObject * | GetOuter () const |
| Returns the UObject this object resides in | |
| FORCEINLINE uint32 | GetUniqueID () const |
| Returns the unique ID of the object...these are reused so it is only unique while the object is alive. 更多... | |
| bool | IsValidLowLevel () const |
| Checks to see if the object appears to be valid 更多... | |
| bool | IsValidLowLevelFast (bool bRecursive=true) const |
| Faster version of IsValidLowLevel. 更多... | |
| void | SetExternalPackage (UPackage *InPackage) |
| Associate an external package directly to this object. | |
| UObjectBase (UClass *InClass, EObjectFlags InFlags, EInternalObjectFlags InInternalFlags, UObject *InOuter, FName InName) | |
| Constructor used by StaticAllocateObject 更多... | |
| virtual | ~UObjectBase () |
| Final destructor, removes the object from the object array, and indirectly, from any annotations | |
Public 属性 | |
| float | AirControl |
| When falling, amount of lateral movement control available to the character. 更多... | |
| float | AirControlBoostMultiplier |
| When falling, multiplier applied to AirControl when lateral velocity is less than AirControlBoostVelocityThreshold. 更多... | |
| float | AirControlBoostVelocityThreshold |
| When falling, if lateral velocity magnitude is less than this value, AirControl is multiplied by AirControlBoostMultiplier. 更多... | |
| FVector | AnimRootMotionVelocity |
| Velocity extracted from RootMotionParams when there is anim root motion active. 更多... | |
| FNavAvoidanceMask | AvoidanceGroup |
| Moving actor's group mask | |
| int32 | AvoidanceUID |
| No default value, for now it's assumed to be valid if GetAvoidanceManager() returns non-NULL. | |
| float | AvoidanceWeight |
| De facto default value 0.5 (due to that being the default in the avoidance registration function), indicates RVO behavior. | |
| uint8 | bAlwaysCheckFloor:1 |
| Whether we always force floor checks for stationary Characters while walking. 更多... | |
| uint8 | bApplyGravityWhileJumping:1 |
| Apply gravity while the character is actively jumping (e.g. 更多... | |
| uint8 | bCanWalkOffLedges:1 |
| If true, Character can walk off a ledge. | |
| uint8 | bCanWalkOffLedgesWhenCrouching:1 |
| If true, Character can walk off a ledge when crouching. | |
| uint8 | bCheatFlying:1 |
| Instantly stop when in flying mode and no acceleration is being applied. | |
| uint8 | bCrouchMaintainsBaseLocation:1 |
| If true, crouching should keep the base of the capsule in place by lowering the center of the shrunken capsule. 更多... | |
| uint8 | bDeferUpdateMoveComponent:1 |
| true to update CharacterOwner and UpdatedComponent after movement ends | |
| uint8 | bEnablePhysicsInteraction:1 |
| If enabled, the player will interact with physics objects when walking into them. | |
| uint8 | bEnableScopedMovementUpdates:1 |
| If true, high-level movement updates will be wrapped in a movement scope that accumulates updates and defers a bulk of the work until the end. 更多... | |
| uint8 | bEnableServerDualMoveScopedMovementUpdates: 1 |
| Optional scoped movement update to combine moves for cheaper performance on the server when the client sends two moves in one packet. 更多... | |
| uint8 | bFastAttachedMove:1 |
| Set this to true if riding on a moving base that you know is clear from non-moving world obstructions. 更多... | |
| uint8 | bForceMaxAccel:1 |
| Ignores size of acceleration component, and forces max acceleration to drive character at full velocity. | |
| uint8 | bForceNextFloorCheck:1 |
| Force the Character in MOVE_Walking to do a check for a valid floor even if he hasn't moved. 更多... | |
| uint8 | bIgnoreBaseRotation:1 |
| Whether the character ignores changes in rotation of the base it is standing on. 更多... | |
| uint8 | bIgnoreClientMovementErrorChecksAndCorrection:1 |
| If true, we should ignore server location difference checks for client error on this movement component. 更多... | |
| uint8 | bImpartBaseAngularVelocity:1 |
| If true, impart the base component's tangential components of angular velocity when jumping or falling off it. 更多... | |
| uint8 | bImpartBaseVelocityX:1 |
| If true, impart the base actor's X velocity when falling off it (which includes jumping) | |
| uint8 | bImpartBaseVelocityY:1 |
| If true, impart the base actor's Y velocity when falling off it (which includes jumping) | |
| uint8 | bImpartBaseVelocityZ:1 |
| If true, impart the base actor's Z velocity when falling off it (which includes jumping) | |
| uint8 | bIsNavWalkingOnServer: 1 |
| Set on clients when server's movement mode is NavWalking | |
| uint8 | bJustTeleported:1 |
| Used by movement code to determine if a change in position is based on normal movement or a teleport. 更多... | |
| uint8 | bMaintainHorizontalGroundVelocity:1 |
| If true, walking movement always maintains horizontal velocity when moving up ramps, which causes movement up ramps to be faster parallel to the ramp surface. 更多... | |
| uint8 | bNetworkAlwaysReplicateTransformUpdateTimestamp:1 |
| Flag used on the server to determine whether to always replicate ReplicatedServerLastTransformUpdateTimeStamp to clients. 更多... | |
| uint8 | bNetworkLargeClientCorrection:1 |
| Flag indicating the client correction was larger than NetworkLargeClientCorrectionThreshold. | |
| uint8 | bNetworkMovementModeChanged:1 |
| True when the networked movement mode has been replicated. | |
| uint8 | bNetworkSkipProxyPredictionOnNetUpdate:1 |
| Whether we skip prediction on frames where a proxy receives a network update. 更多... | |
| uint8 | bNetworkSmoothingComplete:1 |
| Signals that smoothed position/rotation has reached target, and no more smoothing is necessary until a future update. 更多... | |
| uint8 | bNetworkUpdateReceived:1 |
| True when a network replication update is received for simulated proxies. | |
| uint8 | bNotifyApex:1 |
| If true, event NotifyJumpApex() to CharacterOwner's controller when at apex of jump. 更多... | |
| uint8 | bOrientRotationToMovement:1 |
| If true, rotate the Character toward the direction of acceleration, using RotationRate as the rate of rotation change. 更多... | |
| uint8 | bPerformingJumpOff:1 |
| Used to prevent reentry of JumpOff() | |
| uint8 | bPushForceScaledToMass:1 |
| If enabled, the PushForceFactor is applied per kg mass of the affected object. | |
| uint8 | bPushForceUsingZOffset:1 |
| If enabled, the PushForce location is moved using PushForcePointZOffsetFactor. 更多... | |
| float | BrakingDecelerationFalling |
| Lateral deceleration when falling and not applying acceleration. 更多... | |
| float | BrakingDecelerationFlying |
| Deceleration when flying and not applying acceleration. 更多... | |
| float | BrakingDecelerationSwimming |
| Deceleration when swimming and not applying acceleration. 更多... | |
| float | BrakingDecelerationWalking |
| Deceleration when walking and not applying acceleration. 更多... | |
| float | BrakingFriction |
| Friction (drag) coefficient applied when braking (whenever Acceleration = 0, or if character is exceeding max speed); actual value used is this multiplied by BrakingFrictionFactor. 更多... | |
| float | BrakingFrictionFactor |
| Factor used to multiply actual value of friction used when braking. 更多... | |
| float | BrakingSubStepTime |
| Time substepping when applying braking friction. 更多... | |
| uint8 | bRequestedMoveUseAcceleration:1 |
| Should use acceleration for path following? If true, acceleration is applied when path following to reach the target velocity. 更多... | |
| uint8 | bRunPhysicsWithNoController:1 |
| If true, movement will be performed even if there is no Controller for the Character owner. 更多... | |
| uint8 | bScalePushForceToVelocity:1 |
| If enabled, the applied push force will try to get the physics object to the same velocity than the player, not faster. 更多... | |
| uint8 | bServerAcceptClientAuthoritativePosition: 1 |
| If true, and server does not detect client position error, server will copy the client movement location/velocity/etc after simulating the move. 更多... | |
| uint8 | bShrinkProxyCapsule:1 |
| If true, the capsule needs to be shrunk on this simulated proxy, to avoid replication rounding putting us in geometry. 更多... | |
| uint8 | bSweepWhileNavWalking:1 |
| Whether or not the character should sweep for collision geometry while walking. 更多... | |
| uint8 | bTouchForceScaledToMass:1 |
| If enabled, the TouchForceFactor is applied per kg mass of the affected object. | |
| float | Buoyancy |
| Water buoyancy. 更多... | |
| uint8 | bUseControllerDesiredRotation:1 |
| If true, smoothly rotate the Character toward the Controller's desired rotation (typically Controller->ControlRotation), using RotationRate as the rate of rotation change. 更多... | |
| uint8 | bUseFlatBaseForFloorChecks:1 |
| Performs floor checks as if the character is using a shape with a flat base. 更多... | |
| uint8 | bUseRVOAvoidance:1 |
| If set, component will use RVO avoidance. 更多... | |
| uint8 | bUseSeparateBrakingFriction:1 |
| If true, BrakingFriction will be used to slow the character to a stop (when there is no Acceleration). 更多... | |
| uint8 | bWantsToCrouch:1 |
| If true, try to crouch (or keep crouching) on next update. 更多... | |
| uint8 | bWantsToLeaveNavWalking:1 |
| Used to safely leave NavWalking movement mode | |
| uint8 | bWasSimulatingRootMotion:1 |
| True when SimulatedProxies are simulating RootMotion | |
| FNavLocation | CachedNavLocation |
| last known location projected on navmesh, used by NavWalking mode | |
| FHitResult | CachedProjectedNavMeshHitResult |
| Last valid projected hit result from raycast to geometry from navmesh | |
| float | CrouchedHalfHeight |
| Collision half-height when crouching (component scale is applied separately) | |
| FFindFloorResult | CurrentFloor |
| Information about the floor the Character is standing on (updated only during walking movement). | |
| FRootMotionSourceGroup | CurrentRootMotion |
| Root Motion Group containing active root motion sources being applied to movement | |
| uint8 | CustomMovementMode |
| Current custom sub-mode if MovementMode is set to Custom. 更多... | |
| TEnumAsByte< enum EMovementMode > | DefaultLandMovementMode |
| Default movement mode when not in water. 更多... | |
| TEnumAsByte< enum EMovementMode > | DefaultWaterMovementMode |
| Default movement mode when in water. 更多... | |
| USceneComponent * | DeferredUpdatedMoveComponent |
| What to update CharacterOwner and UpdatedComponent after movement ends | |
| float | FallingLateralFriction |
| Friction to apply to lateral air movement when falling. 更多... | |
| float | GravityScale |
| Custom gravity scale. 更多... | |
| float | GroundFriction |
| Setting that affects movement control. 更多... | |
| FNavAvoidanceMask | GroupsToAvoid |
| Will avoid other agents if they are in one of specified groups | |
| FNavAvoidanceMask | GroupsToIgnore |
| Will NOT avoid other agents if they are in one of specified groups, higher priority than GroupsToAvoid | |
| float | InitialPushForceFactor |
| Initial impulse force to apply when the player bounces into a blocking physics object. | |
| float | JumpOffJumpZFactor |
| Fraction of JumpZVelocity to use when automatically "jumping off" of a base actor that's not allowed to be a base for a character. 更多... | |
| float | JumpOutOfWaterPitch |
| When exiting water, jump if control pitch angle is this high or above. | |
| float | JumpZVelocity |
| Initial velocity (instantaneous vertical acceleration) when jumping. | |
| float | LedgeCheckThreshold |
| Used in determining if pawn is going off ledge. 更多... | |
| float | ListenServerNetworkSimulatedSmoothLocationTime |
| Similar setting as NetworkSimulatedSmoothLocationTime but only used on Listen servers. | |
| float | ListenServerNetworkSimulatedSmoothRotationTime |
| Similar setting as NetworkSimulatedSmoothRotationTime but only used on Listen servers. | |
| float | Mass |
| Mass of pawn (for when momentum is imparted to it). | |
| float | MaxAcceleration |
| Max Acceleration (rate of change of velocity) | |
| float | MaxCustomMovementSpeed |
| The maximum speed when using Custom movement mode. | |
| float | MaxDepenetrationWithGeometry |
| Max distance we allow simulated proxies to depenetrate when moving out of anything but Pawns. 更多... | |
| float | MaxDepenetrationWithGeometryAsProxy |
| Max distance we allow simulated proxies to depenetrate when moving out of anything but Pawns. 更多... | |
| float | MaxDepenetrationWithPawn |
| Max distance we are allowed to depenetrate when moving out of other Pawns. 更多... | |
| float | MaxDepenetrationWithPawnAsProxy |
| Max distance we allow simulated proxies to depenetrate when moving out of other Pawns. 更多... | |
| float | MaxFlySpeed |
| The maximum flying speed. | |
| int32 | MaxJumpApexAttemptsPerSimulation |
| Max number of attempts per simulation to attempt to exactly reach the jump apex when falling movement reaches the top of the arc. 更多... | |
| float | MaxOutOfWaterStepHeight |
| Maximum step height for getting out of water | |
| int32 | MaxSimulationIterations |
| Max number of iterations used for each discrete simulation step. 更多... | |
| float | MaxSimulationTimeStep |
| Max time delta for each discrete simulation step. 更多... | |
| float | MaxStepHeight |
| Maximum height character can step up | |
| float | MaxSwimSpeed |
| The maximum swimming speed. | |
| float | MaxTouchForce |
| Maximum force applied to touched physics objects. 更多... | |
| float | MaxWalkSpeed |
| The maximum ground speed when walking. 更多... | |
| float | MaxWalkSpeedCrouched |
| The maximum ground speed when walking and crouched. | |
| float | MinAnalogWalkSpeed |
| The ground speed that we should accelerate up to when walking at minimum analog stick tilt | |
| float | MinTimeBetweenTimeStampResets |
| Minimum time between client TimeStamp resets. 更多... | |
| float | MinTouchForce |
| Minimum Force applied to touched physics objects. 更多... | |
| TEnumAsByte< enum EMovementMode > | MovementMode |
| Actor's current movement mode (walking, falling, etc). 更多... | |
| float | NavMeshProjectionHeightScaleDown |
| Scale of the total capsule height to use for projection from navmesh to underlying geometry in the downward direction. 更多... | |
| float | NavMeshProjectionHeightScaleUp |
| Scale of the total capsule height to use for projection from navmesh to underlying geometry in the upward direction. 更多... | |
| float | NavMeshProjectionInterpSpeed |
| Speed at which to interpolate agent navmesh offset between traces. 更多... | |
| float | NavMeshProjectionInterval |
| How often we should raycast to project from navmesh to underlying geometry | |
| float | NavWalkingFloorDistTolerance |
| Ignore small differences in ground height between server and client data during NavWalking mode | |
| float | NetProxyShrinkHalfHeight |
| Shrink simulated proxy capsule half height by this amount, to account for network rounding that may cause encroachment. 更多... | |
| float | NetProxyShrinkRadius |
| Shrink simulated proxy capsule radius by this amount, to account for network rounding that may cause encroachment. 更多... | |
| float | NetworkLargeClientCorrectionDistance |
| If client error is larger than this, sets bNetworkLargeClientCorrection to reduce delay between client adjustments. 更多... | |
| float | NetworkMaxSmoothUpdateDistance |
| Maximum distance character is allowed to lag behind server location when interpolating between updates. | |
| float | NetworkMinTimeBetweenClientAckGoodMoves |
| Minimum time on the server between acknowledging good client moves. 更多... | |
| float | NetworkMinTimeBetweenClientAdjustments |
| Minimum time on the server between sending client adjustments when client has exceeded allowable position error. 更多... | |
| float | NetworkMinTimeBetweenClientAdjustmentsLargeCorrection |
| Minimum time on the server between sending client adjustments when client has exceeded allowable position error by a large amount (NetworkLargeClientCorrectionDistance). 更多... | |
| float | NetworkNoSmoothUpdateDistance |
| Maximum distance beyond which character is teleported to the new server location without any smoothing. | |
| float | NetworkSimulatedSmoothLocationTime |
| How long to take to smoothly interpolate from the old pawn position on the client to the corrected one sent by the server. 更多... | |
| float | NetworkSimulatedSmoothRotationTime |
| How long to take to smoothly interpolate from the old pawn rotation on the client to the corrected one sent by the server. 更多... | |
| ENetworkSmoothingMode | NetworkSmoothingMode |
| Smoothing mode for simulated proxies in network game. | |
| FVector | OldBaseLocation |
| Saved location of object we are standing on, for UpdateBasedMovement() to determine if base moved in the last frame, and therefore pawn needs an update. | |
| FQuat | OldBaseQuat |
| Saved location of object we are standing on, for UpdateBasedMovement() to determine if base moved in the last frame, and therefore pawn needs an update. | |
| float | OutofWaterZ |
| Z velocity applied when pawn tries to get out of water | |
| FVector | PendingLaunchVelocity |
| Temporarily holds launch velocity when pawn is to be launched so it happens at end of movement. | |
| float | PerchAdditionalHeight |
| When perching on a ledge, add this additional distance to MaxStepHeight when determining how high above a walkable floor we can perch. 更多... | |
| float | PerchRadiusThreshold |
| Don't allow the character to perch on the edge of a surface if the contact is this close to the edge of the capsule. 更多... | |
| struct FCharacterMovementComponentPostPhysicsTickFunction | PostPhysicsTickFunction |
| Post-physics tick function for this character | |
| float | PushForceFactor |
| Force to apply when the player collides with a blocking physics object. | |
| float | PushForcePointZOffsetFactor |
| Z-Offset for the position the force is applied to. 更多... | |
| float | RepulsionForce |
| Force per kg applied constantly to all overlapping components. | |
| FVector | RequestedVelocity |
| Velocity requested by path following. 更多... | |
| FRootMotionMovementParams | RootMotionParams |
| Animation root motion (special case for now) 更多... | |
| FRotator | RotationRate |
| Change in rotation per second, used when UseControllerDesiredRotation or OrientRotationToMovement are true. 更多... | |
| float | StandingDownwardForceScale |
| Force applied to objects we stand on (due to Mass and Gravity) is scaled by this amount. | |
| float | TouchForceFactor |
| Force to apply to physics objects that are touched by the player. | |
Public 属性 继承自 UNavMovementComponent | |
| FMovementProperties | MovementState |
| Expresses runtime state of character's movement. 更多... | |
Public 属性 继承自 UMovementComponent | |
| uint8 | bAutoRegisterPhysicsVolumeUpdates:1 |
| If true, then applies the value of bComponentShouldUpdatePhysicsVolume to the UpdatedComponent. 更多... | |
| uint8 | bAutoRegisterUpdatedComponent:1 |
| If true, registers the owner's Root component as the UpdatedComponent if there is not one currently assigned. | |
| uint8 | bAutoUpdateTickRegistration:1 |
| If true, whenever the updated component is changed, this component will enable or disable its tick dependent on whether it has something to update. 更多... | |
| uint8 | bComponentShouldUpdatePhysicsVolume:1 |
| If true, enables bShouldUpdatePhysicsVolume on the UpdatedComponent during initialization from SetUpdatedComponent(), otherwise disables such updates. 更多... | |
| uint8 | bConstrainToPlane:1 |
| If true, movement will be constrained to a plane. 更多... | |
| uint8 | bSnapToPlaneAtStart:1 |
| If true and plane constraints are enabled, then the updated component will be snapped to the plane when first attached. | |
| uint8 | bTickBeforeOwner:1 |
| If true, after registration we will add a tick dependency to tick before our owner (if we can both tick). 更多... | |
| uint8 | bUpdateOnlyIfRendered:1 |
| If true, skips TickComponent() if UpdatedComponent was not recently rendered. | |
Public 属性 继承自 UActorComponent | |
| uint8 | bAllowAnyoneToDestroyMe:1 |
| Can this component be destroyed (via K2_DestroyComponent) by any parent | |
| uint8 | bAllowConcurrentTick:1 |
| Can we tick this concurrently on other threads? | |
| uint8 | bAutoActivate:1 |
| Whether the component is activated at creation or must be explicitly activated. | |
| uint8 | bAutoRegister:1 |
| Does this component automatically register with its owner | |
| uint8 | bEditableWhenInherited:1 |
| True if this component can be modified when it was inherited from a parent actor class | |
| uint8 | bIsEditorOnly:1 |
| If true, the component will be excluded from non-editor builds | |
| uint8 | bNavigationRelevant: 1 |
| Cached navigation relevancy flag for collision updates | |
| uint8 | bNeverNeedsRenderUpdate:1 |
| If true, this component never needs a render update. | |
| uint8 | bTickInEditor:1 |
| Should this component be ticked in the editor | |
| uint8 | bWantsInitializeComponent:1 |
| If true, we call the virtual InitializeComponent | |
| TArray< FName > | ComponentTags |
| Array of tags that can be used for grouping and categorizing. 更多... | |
| EComponentCreationMethod | CreationMethod |
| Describes how a component instance will be created | |
| FActorComponentActivatedSignature | OnComponentActivated |
| Called when the component has been activated, with parameter indicating if it was from a reset | |
| FActorComponentDeactivateSignature | OnComponentDeactivated |
| Called when the component has been deactivated | |
| struct FActorComponentTickFunction | PrimaryComponentTick |
| Main tick function for the Component | |
静态 Public 属性 | |
| static const float | BRAKE_TO_STOP_VELOCITY |
| Stop completely when braking and velocity magnitude is lower than this. | |
| static const float | MAX_FLOOR_DIST |
| Maximum acceptable distance for Character capsule to float above floor when walking. | |
| static const float | MIN_FLOOR_DIST |
| Minimum acceptable distance for Character capsule to float above floor when walking. | |
| static const float | MIN_TICK_TIME |
| Minimum delta time considered when ticking. 更多... | |
| static const float | SWEEP_EDGE_REJECT_DISTANCE |
| Reject sweep impacts that are this close to the edge of the vertical portion of the capsule when performing vertical sweeps, and try again with a smaller capsule. | |
静态 Public 属性 继承自 UActorComponent | |
| static const FString | ComponentTemplateNameSuffix |
| Prefix used to identify template component instances | |
| static FActorComponentGlobalCreatePhysicsSignature | GlobalCreatePhysicsDelegate |
| Create component physics state global delegate. | |
| static FActorComponentGlobalDestroyPhysicsSignature | GlobalDestroyPhysicsDelegate |
| Destroy component physics state global delegate. | |
| static FOnMarkRenderStateDirty | MarkRenderStateDirtyEvent |
| Called When render state is marked dirty | |
Protected 成员函数 | |
| virtual void | AdjustProxyCapsuleSize () |
| Adjust the size of the capsule on simulated proxies, to avoid overlaps due to replication rounding. 更多... | |
| virtual void | ApplyImpactPhysicsForces (const FHitResult &Impact, const FVector &ImpactAcceleration, const FVector &ImpactVelocity) |
| Apply physics forces to the impacted component, if bEnablePhysicsInteraction is true. 更多... | |
| void | ApplyRootMotionToVelocity (float deltaTime) |
| Applies root motion from root motion sources to velocity (override and additive) | |
| virtual void | ApplyVelocityBraking (float DeltaTime, float Friction, float BrakingDeceleration) |
| Slows towards stop. | |
| virtual float | BoostAirControl (float DeltaTime, float TickAirControl, const FVector &FallAcceleration) |
| Increase air control if conditions of AirControlBoostMultiplier and AirControlBoostVelocityThreshold are met. 更多... | |
| virtual void | CallMovementUpdateDelegate (float DeltaSeconds, const FVector &OldLocation, const FVector &OldVelocity) |
| Internal function to call OnMovementUpdated delegate on CharacterOwner. | |
| virtual void | CallServerMove (const FSavedMove_Character *NewMove, const FSavedMove_Character *OldMove) |
| Call the appropriate replicated ServerMove() function to send a client player move to the server. | |
| virtual void | CallServerMovePacked (const FSavedMove_Character *NewMove, const FSavedMove_Character *PendingMove, const FSavedMove_Character *OldMove) |
| On the client, calls the ServerMovePacked_ClientSend() function with packed movement data. 更多... | |
| virtual bool | CanDelaySendingMove (const FSavedMovePtr &NewMove) |
| Return true if it is OK to delay sending this player movement to the server, in order to conserve bandwidth. | |
| virtual void | CapsuleTouched (UPrimitiveComponent *OverlappedComp, AActor *Other, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult) |
| Called when the collision capsule touches another primitive component | |
| virtual bool | ClientUpdatePositionAfterServerUpdate () |
| If bUpdatePosition is true, then replay any unacked moves. 更多... | |
| virtual float | ComputeAnalogInputModifier () const |
| Computes the analog input modifier based on current input vector and/or acceleration. | |
| virtual FVector | ComputeGroundMovementDelta (const FVector &Delta, const FHitResult &RampHit, const bool bHitFromLineTrace) const |
| Compute a vector of movement, given a delta and a hit result of the surface we are on. 更多... | |
| virtual FVector | ComputeSlideVector (const FVector &Delta, const float Time, const FVector &Normal, const FHitResult &Hit) const override |
| Calculate slide vector along a surface. 更多... | |
| virtual FVector | ConstrainInputAcceleration (const FVector &InputAcceleration) const |
| Enforce constraints on input given current state. 更多... | |
| virtual void | ControlledCharacterMove (const FVector &InputVector, float DeltaSeconds) |
| Updates acceleration and perform movement, called from the TickComponent on the authoritative side for controlled characters, or on the client for characters without a controller when either playing root motion or bRunPhysicsWithNoController is true. | |
| virtual void | FindBestNavMeshLocation (const FVector &TraceStart, const FVector &TraceEnd, const FVector &CurrentFeetLocation, const FVector &TargetNavLocation, FHitResult &OutHitResult) const |
| Performs trace for ProjectLocationFromNavMesh | |
| virtual float | GetClientNetSendDeltaTime (const APlayerController *PC, const FNetworkPredictionData_Client_Character *ClientData, const FSavedMovePtr &NewMove) const |
| Determine minimum delay between sending client updates to the server. 更多... | |
| FCharacterNetworkMoveData * | GetCurrentNetworkMoveData () const |
| Current move data being processed or handled. 更多... | |
| FCharacterMoveResponseDataContainer & | GetMoveResponseDataContainer () const |
| Get the struct used for server response RPC serialization. 更多... | |
| const class INavigationDataInterface * | GetNavData () const |
| Get Navigation data for the Character. 更多... | |
| FCharacterNetworkMoveDataContainer & | GetNetworkMoveDataContainer () const |
| Get the struct used for client to server move RPC serialization. 更多... | |
| FCollisionShape | GetPawnCapsuleCollisionShape (const EShrinkCapsuleExtent ShrinkMode, const float CustomShrinkAmount=0.f) const |
| Get the collision shape for the Pawn owner, possibly reduced in size depending on ShrinkMode. 更多... | |
| FVector | GetPawnCapsuleExtent (const EShrinkCapsuleExtent ShrinkMode, const float CustomShrinkAmount=0.f) const |
| Get the capsule extent for the Pawn owner, possibly reduced in size depending on ShrinkMode. 更多... | |
| virtual FVector | GetPenetrationAdjustment (const FHitResult &Hit) const override |
| Overridden to enforce max distances based on hit geometry. | |
| virtual void | HandleImpact (const FHitResult &Hit, float TimeSlice=0.f, const FVector &MoveDelta=FVector::ZeroVector) override |
| Handle a blocking impact. 更多... | |
| virtual FVector | HandleSlopeBoosting (const FVector &SlideResult, const FVector &Delta, const float Time, const FVector &Normal, const FHitResult &Hit) const |
| Limit the slide vector when falling if the resulting slide might boost the character faster upwards. 更多... | |
| bool | IsClientTimeStampValid (float TimeStamp, const FNetworkPredictionData_Server_Character &ServerData, bool &bTimeStampResetDetected) const |
| Internal const check for client timestamp validity without side-effects. 更多... | |
| virtual FVector | LimitAirControl (float DeltaTime, const FVector &FallAcceleration, const FHitResult &HitResult, bool bCheckForValidLandingSpot) |
| Limits the air control to use during falling movement, given an impact while falling. 更多... | |
| virtual void | MaintainHorizontalGroundVelocity () |
| Adjusts velocity when walking so that Z velocity is zero. 更多... | |
| virtual void | MoveAlongFloor (const FVector &InVelocity, float DeltaSeconds, FStepDownResult *OutStepDownResult=NULL) |
| Move along the floor, using CurrentFloor and ComputeGroundMovementDelta() to get a movement direction. 更多... | |
| virtual void | OnCharacterStuckInGeometry (const FHitResult *Hit) |
| Notification that the character is stuck in geometry. 更多... | |
| virtual void | OnClientCorrectionReceived (class FNetworkPredictionData_Client_Character &ClientData, float TimeStamp, FVector NewLocation, FVector NewVelocity, UPrimitiveComponent *NewBase, FName NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, uint8 ServerMovementMode) |
| Event notification when client receives correction data from the server, before applying the data. 更多... | |
| virtual void | OnClientTimeStampResetDetected () |
| Called by UCharacterMovementComponent::VerifyClientTimeStamp() when a client timestamp reset has been detected and is valid. | |
| virtual void | OnMovementModeChanged (EMovementMode PreviousMovementMode, uint8 PreviousCustomMode) |
| Called after MovementMode has changed. 更多... | |
| virtual void | OnMovementUpdated (float DeltaSeconds, const FVector &OldLocation, const FVector &OldVelocity) |
| Event triggered at the end of a movement update. 更多... | |
| virtual void | OnTimeDiscrepancyDetected (float CurrentTimeDiscrepancy, float LifetimeRawTimeDiscrepancy, float Lifetime, float CurrentMoveError) |
| Called by UCharacterMovementComponent::ProcessClientTimeStampForTimeDiscrepancy() (on server) when the time from client moves significantly differs from the server time, indicating potential time manipulation by clients (speed hacks, significant network issues, client performance problems) 更多... | |
| virtual void | OnUnableToFollowBaseMove (const FVector &DeltaPosition, const FVector &OldLocation, const FHitResult &MoveOnBaseHit) |
| Event triggered when we are moving on a base but we are not able to move the full DeltaPosition because something has blocked us. 更多... | |
| virtual void | PerformMovement (float DeltaTime) |
| Perform movement on an autonomous client | |
| virtual void | PhysCustom (float deltaTime, int32 Iterations) |
| virtual void | PhysFlying (float deltaTime, int32 Iterations) |
| virtual void | PhysNavWalking (float deltaTime, int32 Iterations) |
| virtual void | PhysSwimming (float deltaTime, int32 Iterations) |
| virtual void | PhysWalking (float deltaTime, int32 Iterations) |
| virtual void | ProcessClientTimeStampForTimeDiscrepancy (float ClientTimeStamp, FNetworkPredictionData_Server_Character &ServerData) |
| Processes client timestamps from ServerMoves, detects and protects against time discrepancy between client-reported times and server time Called by UCharacterMovementComponent::VerifyClientTimeStamp() for valid timestamps. | |
| virtual void | ProcessLanded (const FHitResult &Hit, float remainingTime, int32 Iterations) |
| Handle landing against Hit surface over remaingTime and iterations, calling SetPostLandedPhysics() and starting the new movement mode. | |
| virtual FVector | ProjectLocationFromNavMesh (float DeltaSeconds, const FVector &CurrentFeetLocation, const FVector &TargetNavLocation, float UpOffset, float DownOffset) |
| Attempts to better align navmesh walking characters with underlying geometry (sometimes navmesh can differ quite significantly from geometry). 更多... | |
| virtual void | ReplicateMoveToServer (float DeltaTime, const FVector &NewAcceleration) |
| Perform local movement and send the move to the server. | |
| virtual bool | ResolvePenetrationImpl (const FVector &Adjustment, const FHitResult &Hit, const FQuat &NewRotation) override |
| Overridden to set bJustTeleported to true, so we don't make incorrect velocity calculations based on adjusted movement. | |
| void | RestorePreAdditiveRootMotionVelocity () |
| Restores Velocity to LastPreAdditiveVelocity during Root Motion Phys*() function calls | |
| virtual FVector | ScaleInputAcceleration (const FVector &InputAcceleration) const |
| Scale input acceleration, based on movement acceleration rate. | |
| virtual bool | ServerCheckClientError (float ClientTimeStamp, float DeltaTime, const FVector &Accel, const FVector &ClientWorldLocation, const FVector &RelativeClientLocation, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| Check for Server-Client disagreement in position or other movement state important enough to trigger a client correction. 更多... | |
| virtual bool | ServerExceedsAllowablePositionError (float ClientTimeStamp, float DeltaTime, const FVector &Accel, const FVector &ClientWorldLocation, const FVector &RelativeClientLocation, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| Check position error within ServerCheckClientError(). 更多... | |
| virtual void | ServerMoveHandleClientError (float ClientTimeStamp, float DeltaTime, const FVector &Accel, const FVector &RelativeClientLocation, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| Have the server check if the client is outside an error tolerance, and queue a client adjustment if so. 更多... | |
| virtual bool | ServerShouldUseAuthoritativePosition (float ClientTimeStamp, float DeltaTime, const FVector &Accel, const FVector &ClientWorldLocation, const FVector &RelativeClientLocation, UPrimitiveComponent *ClientMovementBase, FName ClientBaseBoneName, uint8 ClientMovementMode) |
| If ServerCheckClientError() does not find an error, this determines if the server should also copy the client's movement params rather than keep the server sim result. | |
| void | SetCurrentNetworkMoveData (FCharacterNetworkMoveData *CurrentData) |
| Used internally to set the FCharacterNetworkMoveData currently being processed, either being serialized or replayed on the client, or being received and processed on the server. 更多... | |
| void | SetMoveResponseDataContainer (FCharacterMoveResponseDataContainer &PersistentDataStorage) |
| Set custom struct used for server response RPC serialization. 更多... | |
| virtual void | SetNavWalkingPhysics (bool bEnable) |
| Switch collision settings for NavWalking mode (ignore world collisions) | |
| void | SetNetworkMoveDataContainer (FCharacterNetworkMoveDataContainer &PersistentDataStorage) |
| Set custom struct used for client to server move RPC serialization. 更多... | |
| virtual void | SetPostLandedPhysics (const FHitResult &Hit) |
| Use new physics after landing. 更多... | |
| virtual bool | ShouldCancelAdaptiveReplication () const |
| On the server if we know we are having our replication rate throttled, this method checks if important replicated properties have changed that should cause us to return to the normal replication rate. | |
| virtual bool | ShouldComputeAccelerationToReachRequestedVelocity (const float RequestedSpeed) const |
| When a character requests a velocity (like when following a path), this method returns true if when we should compute the acceleration toward requested velocity (including friction). 更多... | |
| virtual void | SimulatedTick (float DeltaSeconds) |
| Special Tick for Simulated Proxies | |
| virtual void | SimulateMovement (float DeltaTime) |
| Simulate movement on a non-owning client. 更多... | |
| virtual float | SlideAlongSurface (const FVector &Delta, float Time, const FVector &Normal, FHitResult &Hit, bool bHandleImpact) override |
| Custom version of SlideAlongSurface that handles different movement modes separately; namely during walking physics we might not want to slide up slopes. | |
| virtual void | SmoothClientPosition (float DeltaSeconds) |
| Smooth mesh location for network interpolation, based on values set up by SmoothCorrection. 更多... | |
| void | SmoothClientPosition_Interpolate (float DeltaSeconds) |
| Update interpolation values for client smoothing. 更多... | |
| void | SmoothClientPosition_UpdateVisuals () |
| Update mesh location based on interpolated values. | |
| void | TickCharacterPose (float DeltaTime) |
| Ticks the characters pose and accumulates root motion | |
| virtual bool | TryToLeaveNavWalking () |
| Checks to see if the current location is not encroaching blocking geometry so the character can leave NavWalking. 更多... | |
| virtual void | TwoWallAdjust (FVector &Delta, const FHitResult &Hit, const FVector &OldHitNormal) const override |
| Custom version that allows upwards slides when walking if the surface is walkable. | |
| void | UpdateDefaultAvoidance () |
| called in Tick to update data in RVO avoidance manager | |
| virtual void | UpdateFromCompressedFlags (uint8 Flags) |
| Unpack compressed flags from a saved move and set state accordingly. 更多... | |
Protected 成员函数 继承自 UPawnMovementComponent | |
| void | MarkForClientCameraUpdate () |
| Attempts to mark the PlayerCameraManager as dirty. 更多... | |
Protected 成员函数 继承自 UMovementComponent | |
| FVector | GetPlaneConstraintNormalFromAxisSetting (EPlaneConstraintAxisSetting AxisSetting) const |
| Helper to compute the plane constraint axis from the current setting. 更多... | |
Protected 成员函数 继承自 UActorComponent | |
| virtual void | CreateRenderState_Concurrent (FRegisterComponentContext *Context) |
| Used to create any rendering thread information for this component 更多... | |
| virtual void | DestroyRenderState_Concurrent () |
| Used to shut down any rendering thread structure for this component 更多... | |
| void | HandleCanEverAffectNavigationChange (bool bForceUpdate=false) |
| Makes sure navigation system has up to date information regarding component's navigation relevancy and if it can affect navigation at all 更多... | |
| virtual bool | HasValidPhysicsState () const |
| Used to check that DestroyPhysicsState() is working correctly | |
| bool | NeedsInitialization () const |
| Convenience method for testing whether or not we are still be constructed / initialized. | |
| virtual void | OnCreatePhysicsState () |
| Used to create any physics engine information for this component | |
| virtual void | OnDestroyPhysicsState () |
| Used to shut down and physics engine structure for this component | |
| virtual void | OnRegister () |
| Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| virtual void | OnUnregister () |
| Called when a component is unregistered. 更多... | |
| bool | OwnerNeedsInitialization () const |
| Convenience method for testing whether or not our owner is still being constructed / initialized. | |
| virtual void | RegisterComponentTickFunctions (bool bRegister) |
| Virtual call chain to register all tick functions 更多... | |
| virtual void | SendRenderDynamicData_Concurrent () |
| Called to send dynamic data for this component to the rendering thread | |
| virtual void | SendRenderTransform_Concurrent () |
| Called to send a transform update for this component to the rendering thread 更多... | |
| void | SetIsReplicatedByDefault (const bool bNewReplicates) |
| Sets the value of bReplicates without causing other side effects to this instance. 更多... | |
| virtual bool | ShouldActivate () const |
| Return true if this component is in a state where it can be activated normally. | |
| virtual bool | ShouldCreatePhysicsState () const |
| Return true if CreatePhysicsState() should be called. 更多... | |
| virtual bool | ShouldCreateRenderState () const |
| Return true if CreateRenderState() should be called | |
Protected 成员函数 继承自 UObject | |
| bool | CanCheckDefaultSubObjects (bool bForceCheck, bool &bResult) const |
| Checks it's ok to perform subobjects check at this time. | |
| virtual bool | CheckDefaultSubobjectsInternal () const |
| Checks default sub-object assumptions. 更多... | |
| virtual FString | GetDetailedInfoInternal () const |
| This function actually does the work for the GetDetailedInfo() and is virtual. 更多... | |
Protected 成员函数 继承自 UObjectBase | |
| virtual void | DeferredRegister (UClass *UClassStaticClass, const TCHAR *PackageName, const TCHAR *Name) |
| Convert a boot-strap registered class into a real one, add to uobject array, etc 更多... | |
| void | LowLevelRename (FName NewName, UObject *NewOuter=NULL) |
| Just change the FName and Outer and rehash into name hash tables. 更多... | |
| void | Register (const TCHAR *PackageName, const TCHAR *Name) |
| Enqueue the registration for this object. | |
| virtual void | RegisterDependencies () |
| Force any base classes to be registered first | |
| FORCEINLINE void | SetFlagsTo (EObjectFlags NewFlags) |
| Set the object flags directly 更多... | |
| UObjectBase (EObjectFlags InFlags) | |
| Constructor used for bootstrapping 更多... | |
Protected 属性 | |
| FVector | Acceleration |
| Current acceleration vector (with magnitude). 更多... | |
| float | AnalogInputModifier |
| Modifier to applied to values such as acceleration and max speed due to analog input. | |
| float | AvoidanceLockTimer |
| remaining time of avoidance velocity lock | |
| FVector | AvoidanceLockVelocity |
| forced avoidance velocity, used when AvoidanceLockTimer is > 0 | |
| uint8 | bDeferUpdateBasedMovement: 1 |
| Flag set in pre-physics update to indicate that based movement should be updated post-physics | |
| uint8 | bHasRequestedVelocity:1 |
| Was velocity requested by path following? | |
| uint8 | bMovementInProgress:1 |
| True during movement update. 更多... | |
| uint8 | bProjectNavMeshOnBothWorldChannels: 1 |
| Use both WorldStatic and WorldDynamic channels for NavWalking geometry conforming | |
| uint8 | bProjectNavMeshWalking: 1 |
| Whether to raycast to underlying geometry to better conform navmesh-walking characters | |
| uint8 | bRequestedMoveWithMaxSpeed:1 |
| Was acceleration requested to be always max speed? | |
| uint8 | bUseRVOPostProcess: 1 |
| if set, PostProcessAvoidanceVelocity will be called | |
| uint8 | bWasAvoidanceUpdated: 1 |
| Was avoidance updated in this frame? | |
| ACharacter * | CharacterOwner |
| Character movement component belongs to | |
| float | LastStuckWarningTime |
| Used for throttling "stuck in geometry" logging. | |
| float | LastTimeStampResetServerTime |
| Clock time on the server of the last timestamp reset. | |
| FVector | LastUpdateLocation |
| Location after last PerformMovement or SimulateMovement update. 更多... | |
| FQuat | LastUpdateRotation |
| Rotation after last PerformMovement or SimulateMovement update. | |
| FVector | LastUpdateVelocity |
| Velocity after last PerformMovement or SimulateMovement update. 更多... | |
| int32 | NumJumpApexAttempts |
| Used to limit number of jump apex attempts per tick. 更多... | |
| FVector | PendingForceToApply |
| Accumulated force to be added next tick. | |
| FVector | PendingImpulseToApply |
| Accumulated impulse to be added next tick. | |
| float | ServerLastClientAdjustmentTime |
| Timestamp of last client adjustment sent. 更多... | |
| float | ServerLastClientGoodMoveAckTime |
| Timestamp of last client adjustment sent. 更多... | |
| float | ServerLastTransformUpdateTimeStamp |
| Timestamp when location or rotation last changed during an update. 更多... | |
| uint32 | StuckWarningCountSinceNotify |
| Used when throttling "stuck in geometry" logging, to output the number of events we skipped if throttling. | |
Protected 属性 继承自 UPawnMovementComponent | |
| class APawn * | PawnOwner |
| Pawn that owns this component. | |
Protected 属性 继承自 UNavMovementComponent | |
| uint8 | bStopMovementAbortPaths:1 |
| If set, StopActiveMovement call will abort current path following request | |
| uint8 | bUpdateNavAgentWithOwnersCollision:1 |
| If set to true NavAgentProps' radius and height will be updated with Owner's collision capsule size | |
| uint8 | bUseAccelerationForPaths: 1 |
| If set, pathfollowing will control character movement via acceleration values. 更多... | |
| uint8 | bUseFixedBrakingDistanceForPaths: 1 |
| If set, FixedPathBrakingDistance will be used for path following deceleration | |
| float | FixedPathBrakingDistance |
| Braking distance override used with acceleration driven path following (bUseAccelerationForPaths) | |
Protected 属性 继承自 UMovementComponent | |
| FVector | PlaneConstraintNormal |
| The normal or axis of the plane that constrains movement, if bConstrainToPlane is enabled. 更多... | |
| FVector | PlaneConstraintOrigin |
| The origin of the plane that constrains movement, if plane constraint is enabled. 更多... | |
Protected 属性 继承自 UActorComponent | |
| TArray< UAssetUserData * > | AssetUserData |
| Array of user data stored with the component | |
| uint8 | bAllowReregistration:1 |
| Check whether the component class allows reregistration during ReregisterAllComponents | |
| uint8 | bCanEverAffectNavigation: 1 |
| Whether this component can potentially influence navigation | |
| uint8 | bNetAddressable:1 |
| Is this component safe to ID over the network by name? | |
| uint8 | bPhysicsStateCreated:1 |
| If the physics state is currently created for this component | |
| uint8 | bRegistered:1 |
| Indicates if this ActorComponent is currently registered with a scene. | |
| uint8 | bRenderStateCreated:1 |
| If the render state is currently created for this component | |
额外继承的成员函数 | |
静态 Public 成员函数 继承自 UObject | |
| static void | AddReferencedObjects (UObject *InThis, FReferenceCollector &Collector) |
| Callback used to allow object register its direct object references that are not already covered by the token stream. 更多... | |
| static bool | CanCreateInCurrentContext (UObject *Template) |
| Determines if you can create an object from the supplied template in the current context (editor, client only, dedicated server, game/listen) This calls NeedsLoadForClient & NeedsLoadForServer | |
| static UObject * | GetArchetypeFromRequiredInfo (const UClass *Class, const UObject *Outer, FName Name, EObjectFlags ObjectFlags) |
| Return the template that an object with this class, outer and name would be 更多... | |
| static const FName & | SourceFileTagName () |
| Get the common tag name used for all asset source file import paths | |
| static void | UpdateClassesExcludedFromDedicatedClient (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames) |
| Update the list of classes that we should exclude from dedicated client builds | |
| static void | UpdateClassesExcludedFromDedicatedServer (const TArray< FString > &InClassNames, const TArray< FString > &InModulesNames) |
| Update the list of classes that we should exclude from dedicated server builds | |
静态 Public 成员函数 继承自 UObjectBase | |
| static void | EmitBaseReferences (UClass *RootClass) |
| Emit GC tokens for UObjectBase, this might be UObject::StaticClass or Default__Class | |
| static FString | RemoveClassPrefix (const TCHAR *ClassName) |
| Removes the class prefix from the given string | |
静态 Protected 成员函数 继承自 UActorComponent | |
| static const FName | GetReplicatesPropertyName () |
| Gets the property name for bReplicates. 更多... | |
静态 Protected 成员函数 继承自 UObjectBaseUtility | |
| static void | CreateClusterFromObject (UObjectBaseUtility *ClusterRootObject, UObjectBaseUtility *ReferencingObject) |
| Helper function to create a cluster from UObject | |
CharacterMovementComponent handles movement logic for the associated Character owner.
It supports various movement modes including: walking, falling, swimming, flying, custom.
Movement is affected primarily by current Velocity and Acceleration. Acceleration is updated each frame based on the input vector accumulated thus far (see UPawnMovementComponent::GetPendingInputVector()).
Networking is fully implemented, with server-client correction and prediction included.
|
virtual |
Add force to character.
Forces are accumulated each tick and applied together so multiple calls to this function will accumulate. Forces are scaled depending on timestep, so they can be applied each frame. If you want an instantaneous force, use AddImpulse. Adding a force always takes the actor's mass into account. Note that changing the momentum of characters like this can change the movement mode.
| Force | Force to apply. |
|
virtual |
Add impulse to character.
Impulses are accumulated each tick and applied together so multiple calls to this function will accumulate. An impulse is an instantaneous force, usually applied once. If you want to continually apply forces each frame, use AddForce(). Note that changing the momentum of characters like this can change the movement mode.
| Impulse | Impulse to apply. |
| bVelocityChange | Whether or not the impulse is relative to mass. |
|
overridevirtual |
Adds force from radial force components.
Intended to be overridden by subclasses; default implementation does nothing.
| Origin | The origin of the force |
| Radius | The radius in which the force will be applied |
| Strength | The strength of the force |
| Falloff | The falloff from the force's origin |
重载 UMovementComponent .
|
overridevirtual |
Adds impulse from radial force components.
Intended to be overridden by subclasses; default implementation does nothing.
| Origin | The origin of the force |
| Radius | The radius in which the force will be applied |
| Strength | The strength of the force |
| Falloff | The falloff from the force's origin |
| bVelChange | If true, the Strength is taken as a change in velocity instead of an impulse (ie. mass will have no effect). |
重载 UMovementComponent .
|
protectedvirtual |
Adjust the size of the capsule on simulated proxies, to avoid overlaps due to replication rounding.
Changes to the capsule size on the proxy should set bShrinkProxyCapsule=true and possibly call AdjustProxyCapsuleSize() immediately if applicable.
|
virtual |
Applies momentum accumulated through AddImpulse() and AddForce(), then clears those forces.
Does not use ClearAccumulatedForces() since that would clear pending launch velocity as well.
|
virtual |
Applies downward force when walking on top of physics objects.
| DeltaSeconds | Time elapsed since last frame. |
|
protectedvirtual |
Apply physics forces to the impacted component, if bEnablePhysicsInteraction is true.
| Impact | HitResult that resulted in the impact |
| ImpactAcceleration | Acceleration of the character at the time of impact |
| ImpactVelocity | Velocity of the character at the time of impact |
|
virtual |
Use velocity requested by path following to compute a requested acceleration and speed.
This does not affect the Acceleration member variable, as that is used to indicate input acceleration. This may directly affect current Velocity.
| DeltaTime | Time slice for this operation |
| MaxAccel | Max acceleration allowed in OutAcceleration result. |
| MaxSpeed | Max speed allowed when computing OutRequestedSpeed. |
| Friction | Current friction. |
| BrakingDeceleration | Current braking deceleration. |
| OutAcceleration | Acceleration computed based on requested velocity. |
| OutRequestedSpeed | Speed of resulting velocity request, which can affect the max speed allowed by movement. |
| uint16 UCharacterMovementComponent::ApplyRootMotionSource | ( | TSharedPtr< FRootMotionSource > | SourcePtr | ) |
Apply a RootMotionSource to current root motion
|
overridevirtual |
Called by owner actor on position shifting Component should update all relevant data structures to reflect new actor location
| InWorldOffset | Offset vector the actor shifted by |
| bWorldShift | Whether this call is part of whole world shifting |
重载 UActorComponent .
|
overridevirtual |
Called before destroying the object.
This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.
重载 UActorComponent .
|
protectedvirtual |
Increase air control if conditions of AirControlBoostMultiplier and AirControlBoostVelocityThreshold are met.
This function is used internally by GetAirControl().
| DeltaTime | Time step for the current update. |
| TickAirControl | Current air control value. |
| FallAcceleration | Acceleration used during movement. |
|
virtual |
Calculate velocity from anim root motion.
| RootMotionDeltaMove | Change in location from root motion. |
| DeltaSeconds | Elapsed time |
| CurrentVelocity | Non-root motion velocity at current time, used for components of result that may ignore root motion. |
|
virtual |
Updates Velocity and Acceleration based on the current state, applying the effects of friction and acceleration or deceleration.
Does not apply gravity. This is used internally during movement updates. Normally you don't need to call this from outside code, but you might want to use it for custom movement modes.
| DeltaTime | time elapsed since last frame. |
| Friction | coefficient of friction when not accelerating, or in the direction opposite acceleration. |
| bFluid | true if moving through a fluid, causing Friction to always be applied regardless of acceleration. |
| BrakingDeceleration | deceleration applied when not accelerating, or when exceeding max velocity. |
|
protectedvirtual |
On the client, calls the ServerMovePacked_ClientSend() function with packed movement data.
First the FCharacterNetworkMoveDataContainer from GetNetworkMoveDataContainer() is updated with ClientFillNetworkMoveData(), then serialized into a data stream to send client player moves to the server.
|
virtual |
Returns true if current movement state allows an attempt at jumping.
Used by Character::CanJump().
|
virtual |
Returns true if the character is allowed to crouch in the current state.
By default it is allowed when walking or falling, if CanEverCrouch() is true.
|
overridevirtual |
check if current move target can be reached right now if positions are matching (e.g.
performing scripted move and can't stop)
|
virtual |
Replicate position correction to client, associated with a timestamped servermove.
Client will replay subsequent moves after applying adjustment.
|
virtual |
Replicate position correction to client when using root motion for movement.
(animation root motion specific)
|
virtual |
On the client, handles the move response from the server after it has been received and unpacked in MoveResponsePacked_ClientReceive.
Based on the data in the response, dispatches a call to ClientAckGoodMove_Implementation if there was no error from the server. Otherwise dispatches a call to one of ClientAdjustRootMotionSourcePosition_Implementation, ClientAdjustRootMotionPosition_Implementation, or ClientAdjustPosition_Implementation depending on the payload.
|
protectedvirtual |
If bUpdatePosition is true, then replay any unacked moves.
Returns whether any moves were actually replayed.
|
virtual |
Compute distance to the floor from bottom sphere of capsule and store the result in OutFloorResult.
This distance is the swept distance of the capsule to the first point impacted by the lower hemisphere, or distance from the bottom of the capsule in the case of a line trace. This function does not care if collision is disabled on the capsule (unlike FindFloor).
| CapsuleLocation | Location of the capsule used for the query |
| LineDistance | If non-zero, max distance to test for a simple line check from the capsule base. Used only if the sweep test fails to find a walkable floor, and only returns a valid result if the impact normal is a walkable normal. |
| SweepDistance | If non-zero, max distance to use when sweeping a capsule downwards for the test. MUST be greater than or equal to the line distance. |
| OutFloorResult | Result of the floor check. The HitResult will contain the valid sweep or line test upon success, or the result of the sweep upon failure. |
| SweepRadius | The radius to use for sweep tests. Should be <= capsule radius. |
| DownwardSweepResult | If non-null and it contains valid blocking hit info, this will be used as the result of a downward sweep test instead of doing it as part of the update. |
|
protectedvirtual |
Compute a vector of movement, given a delta and a hit result of the surface we are on.
| Delta | Attempted movement direction |
| RampHit | Hit result of sweep that found the ramp below the capsule |
| bHitFromLineTrace | Whether the floor trace came from a line trace |
|
virtual |
Compute a target rotation based on current movement.
Used by PhysicsRotation() when bOrientRotationToMovement is true. Default implementation targets a rotation based on Acceleration.
| CurrentRotation | - Current rotation of the Character |
| DeltaTime | - Time slice for this movement |
| DeltaRotation | - Proposed rotation change based simply on DeltaTime * RotationRate |
|
virtual |
Compute the sweep result of the smaller capsule with radius specified by GetValidPerchRadius(), and return true if the sweep contacts a valid walkable normal within InMaxFloorDist of InHit.ImpactPoint.
This may be used to determine if the capsule can or cannot stay at the current location if perched on the edge of a small ledge or unwalkable surface. Note: Only returns a valid result if ShouldComputePerchResult returned true for the supplied hit value.
| TestRadius | Radius to use for the sweep, usually GetValidPerchRadius(). |
| InHit | Result of the last sweep test before the query. |
| InMaxFloorDist | Max distance to floor allowed by perching, from the supplied contact point (InHit.ImpactPoint). |
| OutPerchFloorResult | Contains the result of the perch floor test. |
|
overrideprotectedvirtual |
Calculate slide vector along a surface.
Has special treatment when falling, to avoid boosting up slopes (calling HandleSlopeBoosting() in this case).
| Delta | Attempted move. |
| Time | Amount of move to apply (between 0 and 1). |
| Normal | Normal opposed to movement. Not necessarily equal to Hit.Normal (but usually is). |
| Hit | HitResult of the move that resulted in the slide. |
重载 UMovementComponent .
|
virtual |
Constrain components of root motion velocity that may not be appropriate given the current movement mode (e.g.
when falling Z may be ignored).
|
protectedvirtual |
Enforce constraints on input given current state.
For instance, don't move upwards if walking and looking up.
|
virtual |
Checks if new capsule size fits (no encroachment), and call CharacterOwner->OnStartCrouch() if successful.
In general you should set bWantsToCrouch instead to have the crouch persist during movement, or just use the crouch functions on the owning Character.
| bClientSimulation | true when called when bIsCrouched is replicated to non owned clients, to update collision cylinder and offset. |
|
virtual |
Draw important variables on canvas.
Character will call DisplayDebug() on the current ViewTarget when the ShowDebug exec is used
| Canvas | - Canvas to draw on |
| DebugDisplay | - Contains information about what debug data to display |
| YL | - Height of the current font |
| YPos | - Y position on Canvas. YPos += YL, gives position to draw text for next debug line. |
|
virtual |
Perform jump.
Called by Character when a jump has been detected because Character->bPressedJump was true. Checks Character->CanJump(). Note that you should usually trigger a jump through Character::Jump() instead.
| bReplayingMoves | true if this is being done as part of replaying moves on a locally controlled client after a server correction. |
|
virtual |
Sweeps a vertical trace to find the floor for the capsule at the given location.
Will attempt to perch if ShouldComputePerchResult() returns true for the downward sweep result. No floor will be found if collision is disabled on the capsule!
| CapsuleLocation | Location where the capsule sweep should originate |
| OutFloorResult | [Out] Contains the result of the floor check. The HitResult will contain the valid sweep or line test upon success, or the result of the sweep upon failure. |
| bCanUseCachedLocation | If true, may use a cached value (can be used to avoid unnecessary floor tests, if for example the capsule was not moving since the last test). |
| DownwardSweepResult | If non-null and it contains valid blocking hit info, this will be used as the result of a downward sweep test instead of doing it as part of the update. |
|
virtual |
Project a location to navmesh to find adjusted height.
| TestLocation | Location to project |
| NavFloorLocation | Location on navmesh |
|
virtual |
Sweep against the world and return the first blocking hit.
Intended for tests against the floor, because it may change the result of impacts on the lower area of the test (especially if bUseFlatBaseForFloorChecks is true).
| OutHit | First blocking hit found. |
| Start | Start location of the capsule. |
| End | End location of the capsule. |
| TraceChannel | The 'channel' that this trace is in, used to determine which components to hit. |
| CollisionShape | Capsule collision shape. |
| Params | Additional parameters used for the trace. |
| ResponseParam | ResponseContainer to be used for this trace. |
| void UCharacterMovementComponent::ForceClientAdjustment | ( | ) |
Force a client adjustment.
Resets ServerLastClientAdjustmentTime.
|
virtual |
Get the air control to use during falling movement.
Given an initial air control (TickAirControl), applies the result of BoostAirControl(). This function is used internally by GetFallingLateralAcceleration().
| DeltaTime | Time step for the current update. |
| TickAirControl | Current air control value. |
| FallAcceleration | Acceleration used during movement. |
|
protectedvirtual |
Determine minimum delay between sending client updates to the server.
If updates occur more frequently this than this time, moves may be combined delayed.
|
inlineprotected |
Current move data being processed or handled.
This is set before MoveAutonomous (for replayed moves and server moves), and cleared thereafter. Useful for being able to access custom movement data during internal movement functions such as MoveAutonomous() or UpdateFromCompressedFlags() to be able to maintain backwards API compatibility.
|
virtual |
Get the lateral acceleration to use during falling movement.
The Z component of the result is ignored. Default implementation returns current Acceleration value modified by GetAirControl(), with Z component removed, with magnitude clamped to GetMaxAcceleration(). This function is used internally by PhysFalling().
| DeltaTime | Time step for the current update. |
|
inline |
Get current GroundMovementMode value.
|
virtual |
If we have a movement base, get the velocity that should be imparted by that base, usually when jumping off of it.
Only applies the components of the velocity enabled by bImpartBaseVelocityX, bImpartBaseVelocityY, bImpartBaseVelocityZ.
|
virtual |
| Delta | is the current move delta (which ended up going over a ledge). |
|
virtual |
Compute the max jump height based on the JumpZVelocity velocity and gravity.
This does not take into account the CharacterOwner's MaxJumpHoldTime.
|
virtual |
Compute the max jump height based on the JumpZVelocity velocity and gravity.
This does take into account the CharacterOwner's MaxJumpHoldTime.
|
inlineprotected |
Get the struct used for server response RPC serialization.
|
protected |
Get Navigation data for the Character.
Returns null if there is no associated nav data.
|
inlineprotected |
Get the struct used for client to server move RPC serialization.
|
virtual |
Generate a random angle in degrees that is approximately equal between client and server.
Note that in networked games this result changes with low frequency and has a low period, so should not be used for frequent randomization.
|
protected |
Get the collision shape for the Pawn owner, possibly reduced in size depending on ShrinkMode.
| ShrinkMode | Controls the way the capsule is resized. |
| CustomShrinkAmount | The amount to shrink the capsule, used only for ShrinkModes that specify custom. |
|
protected |
Get the capsule extent for the Pawn owner, possibly reduced in size depending on ShrinkMode.
| ShrinkMode | Controls the way the capsule is resized. |
| CustomShrinkAmount | The amount to shrink the capsule, used only for ShrinkModes that specify custom. |
|
overridevirtual |
Get prediction data for a client game.
Should not be used if not running as a client. Allocates the data on demand and can be overridden to allocate a custom override if desired. Result must be a FNetworkPredictionData_Client_Character.
|
overridevirtual |
Get prediction data for a server game.
Should not be used if not running as a server. Allocates the data on demand and can be overridden to allocate a custom override if desired. Result must be a FNetworkPredictionData_Server_Character.
|
inline |
END IRVOAvoidanceInterface
a shortcut function to be called instead of GetRVOAvoidanceUID when callee knows it's dealing with a char movement comp
| float UCharacterMovementComponent::GetSimulationTimeStep | ( | float | RemainingTime, |
| int32 | Iterations | ||
| ) | const |
Compute remaining time step given remaining time and current iterations.
The last iteration (limited by MaxSimulationIterations) always returns the remaining time, which may violate MaxSimulationTimeStep.
| RemainingTime | Remaining time in the tick. |
| Iterations | Current iteration of the tick (starting at 1). |
| ETeleportType UCharacterMovementComponent::GetTeleportType | ( | ) | const |
When moving the character, we should inform physics as to whether we are teleporting.
This allows physics to avoid injecting forces into simulations from client corrections (etc.)
| float UCharacterMovementComponent::GetValidPerchRadius | ( | ) | const |
Returns the radius within which we can stand on the edge of a surface without falling (if this is a walkable surface).
Simply computed as the capsule radius minus the result of GetPerchRadiusThreshold().
|
inline |
Get the Z component of the normal of the steepest walkable surface for the character.
Any lower than this and it is not walkable.
|
overrideprotectedvirtual |
Handle a blocking impact.
Calls ApplyImpactPhysicsForces for the hit, if bEnablePhysicsInteraction is true.
重载 UMovementComponent .
|
virtual |
Handle a pending launch during an update.
Returns true if the launch was triggered.
|
protectedvirtual |
Limit the slide vector when falling if the resulting slide might boost the character faster upwards.
| SlideResult | Vector of movement for the slide (usually the result of ComputeSlideVector) |
| Delta | Original attempted move |
| Time | Amount of move to apply (between 0 and 1). |
| Normal | Normal opposed to movement. Not necessarily equal to Hit.Normal (but usually is). |
| Hit | HitResult of the move that resulted in the slide. |
|
inline |
Returns true if we have Root Motion from animation to use in PerformMovement() physics.
Not valid outside of the scope of that function. Since RootMotion is extracted and used in it.
|
protected |
Internal const check for client timestamp validity without side-effects.
|
inline |
Returns true if currently performing a movement update.
|
overridevirtual |
|
virtual |
Return true if the 2D distance to the impact point is inside the edge tolerance (CapsuleRadius minus a small rejection threshold).
Useful for rejecting adjacent hits when finding a floor or landing spot.
|
virtual |
Compute distance to the floor from bottom sphere of capsule and store the result in FloorResult.
This distance is the swept distance of the capsule to the first point impacted by the lower hemisphere, or distance from the bottom of the capsule in the case of a line trace. This function does not care if collision is disabled on the capsule (unlike FindFloor).
| CapsuleLocation | Location where the capsule sweep should originate |
| LineDistance | If non-zero, max distance to test for a simple line check from the capsule base. Used only if the sweep test fails to find a walkable floor, and only returns a valid result if the impact normal is a walkable normal. |
| SweepDistance | If non-zero, max distance to use when sweeping a capsule downwards for the test. MUST be greater than or equal to the line distance. |
| SweepRadius | The radius to use for sweep tests. Should be <= capsule radius. |
| FloorResult | Result of the floor check |
|
virtual |
Sweeps a vertical trace to find the floor for the capsule at the given location.
Will attempt to perch if ShouldComputePerchResult() returns true for the downward sweep result. No floor will be found if collision is disabled on the capsule!
| CapsuleLocation | Location where the capsule sweep should originate |
| FloorResult | Result of the floor check |
| float UCharacterMovementComponent::K2_GetWalkableFloorZ | ( | ) | const |
Get the Z component of the normal of the steepest walkable surface for the character.
Any lower than this and it is not walkable.
|
protectedvirtual |
Limits the air control to use during falling movement, given an impact while falling.
This function is used internally by PhysFalling().
| DeltaTime | Time step for the current update. |
| FallAcceleration | Acceleration used during movement. |
| HitResult | Result of impact. |
| bCheckForValidLandingSpot | If true, will use IsValidLandingSpot() to determine if HitResult is a walkable surface. If false, this check is skipped. |
|
protectedvirtual |
Adjusts velocity when walking so that Z velocity is zero.
When bMaintainHorizontalGroundVelocity is false, also rescales the velocity vector to maintain the original magnitude, but in the horizontal direction.
|
protectedvirtual |
Move along the floor, using CurrentFloor and ComputeGroundMovementDelta() to get a movement direction.
If a second walkable surface is hit, it will also be moved along using the same approach.
| InVelocity | Velocity of movement |
| DeltaSeconds | Time over which movement occurs |
| OutStepDownResult | [Out] If non-null, and a floor check is performed, this will be updated to reflect that result. |
|
virtual |
Moves along the given movement direction using simple movement rules based on the current movement mode (usually used by simulated proxies).
| InVelocity | Velocity of movement |
| DeltaSeconds | Time over which movement occurs |
| OutStepDownResult | [Out] If non-null, and a floor check is performed, this will be updated to reflect that result. |
|
virtual |
Compute new falling velocity from given velocity and gravity.
Applies the limits of the current Physics Volume's TerminalVelocity.
|
protectedvirtual |
Notification that the character is stuck in geometry.
Only called during walking movement.
|
protectedvirtual |
Event notification when client receives correction data from the server, before applying the data.
Base implementation logs relevant data and draws debug info if "p.NetShowCorrections" is not equal to 0.
|
protectedvirtual |
Called after MovementMode has changed.
Base implementation does special handling for starting certain modes, then notifies the CharacterOwner.
|
protectedvirtual |
Event triggered at the end of a movement update.
If scoped movement updates are enabled (bEnableScopedMovementUpdates), this is within such a scope. If that is not desired, bind to the CharacterOwner's OnMovementUpdated event instead, as that is triggered after the scoped movement update.
|
protectedvirtual |
Called by UCharacterMovementComponent::ProcessClientTimeStampForTimeDiscrepancy() (on server) when the time from client moves significantly differs from the server time, indicating potential time manipulation by clients (speed hacks, significant network issues, client performance problems)
| CurrentTimeDiscrepancy | Accumulated time difference between client ServerMove and server time - this is bounded by MovementTimeDiscrepancy config variables in AGameNetworkManager, and is the value with which we test against to trigger this function. This is reset when MovementTimeDiscrepancy resolution is enabled |
| LifetimeRawTimeDiscrepancy | Accumulated time difference between client ServerMove and server time - this is unbounded and does NOT get affected by MovementTimeDiscrepancy resolution, and is useful as a longer-term view of how the given client is performing. High magnitude unbounded error points to intentional tampering by a client vs. occasional "naturally caused" spikes in error due to burst packet loss/performance hitches |
| Lifetime | Game time over which LifetimeRawTimeDiscrepancy has accrued (useful for determining severity of LifetimeUnboundedError) |
| CurrentMoveError | Time difference between client ServerMove and how much time has passed on the server for the current move that has caused TimeDiscrepancy to accumulate enough to trigger detection. |
|
protectedvirtual |
Event triggered when we are moving on a base but we are not able to move the full DeltaPosition because something has blocked us.
Note: MoveComponentFlags includes the flag to ignore the movement base while this event is fired.
| DeltaPosition | How far we tried to move with the base. |
| OldLocation | Location before we tried to move with the base. |
| MoveOnBaseHit | Hit result for the object we hit when trying to move with the base. |
|
virtual |
If ShouldPerformAirControlForPathFollowing() returns true, it will update Velocity and Acceleration to air control in the desired Direction for character using path following.
| Direction | is the desired direction of movement |
| ZDiff | is the height difference between the destination and the Pawn's current position |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
overridevirtual |
Do any object-specific cleanup required immediately after loading an object.
This is not called for newly-created objects, and by default will always execute on the game thread.
重载 UMovementComponent .
|
protectedvirtual |
Attempts to better align navmesh walking characters with underlying geometry (sometimes navmesh can differ quite significantly from geometry).
Updates CachedProjectedNavMeshHitResult, access this for more info about hits.
|
overridevirtual |
Virtual call chain to register all tick functions
| bRegister | - true to register, false, to unregister |
重载 UMovementComponent .
| void UCharacterMovementComponent::RevertMove | ( | const FVector & | OldLocation, |
| UPrimitiveComponent * | OldBase, | ||
| const FVector & | InOldBaseLocation, | ||
| const FFindFloorResult & | OldFloor, | ||
| bool | bFailMove | ||
| ) |
Revert to previous position OldLocation, return to being based on OldBase.
if bFailMove, stop movement and notify controller
|
virtual |
Update OldBaseLocation and OldBaseQuat if there is a valid movement base, and store the relative location/rotation if necessary.
Ignores bDeferUpdateBasedMovement and forces the update.
|
overridevirtual |
Handles reading, writing, and reference collecting using FArchive.
This implementation handles all FProperty serialization, but can be overridden for native variables.
|
protectedvirtual |
Check for Server-Client disagreement in position or other movement state important enough to trigger a client correction.
|
protectedvirtual |
Check position error within ServerCheckClientError().
Set bNetworkLargeClientCorrection to true if the correction should be prioritized (delayed less in SendClientAdjustment).
|
virtual |
Replicated function sent by client to server - contains client movement and view info.
Calls either CharacterOwner->ServerMove() or CharacterOwner->ServerMoveNoBase() depending on whehter ClientMovementBase is null.
|
virtual |
Handle movement data after it's unpacked from the ServerMovePacked_ServerReceive() call.
Default implementation passes through to ServerMove_PerformMovement(), which may be called twice in the case of a "dual move", and one additional time for an "old important move".
|
virtual |
Check timestamps, generate a delta time, and pass through movement params to MoveAutonomous.
Error checking is optionally done on the final location, compared to 'ClientLoc'. The FCharacterNetworkMoveData parameter to this function is also the same returned by GetCurrentNetworkMoveData(), to assist in migration of code that may want to access the data without changing function signatures. (Note: this is similar to "ServerMove_Implementation" in legacy versions).
|
virtual |
Replicated function sent by client to server - contains client movement and view info for two moves.
Calls either CharacterOwner->ServerMoveDual() or CharacterOwner->ServerMoveDualNoBase() depending on whehter ClientMovementBase is null.
|
virtual |
Replicated function sent by client to server - contains client movement and view info for two moves.
First move is non root motion, second is root motion.
|
protectedvirtual |
Have the server check if the client is outside an error tolerance, and queue a client adjustment if so.
If either GetPredictionData_Server_Character()->bForceClientUpdate or ServerCheckClientError() are true, the client adjustment will be sent. RelativeClientLocation will be a relative location if MovementBaseUtility::UseRelativePosition(ClientMovementBase) is true, or a world location if false.
| void UCharacterMovementComponent::ServerMovePacked_ClientSend | ( | const FCharacterServerMovePackedBits & | PackedBits | ) |
The actual network RPCs for character movement are passed to ACharacter, which wrap to the _Implementation call here, to avoid Component RPC overhead.
For example: Client: UCharacterMovementComponent::ServerMovePacked_ClientSend() => Calls CharacterOwner->ServerMove() triggering RPC on the server. Server: ACharacter::ServerMovePacked_Implementation() from the RPC => Calls CharacterMovement->ServerMove_ServerReceive(), unpacked and sent to ServerMove_ServerHandleMoveData().
ServerMove_ClientSend() and ServerMove_ServerReceive() use a bitstream created from the current FCharacterNetworkMoveData data container that contains the client move. See GetNetworkMoveDataContainer()/SetNetworkMoveDataContainer() for details on setting a custom container with custom unpacking through FCharacterNetworkMoveData::Serialize(). Wrapper to send packed move data to the server, through the Character.
| void UCharacterMovementComponent::ServerSendMoveResponse | ( | const FClientAdjustment & | PendingAdjustment | ) |
On the server, sends a packed move response to the client.
First the FCharacterMoveResponseDataContainer from GetMoveResponseDataContainer() is filled in with ServerFillResponseData(). Then this data is serialized to a bit stream that is sent to the client via MoveResponsePacked_ServerSend().
| void UCharacterMovementComponent::SetBaseFromFloor | ( | const FFindFloorResult & | FloorResult | ) |
Update the base of the character, using the given floor result if it is walkable, or null if not.
Calls SetBase().
|
inlineprotected |
Used internally to set the FCharacterNetworkMoveData currently being processed, either being serialized or replayed on the client, or being received and processed on the server.
| void UCharacterMovementComponent::SetGroundMovementMode | ( | EMovementMode | NewGroundMovementMode | ) |
Set movement mode to use when returning to walking movement (either MOVE_Walking or MOVE_NavWalking).
If movement mode is currently one of Walking or NavWalking, this will also change the current movement mode (via SetMovementMode()) if the new mode is not the current ground mode.
| NewGroundMovementMode | New ground movement mode. Must be either MOVE_Walking or MOVE_NavWalking, other values are ignored. |
|
virtual |
Change movement mode.
| NewMovementMode | The new movement mode |
| NewCustomMode | The new custom sub-mode, only applicable if NewMovementMode is Custom. |
|
inlineprotected |
Set custom struct used for server response RPC serialization.
This is typically set in the constructor for this component and should persist for the lifetime of the component.
|
inlineprotected |
Set custom struct used for client to server move RPC serialization.
This is typically set in the constructor for this component and should persist for the lifetime of the component.
|
protectedvirtual |
Use new physics after landing.
Defaults to swimming if in water, walking otherwise.
| void UCharacterMovementComponent::SetWalkableFloorAngle | ( | float | InWalkableFloorAngle | ) |
Set the max angle in degrees of a walkable surface for the character.
Also computes WalkableFloorZ.
| void UCharacterMovementComponent::SetWalkableFloorZ | ( | float | InWalkableFloorZ | ) |
Set the Z component of the normal of the steepest walkable surface for the character.
Also computes WalkableFloorAngle.
|
virtual |
Whether Character should go into falling mode when walking and changing position, based on an old and new floor result (both of which are considered walkable).
Default implementation always returns false.
|
virtual |
Determine whether we should try to find a valid landing spot after an impact with an invalid one (based on the Hit result).
For example, landing on the lower portion of the capsule on the edge of geometry may be a walkable surface, but could have reported an unwalkable impact normal.
|
protectedvirtual |
When a character requests a velocity (like when following a path), this method returns true if when we should compute the acceleration toward requested velocity (including friction).
If it returns false, it will snap instantly to requested velocity.
|
virtual |
Check if the result of a sweep test (passed in InHit) might be a valid location to perch, in which case we should use ComputePerchResult to validate the location.
| InHit | Result of the last sweep test before this query. |
| bCheckRadius | If true, only allow the perch test if the impact point is outside the radius returned by GetValidPerchRadius(). |
|
virtual |
Determine whether the Character should jump when exiting water.
| JumpDir | is the desired direction to jump out of water |
|
virtual |
Returns true if falling movement should limit air control.
Limiting air control prevents input acceleration during falling movement from allowing velocity to redirect forces upwards while falling, which could result in slower falling or even upward boosting.
|
virtual |
Determines whether to use packed movement RPCs with variable length payloads, or legacy code which has multiple functions required for different situations.
The default implementation checks the console variable "p.NetUsePackedMovementRPCs" and returns true if it is non-zero.
|
protectedvirtual |
Simulate movement on a non-owning client.
Called by SimulatedTick().
|
protectedvirtual |
Smooth mesh location for network interpolation, based on values set up by SmoothCorrection.
Internally this simply calls SmoothClientPosition_Interpolate() then SmoothClientPosition_UpdateVisuals(). This function is not called when bNetworkSmoothingComplete is true.
| DeltaSeconds | Time since last update. |
|
protected |
Update interpolation values for client smoothing.
Does not change actual mesh location. Sets bNetworkSmoothingComplete to true when the interpolation reaches the target.
|
overridevirtual |
React to new transform from network update.
Sets bNetworkSmoothingComplete to false to ensure future smoothing updates. IMPORTANT: It is expected that this function triggers any movement/transform updates to match the network update if desired.
| void UCharacterMovementComponent::StartSwimming | ( | FVector | OldLocation, |
| FVector | OldVelocity, | ||
| float | timeTick, | ||
| float | remainingTime, | ||
| int32 | Iterations | ||
| ) |
Handle start swimming functionality
| OldLocation | - Location on last tick |
| OldVelocity | - velocity at last tick |
| timeTick | - time since at OldLocation |
| remainingTime | - DeltaTime to complete transition to swimming |
| Iterations | - physics iteration count |
|
virtual |
Move up steps or slope.
Does nothing and returns false if CanStepUp(Hit) returns false.
| GravDir | Gravity vector direction (assumed normalized or zero) |
| Delta | Requested move |
| Hit | [In] The hit before the step up. |
| OutStepDownResult | [Out] If non-null, a floor check will be performed if possible as part of the final step down, and it will be updated to reflect this result. |
|
overridevirtual |
Function called every frame on this ActorComponent.
Override this function to implement custom logic to be executed every frame. Only executes if the component is registered, and also PrimaryComponentTick.bCanEverTick must be set to true.
| DeltaTime | - The time since the last tick. |
| TickType | - The kind of tick this is, for example, are we paused, or 'simulating' in the editor |
| ThisTickFunction | - Internal tick function struct that caused this to run |
重载 UMovementComponent .
|
protectedvirtual |
Checks to see if the current location is not encroaching blocking geometry so the character can leave NavWalking.
Restores collision settings and adjusts character location to avoid getting stuck in geometry. If it's not possible, MovementMode change will be delayed until character reach collision free spot.
|
virtual |
Checks if default capsule size fits (no encroachment), and trigger OnEndCrouch() on the owner if successful.
| bClientSimulation | true when called when bIsCrouched is replicated to non owned clients, to update collision cylinder and offset. |
|
virtual |
Update the character state in PerformMovement after the position change.
Some rotation updates happen after this.
|
virtual |
React to instantaneous change in position.
Invalidates cached floor recomputes it if possible if there is a current movement base.
|
protectedvirtual |
Unpack compressed flags from a saved move and set state accordingly.
See FSavedMove_Character.
|
virtual |
Used during SimulateMovement for proxies, this computes a new value for Acceleration before running proxy simulation.
The base implementation simply derives a value from the normalized Velocity value, which may help animations that want some indication of the direction of movement. Proxies don't implement predictive acceleration by default so this value is not used for the actual simulation.
|
virtual |
On the Server, verify that an incoming client TimeStamp is valid and has not yet expired.
It will also handle TimeStamp resets if it detects a gap larger than MinTimeBetweenTimeStampResets / 2.f !! ServerData.CurrentClientTimeStamp can be reset !!
|
protected |
Current acceleration vector (with magnitude).
This is calculated each update based on the input vector and the constraints of MaxAcceleration and the current movement mode.
| float UCharacterMovementComponent::AirControl |
When falling, amount of lateral movement control available to the character.
0 = no control, 1 = full control at max speed of MaxWalkSpeed.
| float UCharacterMovementComponent::AirControlBoostMultiplier |
When falling, multiplier applied to AirControl when lateral velocity is less than AirControlBoostVelocityThreshold.
Setting this to zero will disable air control boosting. Final result is clamped at 1.
| float UCharacterMovementComponent::AirControlBoostVelocityThreshold |
When falling, if lateral velocity magnitude is less than this value, AirControl is multiplied by AirControlBoostMultiplier.
Setting this to zero will disable air control boosting.
| FVector UCharacterMovementComponent::AnimRootMotionVelocity |
Velocity extracted from RootMotionParams when there is anim root motion active.
Invalid to use when HasAnimRootMotion() returns false.
| uint8 UCharacterMovementComponent::bAlwaysCheckFloor |
Whether we always force floor checks for stationary Characters while walking.
Normally floor checks are avoided if possible when not moving, but this can be used to force them if there are use-cases where they are being skipped erroneously (such as objects moving up into the character from below).
| uint8 UCharacterMovementComponent::bApplyGravityWhileJumping |
Apply gravity while the character is actively jumping (e.g.
holding the jump key). Helps remove frame-rate dependent jump height, but may alter base jump height.
| uint8 UCharacterMovementComponent::bCrouchMaintainsBaseLocation |
If true, crouching should keep the base of the capsule in place by lowering the center of the shrunken capsule.
If false, the base of the capsule moves up and the center stays in place. The same behavior applies when the character uncrouches: if true, the base is kept in the same location and the center moves up. If false, the capsule grows and only moves up if the base impacts something. By default this variable is set when the movement mode changes: set to true when walking and false otherwise. Feel free to override the behavior when the movement mode changes.
| uint8 UCharacterMovementComponent::bEnableScopedMovementUpdates |
If true, high-level movement updates will be wrapped in a movement scope that accumulates updates and defers a bulk of the work until the end.
When enabled, touch and hit events will not be triggered until the end of multiple moves within an update, which can improve performance.
| uint8 UCharacterMovementComponent::bEnableServerDualMoveScopedMovementUpdates |
Optional scoped movement update to combine moves for cheaper performance on the server when the client sends two moves in one packet.
Be warned that since this wraps a larger scope than is normally done with bEnableScopedMovementUpdates, this can result in subtle changes in behavior in regards to when overlap events are handled, when attached components are moved, etc.
| uint8 UCharacterMovementComponent::bFastAttachedMove |
Set this to true if riding on a moving base that you know is clear from non-moving world obstructions.
Optimization to avoid sweeps during based movement, use with care.
| uint8 UCharacterMovementComponent::bForceNextFloorCheck |
Force the Character in MOVE_Walking to do a check for a valid floor even if he hasn't moved.
Cleared after next floor check. Normally if bAlwaysCheckFloor is false we try to avoid the floor check unless some conditions are met, but this can be used to force the next check to always run.
| uint8 UCharacterMovementComponent::bIgnoreBaseRotation |
Whether the character ignores changes in rotation of the base it is standing on.
If true, the character maintains current world rotation. If false, the character rotates with the moving base.
| uint8 UCharacterMovementComponent::bIgnoreClientMovementErrorChecksAndCorrection |
If true, we should ignore server location difference checks for client error on this movement component.
This can be useful when character is moving at extreme speeds for a duration and you need it to look smooth on clients without the server correcting the client. Make sure to disable when done, as this would break this character's server-client movement correction.
| uint8 UCharacterMovementComponent::bImpartBaseAngularVelocity |
If true, impart the base component's tangential components of angular velocity when jumping or falling off it.
Only those components of the velocity allowed by the separate component settings (bImpartBaseVelocityX etc) will be applied.
| uint8 UCharacterMovementComponent::bJustTeleported |
Used by movement code to determine if a change in position is based on normal movement or a teleport.
If not a teleport, velocity can be recomputed based on the change in position.
| uint8 UCharacterMovementComponent::bMaintainHorizontalGroundVelocity |
If true, walking movement always maintains horizontal velocity when moving up ramps, which causes movement up ramps to be faster parallel to the ramp surface.
If false, then walking movement maintains velocity magnitude parallel to the ramp surface.
|
protected |
True during movement update.
Used internally so that attempts to change CharacterOwner and UpdatedComponent are deferred until after an update.
| uint8 UCharacterMovementComponent::bNetworkAlwaysReplicateTransformUpdateTimestamp |
Flag used on the server to determine whether to always replicate ReplicatedServerLastTransformUpdateTimeStamp to clients.
Normally this is only sent when the network smoothing mode on character movement is set to Linear smoothing (on the server), to save bandwidth. Setting this to true will force the timestamp to replicate regardless, in case the server doesn't know about the smoothing mode, or if the timestamp is used for another purpose.
| uint8 UCharacterMovementComponent::bNetworkSkipProxyPredictionOnNetUpdate |
Whether we skip prediction on frames where a proxy receives a network update.
This can avoid expensive prediction on those frames, with the side-effect of predicting with a frame of additional latency.
| uint8 UCharacterMovementComponent::bNetworkSmoothingComplete |
Signals that smoothed position/rotation has reached target, and no more smoothing is necessary until a future update.
This is used as an optimization to skip calls to SmoothClientPosition() when true. SmoothCorrection() sets it false when a new network update is received. SmoothClientPosition_Interpolate() sets this to true when the interpolation reaches the target, before one last call to SmoothClientPosition_UpdateVisuals(). If this is not desired, override SmoothClientPosition() to always set this to false to avoid this feature.
| uint8 UCharacterMovementComponent::bNotifyApex |
If true, event NotifyJumpApex() to CharacterOwner's controller when at apex of jump.
Is cleared when event is triggered. By default this is off, and if you want the event to fire you typically set it to true when movement mode changes to "Falling" from another mode (see OnMovementModeChanged).
| uint8 UCharacterMovementComponent::bOrientRotationToMovement |
If true, rotate the Character toward the direction of acceleration, using RotationRate as the rate of rotation change.
Overrides UseControllerDesiredRotation. Normally you will want to make sure that other settings are cleared, such as bUseControllerRotationYaw on the Character.
| uint8 UCharacterMovementComponent::bPushForceUsingZOffset |
If enabled, the PushForce location is moved using PushForcePointZOffsetFactor.
Otherwise simply use the impact point.
| float UCharacterMovementComponent::BrakingDecelerationFalling |
Lateral deceleration when falling and not applying acceleration.
| float UCharacterMovementComponent::BrakingDecelerationFlying |
Deceleration when flying and not applying acceleration.
| float UCharacterMovementComponent::BrakingDecelerationSwimming |
Deceleration when swimming and not applying acceleration.
| float UCharacterMovementComponent::BrakingDecelerationWalking |
Deceleration when walking and not applying acceleration.
This is a constant opposing force that directly lowers velocity by a constant value.
| float UCharacterMovementComponent::BrakingFriction |
Friction (drag) coefficient applied when braking (whenever Acceleration = 0, or if character is exceeding max speed); actual value used is this multiplied by BrakingFrictionFactor.
When braking, this property allows you to control how much friction is applied when moving across the ground, applying an opposing force that scales with current velocity. Braking is composed of friction (velocity-dependent drag) and constant deceleration. This is the current value, used in all movement modes; if this is not desired, override it or bUseSeparateBrakingFriction when movement mode changes.
| float UCharacterMovementComponent::BrakingFrictionFactor |
Factor used to multiply actual value of friction used when braking.
This applies to any friction value that is currently used, which may depend on bUseSeparateBrakingFriction.
| float UCharacterMovementComponent::BrakingSubStepTime |
Time substepping when applying braking friction.
Smaller time steps increase accuracy at the slight cost of performance, especially if there are large frame times.
| uint8 UCharacterMovementComponent::bRequestedMoveUseAcceleration |
Should use acceleration for path following? If true, acceleration is applied when path following to reach the target velocity.
If false, path following velocity is set directly, disregarding acceleration.
| uint8 UCharacterMovementComponent::bRunPhysicsWithNoController |
If true, movement will be performed even if there is no Controller for the Character owner.
Normally without a Controller, movement will be aborted and velocity and acceleration are zeroed if the character is walking. Characters that are spawned without a Controller but with this flag enabled will initialize the movement mode to DefaultLandMovementMode or DefaultWaterMovementMode appropriately.
| uint8 UCharacterMovementComponent::bScalePushForceToVelocity |
If enabled, the applied push force will try to get the physics object to the same velocity than the player, not faster.
This will only scale the force down, it will never apply more force than defined by PushForceFactor.
| uint8 UCharacterMovementComponent::bServerAcceptClientAuthoritativePosition |
If true, and server does not detect client position error, server will copy the client movement location/velocity/etc after simulating the move.
This can be useful for short bursts of movement that are difficult to sync over the network. Note that if bIgnoreClientMovementErrorChecksAndCorrection is used, this means the server will not detect an error. Also see GameNetworkManager->ClientAuthorativePosition which permanently enables this behavior.
| uint8 UCharacterMovementComponent::bShrinkProxyCapsule |
If true, the capsule needs to be shrunk on this simulated proxy, to avoid replication rounding putting us in geometry.
Whenever this is set to true, this will cause the capsule to be shrunk again on the next update, and then set to false.
| uint8 UCharacterMovementComponent::bSweepWhileNavWalking |
Whether or not the character should sweep for collision geometry while walking.
| float UCharacterMovementComponent::Buoyancy |
Water buoyancy.
A ratio (1.0 = neutral buoyancy, 0.0 = no buoyancy)
| uint8 UCharacterMovementComponent::bUseControllerDesiredRotation |
If true, smoothly rotate the Character toward the Controller's desired rotation (typically Controller->ControlRotation), using RotationRate as the rate of rotation change.
Overridden by OrientRotationToMovement. Normally you will want to make sure that other settings are cleared, such as bUseControllerRotationYaw on the Character.
| uint8 UCharacterMovementComponent::bUseFlatBaseForFloorChecks |
Performs floor checks as if the character is using a shape with a flat base.
This avoids the situation where characters slowly lower off the side of a ledge (as their capsule 'balances' on the edge).
| uint8 UCharacterMovementComponent::bUseRVOAvoidance |
If set, component will use RVO avoidance.
This only runs on the server.
| uint8 UCharacterMovementComponent::bUseSeparateBrakingFriction |
If true, BrakingFriction will be used to slow the character to a stop (when there is no Acceleration).
If false, braking uses the same friction passed to CalcVelocity() (ie GroundFriction when walking), multiplied by BrakingFrictionFactor. This setting applies to all movement modes; if only desired in certain modes, consider toggling it when movement modes change.
| uint8 UCharacterMovementComponent::bWantsToCrouch |
If true, try to crouch (or keep crouching) on next update.
If false, try to stop crouching on next update.
| uint8 UCharacterMovementComponent::CustomMovementMode |
Current custom sub-mode if MovementMode is set to Custom.
This is automatically replicated through the Character owner and for client-server movement functions.
| TEnumAsByte<enum EMovementMode> UCharacterMovementComponent::DefaultLandMovementMode |
Default movement mode when not in water.
Used at player startup or when teleported.
| TEnumAsByte<enum EMovementMode> UCharacterMovementComponent::DefaultWaterMovementMode |
Default movement mode when in water.
Used at player startup or when teleported.
| float UCharacterMovementComponent::FallingLateralFriction |
Friction to apply to lateral air movement when falling.
If bUseSeparateBrakingFriction is false, also affects the ability to stop more quickly when braking (whenever Acceleration is zero).
| float UCharacterMovementComponent::GravityScale |
Custom gravity scale.
Gravity is multiplied by this amount for the character.
| float UCharacterMovementComponent::GroundFriction |
Setting that affects movement control.
Higher values allow faster changes in direction. If bUseSeparateBrakingFriction is false, also affects the ability to stop more quickly when braking (whenever Acceleration is zero), where it is multiplied by BrakingFrictionFactor. When braking, this property allows you to control how much friction is applied when moving across the ground, applying an opposing force that scales with current velocity. This can be used to simulate slippery surfaces such as ice or oil by changing the value (possibly based on the material pawn is standing on).
| float UCharacterMovementComponent::JumpOffJumpZFactor |
Fraction of JumpZVelocity to use when automatically "jumping off" of a base actor that's not allowed to be a base for a character.
(For example, if you're not allowed to stand on other players.)
|
protected |
Location after last PerformMovement or SimulateMovement update.
Used internally to detect changes in position from outside character movement to try to validate the current floor.
|
protected |
Velocity after last PerformMovement or SimulateMovement update.
Used internally to detect changes in velocity from external sources.
| float UCharacterMovementComponent::LedgeCheckThreshold |
Used in determining if pawn is going off ledge.
If the ledge is "shorter" than this value then the pawn will be able to walk off it.
| float UCharacterMovementComponent::MaxDepenetrationWithGeometry |
Max distance we allow simulated proxies to depenetrate when moving out of anything but Pawns.
This is generally more tolerant than with Pawns, because other geometry is either not moving, or is moving predictably with a bit of delay compared to on the server.
| float UCharacterMovementComponent::MaxDepenetrationWithGeometryAsProxy |
Max distance we allow simulated proxies to depenetrate when moving out of anything but Pawns.
This is generally more tolerant than with Pawns, because other geometry is either not moving, or is moving predictably with a bit of delay compared to on the server.
| float UCharacterMovementComponent::MaxDepenetrationWithPawn |
Max distance we are allowed to depenetrate when moving out of other Pawns.
| float UCharacterMovementComponent::MaxDepenetrationWithPawnAsProxy |
Max distance we allow simulated proxies to depenetrate when moving out of other Pawns.
Typically we don't want a large value, because we receive a server authoritative position that we should not then ignore by pushing them out of the local player.
| int32 UCharacterMovementComponent::MaxJumpApexAttemptsPerSimulation |
Max number of attempts per simulation to attempt to exactly reach the jump apex when falling movement reaches the top of the arc.
Limiting this prevents deep recursion when special cases cause collision or other conditions which reactivate the apex condition.
| int32 UCharacterMovementComponent::MaxSimulationIterations |
Max number of iterations used for each discrete simulation step.
Used primarily in the the more advanced movement modes that break up larger time steps (usually those applying gravity such as falling and walking). Increasing this value can address issues with fast-moving objects or complex collision scenarios, at the cost of performance.
WARNING: if (MaxSimulationTimeStep * MaxSimulationIterations) is too low for the min framerate, the last simulation step may exceed MaxSimulationTimeStep to complete the simulation.
| float UCharacterMovementComponent::MaxSimulationTimeStep |
Max time delta for each discrete simulation step.
Used primarily in the the more advanced movement modes that break up larger time steps (usually those applying gravity such as falling and walking). Lowering this value can address issues with fast-moving objects or complex collision scenarios, at the cost of performance.
WARNING: if (MaxSimulationTimeStep * MaxSimulationIterations) is too low for the min framerate, the last simulation step may exceed MaxSimulationTimeStep to complete the simulation.
| float UCharacterMovementComponent::MaxTouchForce |
Maximum force applied to touched physics objects.
If < 0.0f, there is no maximum.
| float UCharacterMovementComponent::MaxWalkSpeed |
The maximum ground speed when walking.
Also determines maximum lateral speed when falling.
|
static |
Minimum delta time considered when ticking.
Delta times below this are not considered. This is a very small non-zero value to avoid potential divide-by-zero in simulation code.
| float UCharacterMovementComponent::MinTimeBetweenTimeStampResets |
Minimum time between client TimeStamp resets.
!! This has to be large enough so that we don't confuse the server if the client can stall or timeout. We do this as we use floats for TimeStamps, and server derives DeltaTime from two TimeStamps. As time goes on, accuracy decreases from those floating point numbers. So we trigger a TimeStamp reset at regular intervals to maintain a high level of accuracy.
| float UCharacterMovementComponent::MinTouchForce |
Minimum Force applied to touched physics objects.
If < 0.0f, there is no minimum.
| TEnumAsByte<enum EMovementMode> UCharacterMovementComponent::MovementMode |
Actor's current movement mode (walking, falling, etc).
| float UCharacterMovementComponent::NavMeshProjectionHeightScaleDown |
Scale of the total capsule height to use for projection from navmesh to underlying geometry in the downward direction.
In other words, trace down to [CapsuleHeight * NavMeshProjectionHeightScaleDown] below nav mesh.
| float UCharacterMovementComponent::NavMeshProjectionHeightScaleUp |
Scale of the total capsule height to use for projection from navmesh to underlying geometry in the upward direction.
In other words, start the trace at [CapsuleHeight * NavMeshProjectionHeightScaleUp] above nav mesh.
| float UCharacterMovementComponent::NavMeshProjectionInterpSpeed |
Speed at which to interpolate agent navmesh offset between traces.
0: Instant (no interp) > 0: Interp speed")
| float UCharacterMovementComponent::NetProxyShrinkHalfHeight |
Shrink simulated proxy capsule half height by this amount, to account for network rounding that may cause encroachment.
Changing during gameplay is not supported.
| float UCharacterMovementComponent::NetProxyShrinkRadius |
Shrink simulated proxy capsule radius by this amount, to account for network rounding that may cause encroachment.
Changing during gameplay is not supported.
| float UCharacterMovementComponent::NetworkLargeClientCorrectionDistance |
If client error is larger than this, sets bNetworkLargeClientCorrection to reduce delay between client adjustments.
| float UCharacterMovementComponent::NetworkMinTimeBetweenClientAckGoodMoves |
Minimum time on the server between acknowledging good client moves.
This can save on bandwidth. Set to 0 to disable throttling.
| float UCharacterMovementComponent::NetworkMinTimeBetweenClientAdjustments |
Minimum time on the server between sending client adjustments when client has exceeded allowable position error.
Should be >= NetworkMinTimeBetweenClientAdjustmentsLargeCorrection (the larger value is used regardless). This can save on bandwidth. Set to 0 to disable throttling.
| float UCharacterMovementComponent::NetworkMinTimeBetweenClientAdjustmentsLargeCorrection |
Minimum time on the server between sending client adjustments when client has exceeded allowable position error by a large amount (NetworkLargeClientCorrectionDistance).
Should be <= NetworkMinTimeBetweenClientAdjustments (the smaller value is used regardless).
| float UCharacterMovementComponent::NetworkSimulatedSmoothLocationTime |
How long to take to smoothly interpolate from the old pawn position on the client to the corrected one sent by the server.
Not used by Linear smoothing.
| float UCharacterMovementComponent::NetworkSimulatedSmoothRotationTime |
How long to take to smoothly interpolate from the old pawn rotation on the client to the corrected one sent by the server.
Not used by Linear smoothing.
|
protected |
Used to limit number of jump apex attempts per tick.
| float UCharacterMovementComponent::PerchAdditionalHeight |
When perching on a ledge, add this additional distance to MaxStepHeight when determining how high above a walkable floor we can perch.
Note that we still enforce MaxStepHeight to start the step up; this just allows the character to hang off the edge or step slightly higher off the floor. (
| float UCharacterMovementComponent::PerchRadiusThreshold |
Don't allow the character to perch on the edge of a surface if the contact is this close to the edge of the capsule.
Note that characters will not fall off if they are within MaxStepHeight of a walkable surface below.
| float UCharacterMovementComponent::PushForcePointZOffsetFactor |
Z-Offset for the position the force is applied to.
0.0f is the center of the physics object, 1.0f is the top and -1.0f is the bottom of the object.
| FVector UCharacterMovementComponent::RequestedVelocity |
Velocity requested by path following.
| FRootMotionMovementParams UCharacterMovementComponent::RootMotionParams |
Animation root motion (special case for now)
Root Motion movement params. Holds result of anim montage root motion during PerformMovement(), and is overridden during autonomous move playback to force historical root motion for MoveAutonomous() calls
| FRotator UCharacterMovementComponent::RotationRate |
Change in rotation per second, used when UseControllerDesiredRotation or OrientRotationToMovement are true.
Set a negative value for infinite rotation rate and instant turns.
|
protected |
Timestamp of last client adjustment sent.
See NetworkMinTimeBetweenClientAdjustments.
|
protected |
Timestamp of last client adjustment sent.
See NetworkMinTimeBetweenClientAdjustments.
|
protected |
Timestamp when location or rotation last changed during an update.
Only valid on the server.