主题
GameCore.MovementSystem
GameDataUnitLocomotionAnimationProfile 双端
命名空间 GameCore.MovementSystem
csharp
public class GameDataUnitLocomotionAnimationProfile : GameDataCategory<GameDataUnitLocomotionAnimationProfile>, IGameDataCategory<GameDataUnitLocomotionAnimationProfile>, IGameData<GameDataUnitLocomotionAnimationProfile>, IGameData构造函数
GameDataUnitLocomotionAnimationProfile 双端
csharp
public GameDataUnitLocomotionAnimationProfile(GameLink<GameDataUnitLocomotionAnimationProfile, GameDataUnitLocomotionAnimationProfile> link)GameDataUnitLocomotionAnimationProfile 双端
csharp
public GameDataUnitLocomotionAnimationProfile(IGameLink<GameDataUnitLocomotionAnimationProfile> link)属性
Idle 双端
csharp
public UnitLocomotionAnimationClip? Idle { get; set; }Move 双端
csharp
public UnitLocomotionAnimationClip? Move { get; set; }JumpStart 双端
csharp
public UnitLocomotionAnimationClip? JumpStart { get; set; }AirJumpStart 双端
csharp
public UnitLocomotionAnimationClip? AirJumpStart { get; set; }AirRise 双端
csharp
public UnitLocomotionAnimationClip? AirRise { get; set; }AirFall 双端
csharp
public UnitLocomotionAnimationClip? AirFall { get; set; }Land 双端
csharp
public UnitLocomotionAnimationClip? Land { get; set; }EnterMoveSpeed 双端
csharp
public float EnterMoveSpeed { get; set; }ExitMoveSpeed 双端
csharp
public float ExitMoveSpeed { get; set; }FallSpeedThreshold 双端
csharp
public float FallSpeedThreshold { get; set; }MinAirTimeForLand 双端
csharp
public TimeSpan MinAirTimeForLand { get; set; }LandSpeedThreshold 双端
csharp
public float LandSpeedThreshold { get; set; }InterruptLandOnMove 双端
csharp
public bool InterruptLandOnMove { get; set; }MinLandTimeForMoveInterrupt 双端
csharp
public TimeSpan MinLandTimeForMoveInterrupt { get; set; }LandMoveInterruptSpeed 双端
csharp
public float LandMoveInterruptSpeed { get; set; }MoveSpeedScaleMode 双端
csharp
public UnitLocomotionAnimationSpeedScaleMode MoveSpeedScaleMode { get; set; }MovementAnimationSpeedRatio 双端
csharp
public float MovementAnimationSpeedRatio { get; set; }GameDataUnitMovementController 双端
命名空间 GameCore.MovementSystem
csharp
public class GameDataUnitMovementController : GameDataCategory<GameDataUnitMovementController>, IGameDataCategory<GameDataUnitMovementController>, IGameData<GameDataUnitMovementController>, IGameDataUnit data configuration for constructing and initializing a movement controller.
构造函数
GameDataUnitMovementController 双端
csharp
public GameDataUnitMovementController(GameLink<GameDataUnitMovementController, GameDataUnitMovementController> link)GameDataUnitMovementController 双端
csharp
public GameDataUnitMovementController(IGameLink<GameDataUnitMovementController> link)属性
InitialMode 双端
csharp
public UnitMovementMode InitialMode { get; set; }Initial movement mode applied after the controller is created. Navigation modes are resolved to the scene-appropriate navigation mode at runtime.
ApplyInitialMode 双端
csharp
public bool ApplyInitialMode { get; set; }Whether InitialMode should be applied immediately after controller creation.
ExtraAirJumpsProperty 双端
csharp
public IGameLink<GameDataUnitProperty>? ExtraAirJumpsProperty { get; set; }Unit numeric property used to resolve the number of additional jumps allowed while airborne.
PhysicalCharacter 双端
csharp
public UnitPhysicalCharacterMovementSettings PhysicalCharacter { get; set; }Physical character motor settings used when InitialMode is PhysicalCharacter.
IUnitMovementController 双端
命名空间 GameCore.MovementSystem
csharp
public interface IUnitMovementControllerGameCore-visible view of a Unit movement controller.
属性
RequestedMode 双端
csharp
public UnitMovementMode RequestedMode { get; }Mode most recently requested by gameplay code.
EffectiveMode 双端
csharp
public UnitMovementMode EffectiveMode { get; }Mode currently in effect after scene-space and active motor constraints are applied.
ActiveNodeMotor 双端
csharp
public UnitNodeMotorType? ActiveNodeMotor { get; }Active node-level motor when the effective mode is node-driven; otherwise null.
Authority 双端
csharp
public UnitMovementAuthority Authority { get; }Current transform authority for movement.
IsActive 双端
csharp
public bool IsActive { get; }Whether the controller currently owns continuous locomotion.
CanAcceptMoveIntent 双端
csharp
public bool CanAcceptMoveIntent { get; }Whether the controller can currently consume continuous movement intent.
CanAcceptPathing 双端
csharp
public bool CanAcceptPathing { get; }Whether the controller can currently consume pathing and approach movement.
IsGrounded 双端
csharp
public bool IsGrounded { get; }Whether the active sampled movement source considers the Unit grounded.
CanJump 双端
csharp
public bool CanJump { get; }Whether a jump request would currently be accepted.
ExtraAirJumpCount 双端
csharp
public int ExtraAirJumpCount { get; }Number of additional jumps allowed while airborne.
RemainingAirJumps 双端
csharp
public int RemainingAirJumps { get; }Number of additional airborne jumps remaining before the next grounded reset.
LastTransitionFailureReason 双端
csharp
public string? LastTransitionFailureReason { get; }Most recent movement mode transition failure reason, if any.
LastJumpFailureReason 双端
csharp
public string? LastJumpFailureReason { get; }Most recent jump request failure reason, if any.
方法
GetMovementSignal 双端
csharp
UnitMovementSignal GetMovementSignal()Samples the latest movement signal for animation, debugging, and low-frequency gameplay queries.
ApplyMovementControllerData 双端
csharp
void ApplyMovementControllerData(GameDataUnitMovementController data)Applies movement controller settings resolved from GameDataUnit.MovementController.
PropertyUnitMovement 双端
命名空间 GameCore.MovementSystem
csharp
public readonly struct PropertyUnitMovement : IExtendableEnum<PropertyUnitMovement>, IExtendableEnum, IExtendedEnum, ISyncIdOwner, IGameClassStable Unit host property keys used by the movement controller replication path.
方法
OnRegisterGameClass 双端
csharp
public static void OnRegisterGameClass()Registers stable movement property hashes and their default synchronization type.
ToString 双端
csharp
public override string? ToString()Equals 双端
csharp
public override bool Equals(object? obj)GetHashCode 双端
csharp
public override int GetHashCode()operator == 双端
csharp
public static bool operator ==(PropertyUnitMovement left, PropertyUnitMovement right)operator != 双端
csharp
public static bool operator !=(PropertyUnitMovement left, PropertyUnitMovement right)字段
MovementSignalFlagsHash 双端
csharp
public const int MovementSignalFlagsHashStable hash for MovementSignalFlags.
MovementJumpSequenceHash 双端
csharp
public const int MovementJumpSequenceHashStable hash for MovementJumpSequence.
MovementGroundingSequenceHash 双端
csharp
public const int MovementGroundingSequenceHashStable hash for MovementGroundingSequence.
MovementAirJumpCountsHash 双端
csharp
public const int MovementAirJumpCountsHashStable hash for MovementAirJumpCounts.
MovementSignalFlags 双端
csharp
public static readonly PropertyUnitMovement MovementSignalFlagsPacked low-frequency movement mode, authority, source, and boolean signal flags.
MovementJumpSequence 双端
csharp
public static readonly PropertyUnitMovement MovementJumpSequenceMonotonic sequence incremented whenever a jump request is accepted.
MovementGroundingSequence 双端
csharp
public static readonly PropertyUnitMovement MovementGroundingSequencePacked grounded-change sequence and latest grounding transition.
MovementAirJumpCounts 双端
csharp
public static readonly PropertyUnitMovement MovementAirJumpCountsPacked configured and remaining additional airborne jump counts.
InnerValue 双端
csharp
public readonly Enum InnerValueWrapped enum value.
UnitLocomotionAnimation 双端
命名空间 GameCore.MovementSystem
csharp
public sealed class UnitLocomotionAnimation : TagComponent, IContextTypeService<Entity, UnitLocomotionAnimation>构造函数
UnitLocomotionAnimation 双端
csharp
public UnitLocomotionAnimation(Entity host)属性
Unit 双端
csharp
public Unit Unit { get; }Profile 双端
csharp
public GameDataUnitLocomotionAnimationProfile? Profile { get; }方法
CreateInstance 双端
csharp
public static UnitLocomotionAnimation CreateInstance(Entity content)ApplyProfile 双端
csharp
public bool ApplyProfile(GameDataUnitLocomotionAnimationProfile? profile)UnitLocomotionAnimationClip 双端
命名空间 GameCore.MovementSystem
csharp
public sealed class UnitLocomotionAnimationClip构造函数
UnitLocomotionAnimationClip 双端
csharp
public UnitLocomotionAnimationClip()属性
Animation 双端
csharp
public GameCore.ResourceType.Animation Animation { get; set; }LogicLayer 双端
csharp
public AnimationLogicLayer LogicLayer { get; set; }Priority 双端
csharp
public int Priority { get; set; }动画优先级,有效范围为 0-31。低于 0 的值会按 0 处理,高于 31 的值会按 31 处理。
BodyPart 双端
csharp
public AnimationBodyPart BodyPart { get; set; }IsLooping 双端
csharp
public bool IsLooping { get; set; }BlendIn 双端
csharp
public TimeSpan BlendIn { get; set; }Speed 双端
csharp
public float Speed { get; set; }UnitLocomotionAnimationExtensions 双端
命名空间 GameCore.MovementSystem
csharp
public static class UnitLocomotionAnimationExtensions方法
GetUnitLocomotionAnimation 双端
csharp
public static UnitLocomotionAnimation? GetUnitLocomotionAnimation(this Unit unit)GetOrCreateUnitLocomotionAnimation 双端
csharp
public static UnitLocomotionAnimation GetOrCreateUnitLocomotionAnimation(this Unit unit)UseUnitLocomotionAnimation 双端
csharp
public static bool UseUnitLocomotionAnimation(this Unit unit, IGameLink<GameDataUnitLocomotionAnimationProfile>? profile = null)DisableUnitLocomotionAnimation 双端
csharp
public static bool DisableUnitLocomotionAnimation(this Unit unit)UnitMovementAuthority 双端
命名空间 GameCore.MovementSystem
csharp
public enum UnitMovementAuthorityRuntime authority source for Unit transform updates.
枚举值
UnitDriven— The Unit transform is authoritative and visual or bound nodes follow the Unit.NodeDriven— A bound node is authoritative and writes its transform back to the Unit.Manual— Binding exists for lookup or metadata, but transform synchronization is not automatic.Scripted— Continuous transform ownership belongs to an explicit scripted movement owner.
UnitMovementGroundingTransition 双端
命名空间 GameCore.MovementSystem
csharp
public enum UnitMovementGroundingTransitionDirection of the latest grounded state transition in a movement signal.
枚举值
None— No grounded state transition has been observed for the current sequence value.BecameGrounded— The sampled source changed from airborne to grounded.BecameAirborne— The sampled source changed from grounded to airborne.
UnitMovementMode 双端
命名空间 GameCore.MovementSystem
csharp
public enum UnitMovementModeHigh-level movement ownership mode for a Unit.
枚举值
NoLocomotion— No controller-owned continuous locomotion. Explicit position changes such as teleport are still allowed.SurfaceNavigation— 2.5D single-surface navigation/walkable movement.VolumetricNavigation— 3D navigation movement without a node-level motor.PhysicalCharacter— Movement is driven by a node-level physical character motor.Rigidbody— Reserved for future rigid body driven movement.Scripted— Continuous movement is owned by script or another explicit custom mover.
UnitMovementModeExtensions 双端
命名空间 GameCore.MovementSystem
csharp
public static class UnitMovementModeExtensionsHelper methods for UnitMovementMode.
方法
IsNavigationMode 双端
csharp
public static bool IsNavigationMode(this UnitMovementMode mode)Returns whether the mode represents a navigation-backed movement mode.
UnitMovementSignal 双端
命名空间 GameCore.MovementSystem
csharp
public readonly struct UnitMovementSignalLatest movement facts exposed by a Unit movement controller.
属性
IsActive 双端
csharp
public bool IsActive { get; init; }Whether the Unit currently has any controller-owned continuous locomotion mode.
Mode 双端
csharp
public UnitMovementMode Mode { get; init; }Effective movement mode after scene-space and active motor constraints are applied.
Authority 双端
csharp
public UnitMovementAuthority Authority { get; init; }Current transform authority for movement.
ActiveNodeMotor 双端
csharp
public UnitNodeMotorType? ActiveNodeMotor { get; init; }Active node-level motor when the current movement mode is node-driven; otherwise null.
SourceKind 双端
csharp
public UnitMovementSignalSourceKind SourceKind { get; init; }Source used to build this signal sample.
CanAcceptMoveIntent 双端
csharp
public bool CanAcceptMoveIntent { get; init; }Whether the current mode can consume continuous directional movement intent.
CanAcceptPathing 双端
csharp
public bool CanAcceptPathing { get; init; }Whether the current mode can consume navigation pathing or approach requests.
IsGrounded 双端
csharp
public bool IsGrounded { get; init; }Whether the sampled movement source considers the Unit grounded.
HasMoveIntent 双端
csharp
public bool HasMoveIntent { get; init; }Whether a continuous movement direction is currently recorded, even if temporarily suppressed.
IsMoveIntentSuppressed 双端
csharp
public bool IsMoveIntentSuppressed { get; init; }Whether the recorded movement intent is currently suppressed by higher-priority gameplay logic.
IsMoveIntentActivelyApplied 双端
csharp
public bool IsMoveIntentActivelyApplied { get; init; }Whether the recorded movement intent is currently being submitted to the active motor or navigation backend.
IsMoveIntent3D 双端
csharp
public bool IsMoveIntent3D { get; init; }Whether MoveDirection came from a three-dimensional input vector.
MoveDirection 双端
csharp
public Vector3 MoveDirection { get; init; }Latest requested movement direction. Zero means no movement intent is recorded.
DesiredVelocity 双端
csharp
public Vector3 DesiredVelocity { get; init; }Desired movement velocity derived from movement intent and Unit movement speed.
Velocity 双端
csharp
public Vector3 Velocity { get; init; }Best available sampled movement velocity. Physical character mode uses motor velocity; navigation fallback may use desired velocity.
HorizontalSpeed 双端
csharp
public float HorizontalSpeed { get; init; }Horizontal speed computed from Velocity X/Y components.
VerticalSpeed 双端
csharp
public float VerticalSpeed { get; init; }Vertical speed computed from Velocity Z component.
JumpSequence 双端
csharp
public int JumpSequence { get; init; }Monotonic counter incremented when the controller accepts a jump request. Consumers should compare this value against their previous sample instead of relying on a transient bool.
GroundedChangeSequence 双端
csharp
public int GroundedChangeSequence { get; init; }Monotonic counter incremented when sampled grounded state changes.
LastGroundingTransition 双端
csharp
public UnitMovementGroundingTransition LastGroundingTransition { get; init; }Last sampled grounded transition. Compare GroundedChangeSequence to detect new transitions per consumer.
HasVelocity 双端
csharp
public bool HasVelocity { get; }Whether Velocity is non-zero using a small tolerance.
UnitMovementSignalSourceKind 双端
命名空间 GameCore.MovementSystem
csharp
public enum UnitMovementSignalSourceKindSource that produced a movement signal sample.
枚举值
None— No signal source produced this sample.Navigation— The signal was sampled from controller-owned navigation movement.PhysicalCharacter— The signal was sampled from a physical character movement motor.Scripted— The signal represents a scripted movement mode.NoLocomotion— The Unit is intentionally not using controller-owned continuous locomotion.LegacyNavigationFallback— The Unit has no movement controller; the signal was inferred from legacy navigation-compatible Unit state.
UnitMovementSignalSyncCodec 双端
命名空间 GameCore.MovementSystem
csharp
public static class UnitMovementSignalSyncCodecPacks low-frequency Unit movement signal facts into stable Unit host properties. Continuous velocity is intentionally excluded and should be sampled from client presentation transforms.
方法
EncodeFlags 双端
csharp
public static int EncodeFlags(UnitMovementSignal signal, UnitMovementMode requestedMode, UnitNodeMotorType? activeNodeMotor, bool canJump)Encodes low-frequency movement signal flags into one stable integer property.
DecodeEffectiveMode 双端
csharp
public static UnitMovementMode DecodeEffectiveMode(int flags)Decodes effective movement mode from packed flags.
DecodeRequestedMode 双端
csharp
public static UnitMovementMode DecodeRequestedMode(int flags)Decodes requested movement mode from packed flags.
DecodeAuthority 双端
csharp
public static UnitMovementAuthority DecodeAuthority(int flags)Decodes movement authority from packed flags.
DecodeSourceKind 双端
csharp
public static UnitMovementSignalSourceKind DecodeSourceKind(int flags)Decodes movement signal source from packed flags.
DecodeActiveNodeMotor 双端
csharp
public static UnitNodeMotorType? DecodeActiveNodeMotor(int flags)Decodes active node motor from packed flags.
DecodeIsActive 双端
csharp
public static bool DecodeIsActive(int flags)Returns whether the packed signal is active.
DecodeCanAcceptMoveIntent 双端
csharp
public static bool DecodeCanAcceptMoveIntent(int flags)Returns whether the packed signal can accept move intent.
DecodeCanAcceptPathing 双端
csharp
public static bool DecodeCanAcceptPathing(int flags)Returns whether the packed signal can accept pathing.
DecodeIsGrounded 双端
csharp
public static bool DecodeIsGrounded(int flags)Returns whether the packed signal is grounded.
DecodeHasMoveIntent 双端
csharp
public static bool DecodeHasMoveIntent(int flags)Returns whether movement intent is present.
DecodeIsMoveIntentSuppressed 双端
csharp
public static bool DecodeIsMoveIntentSuppressed(int flags)Returns whether movement intent is suppressed.
DecodeIsMoveIntentActivelyApplied 双端
csharp
public static bool DecodeIsMoveIntentActivelyApplied(int flags)Returns whether movement intent is actively applied.
DecodeIsMoveIntent3D 双端
csharp
public static bool DecodeIsMoveIntent3D(int flags)Returns whether movement intent came from a 3D vector.
DecodeCanJump 双端
csharp
public static bool DecodeCanJump(int flags)Returns whether a jump request would be accepted.
EncodeGroundingSequence 双端
csharp
public static int EncodeGroundingSequence(int groundedChangeSequence, UnitMovementGroundingTransition transition)Encodes grounded change sequence and latest transition into one stable integer property.
DecodeGroundedChangeSequence 双端
csharp
public static int DecodeGroundedChangeSequence(int packed)Decodes grounded change sequence from a packed property value.
DecodeGroundingTransition 双端
csharp
public static UnitMovementGroundingTransition DecodeGroundingTransition(int packed)Decodes latest grounding transition from a packed property value.
EncodeAirJumpCounts 双端
csharp
public static int EncodeAirJumpCounts(int extraAirJumps, int remainingAirJumps)Encodes configured and remaining additional airborne jumps into one stable integer property.
DecodeExtraAirJumpCount 双端
csharp
public static int DecodeExtraAirJumpCount(int packed)Decodes configured additional airborne jump count.
DecodeRemainingAirJumps 双端
csharp
public static int DecodeRemainingAirJumps(int packed)Decodes remaining additional airborne jump count.
UnitNodeMotorType 双端
命名空间 GameCore.MovementSystem
csharp
public enum UnitNodeMotorTypeNode-level motor type currently active under a Unit movement controller.
枚举值
PhysicalCharacter— A kinematic capsule character motor on a bound node.Rigidbody— Reserved for future rigid-body-driven Unit movement.Scripted— Reserved for a custom node-level motor owned by script or another explicit system.
UnitPhysicalCharacterMovementSettings 双端
命名空间 GameCore.MovementSystem
csharp
public sealed class UnitPhysicalCharacterMovementSettingsUnit data configuration for the physical character movement motor.
构造函数
UnitPhysicalCharacterMovementSettings 双端
csharp
public UnitPhysicalCharacterMovementSettings()属性
EnsureUnitNodeBinding 双端
csharp
public bool EnsureUnitNodeBinding { get; set; }Whether activation may create the required Unit node binding and motor when missing.
EnsureStaticMeshColliders 双端
csharp
public bool EnsureStaticMeshColliders { get; set; }Whether activation should ensure scene static mesh colliders are available on the server.
EnsureTerrainCollider 双端
csharp
public bool EnsureTerrainCollider { get; set; }Whether activation should ensure a terrain collider is available on the server.
UseCharacterCollisionRoles 双端
csharp
public bool UseCharacterCollisionRoles { get; set; }Whether the native character motor should use static collider role metadata.
Radius 双端
csharp
public float Radius { get; set; }Capsule radius in scene units.
Height 双端
csharp
public float Height { get; set; }Capsule total height in scene units.
StepHeight 双端
csharp
public float StepHeight { get; set; }Maximum step height the character can climb.
MaxSlopeDegrees 双端
csharp
public float MaxSlopeDegrees { get; set; }Maximum walkable slope angle in degrees.
Gravity 双端
csharp
public Vector3? Gravity { get; set; }Optional custom gravity. When null, the motor follows the scene physics world's gravity.
CollisionLayer 双端
csharp
public uint CollisionLayer { get; set; }Collision layer used by the character capsule.
CollisionMask 双端
csharp
public uint CollisionMask { get; set; }Collision mask used by the character capsule.
LocalOffset 双端
csharp
public Vector3? LocalOffset { get; set; }Optional local offset from the Unit transform to the physics character node.
LocalRotation 双端
csharp
public Quaternion? LocalRotation { get; set; }Optional local rotation from the Unit transform to the physics character node.