Unreal Engine C++ Character Movement Functions: Comprehensive Guide
void UnCrouch(bool bClientSimulation); // 取消蹲下 void StopJumping(); // 停止跳跃 void StopAnimMontage(class UAnimMontage* AnimMontage); // 停止指定的动画蒙太奇 void ServerMovePacked(const struct FCharacterServerMovePackedBits& PackedBits); // 通过打包位移信息来更新服务器端的位置 void ServerMoveOld(float OldTimeStamp, const struct FVector_NetQuantize10& OldAccel, unsigned char OldMoveFlags); // 通过旧的时间戳、加速度和移动标记来更新服务器端的位置 void ServerMoveNoBase(float Timestamp, const struct FVector_NetQuantize10& InAccel, const struct FVector_NetQuantize100& ClientLoc, unsigned char CompressedMoveFlags, unsigned char ClientRoll, uint32_t View, unsigned char ClientMovementMode); // 通过时间戳、加速度、位置、移动标记、旋转角度、视角和移动模式来更新服务器端的位置 void ServerMoveDualNoBase(float TimeStamp0, const struct FVector_NetQuantize10& InAccel0, unsigned char PendingFlags, uint32_t View0, float Timestamp, const struct FVector_NetQuantize10& InAccel, const struct FVector_NetQuantize100& ClientLoc, unsigned char NewFlags, unsigned char ClientRoll, uint32_t View, unsigned char ClientMovementMode); // 通过时间戳、加速度、位置、移动标记、旋转角度、视角和移动模式来更新服务器端的位置(双倍) void ServerMoveDualHybridRootMotion(float TimeStamp0, const struct FVector_NetQuantize10& InAccel0, unsigned char PendingFlags, uint32_t View0, float Timestamp, const struct FVector_NetQuantize10& InAccel, const struct FVector_NetQuantize100& ClientLoc, unsigned char NewFlags, unsigned char ClientRoll, uint32_t View, class UPrimitiveComponent* ClientMovementBase, const class FName& ClientBaseBoneName, unsigned char ClientMovementMode); // 通过时间戳、加速度、位置、移动标记、旋转角度、视角、移动组件、基础骨骼名称和移动模式来更新服务器端的位置(混合根动作) void ServerMoveDual(float TimeStamp0, const struct FVector_NetQuantize10& InAccel0, unsigned char PendingFlags, uint32_t View0, float Timestamp, const struct FVector_NetQuantize10& InAccel, const struct FVector_NetQuantize100& ClientLoc, unsigned char NewFlags, unsigned char ClientRoll, uint32_t View, class UPrimitiveComponent* ClientMovementBase, const class FName& ClientBaseBoneName, unsigned char ClientMovementMode); // 通过时间戳、加速度、位置、移动标记、旋转角度、视角、移动组件、基础骨骼名称和移动模式来更新服务器端的位置(双倍) void ServerMove(float Timestamp, const struct FVector_NetQuantize10& InAccel, const struct FVector_NetQuantize100& ClientLoc, unsigned char CompressedMoveFlags, unsigned char ClientRoll, uint32_t View, class UPrimitiveComponent* ClientMovementBase, const class FName& ClientBaseBoneName, unsigned char ClientMovementMode); // 通过时间戳、加速度、位置、移动标记、旋转角度、视角、移动组件、基础骨骼名称和移动模式来更新服务器端的位置 void RootMotionDebugClientPrintOnScreen(const class FString& inString); // 在屏幕上打印根动作调试信息 float PlayAnimMontage(class UAnimMontage* AnimMontage, float InPlayRate, const class FName& StartSectionName); // 播放指定的动画蒙太奇 void OnWalkingOffLedge(const struct FVector& PreviousFloorImpactNormal, const struct FVector& PreviousFloorContactNormal, const struct FVector& PreviousLocation, float TimeDelta); // 当角色从地面上跌落时触发 void OnRep_RootMotion(); // 当根动作被复制到客户端时触发 void OnRep_ReplicatedBasedMovement(); // 当基础移动被复制到客户端时触发 void OnRep_ReplayLastTransformUpdateTimeStamp(); // 当最后的变换更新时间戳被复制到客户端时触发 void OnRep_IsCrouched(); // 当蹲下状态被复制到客户端时触发 void OnLaunched(const struct FVector& LaunchVelocity, bool bXYOverride, bool bZOverride); // 当角色被发射时触发 void OnLanded(const struct FHitResult& hit); // 当角色着陆时触发 void OnJumped(); // 当角色跳跃时触发 void LaunchCharacter(const struct FVector& LaunchVelocity, bool bXYOverride, bool bZOverride); // 发射角色 void K2_UpdateCustomMovement(float DeltaTime); // 更新自定义移动 void K2_OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust); // 开始蹲下 void K2_OnMovementModeChanged(EMovementMode PrevMovementMode, EMovementMode NewMovementMode, unsigned char PrevCustomMode, unsigned char NewCustomMode); // 移动模式改变 void K2_OnEndCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust); // 结束蹲下 void Jump(); // 跳跃 bool IsPlayingRootMotion(); // 是否正在播放根动作 bool IsPlayingNetworkedRootMotionMontage(); // 是否正在播放网络根动作蒙太奇 bool IsJumpProvidingForce(); // 是否正在提供跳跃力量 bool HasAnyRootMotion(); // 是否有任何根动作 class UAnimMontage* GetCurrentMontage(); // 获取当前动画蒙太奇 struct FVector GetBaseTranslationOffset(); // 获取基础翻译偏移 struct FRotator GetBaseRotationOffsetRotator(); // 获取基础旋转偏移旋转器 float GetAnimRootMotionTranslationScale(); // 获取动画根动作翻译比例 void Crouch(bool bClientSimulation); // 蹲下 void ClientVeryShortAdjustPosition(float Timestamp, const struct FVector& NewLoc, class UPrimitiveComponent* NewBase, const class FName& NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, unsigned char ServerMovementMode); // 客户端非常短的位置调整 void ClientMoveResponsePacked(const struct FCharacterMoveResponsePackedBits& PackedBits); // 客户端移动响应(打包) void ClientCheatWalk(); // 客户端作弊:行走 void ClientCheatGhost(); // 客户端作弊:穿墙 void ClientCheatFly(); // 客户端作弊:飞行 void ClientAdjustRootMotionSourcePosition(float Timestamp, const struct FRootMotionSourceGroup& ServerRootMotion, bool bHasAnimRootMotion, float ServerMontageTrackPosition, const struct FVector& ServerLoc, const struct FVector_NetQuantizeNormal& ServerRotation, float ServerVelZ, class UPrimitiveComponent* ServerBase, const class FName& ServerBoneName, bool bHasBase, bool bBaseRelativePosition, unsigned char ServerMovementMode); // 客户端调整根动作源位置 void ClientAdjustRootMotionPosition(float Timestamp, float ServerMontageTrackPosition, const struct FVector& ServerLoc, const struct FVector_NetQuantizeNormal& ServerRotation, float ServerVelZ, class UPrimitiveComponent* ServerBase, const class FName& ServerBoneName, bool bHasBase, bool bBaseRelativePosition, unsigned char ServerMovementMode); // 客户端调整根动作位置 void ClientAdjustPosition(float Timestamp, const struct FVector& NewLoc, const struct FVector& NewVel, class UPrimitiveComponent* NewBase, const class FName& NewBaseBoneName, bool bHasBase, bool bBaseRelativePosition, unsigned char ServerMovementMode); // 客户端调整位置 void ClientAckGoodMove(float Timestamp); // 客户端确认良好移动 bool CanJumpInternal(); // 是否可以跳跃(内部) bool CanJump(); // 是否可以跳跃 bool CanCrouch(); // 是否可以蹲下 void CacheInitialMeshOffset(const struct FVector& MeshRelativeLocation, const struct FRotator& MeshRelativeRotation); // 缓存初始网格偏移
原文地址: https://www.cveoy.top/t/topic/nKVe 著作权归作者所有。请勿转载和采集!