// Movement/Core/DA_MovementConfig.ts import { S_AngleThresholds } from '#root/Movement/Surface/S_AngleThresholds.ts'; import type { Float } from '#root/UE/Float.ts'; import { PrimaryDataAsset } from '#root/UE/PrimaryDataAsset.ts'; export class DA_MovementConfig extends PrimaryDataAsset { // ════════════════════════════════════════════════════════════════════════════════════════ // MOVEMENT PHYSICS // ════════════════════════════════════════════════════════════════════════════════════════ /** * Maximum horizontal movement speed in UE units per second * Character cannot exceed this speed through ground movement * Used as target velocity cap in ProcessGroundMovement * * @category Movement Physics * @instanceEditable true * @unit cm/s */ public readonly MaxSpeed: Float = 800.0; /** * Speed of velocity interpolation towards target velocity * Higher values = faster acceleration, more responsive feel * Used with VInterpTo for smooth acceleration curves * Value represents interpolation speed, not actual acceleration rate * * @category Movement Physics * @instanceEditable true */ public readonly Acceleration: Float = 10.0; /** * Speed of velocity interpolation towards zero when no input * Higher values = faster stopping, less sliding * Used with VInterpTo for smooth deceleration curves * Should typically be <= Acceleration for natural feel * * @category Movement Physics * @instanceEditable true */ public readonly Friction: Float = 8.0; /** * Gravitational acceleration in UE units per second squared * Applied to vertical velocity when character is airborne * Standard Earth gravity ≈ 980 cm/s² in UE units * Only affects Z-axis velocity, horizontal movement unaffected * * @category Movement Physics * @instanceEditable true * @unit cm/s^2 */ public readonly Gravity: Float = 980.0; // ════════════════════════════════════════════════════════════════════════════════════════ // SURFACE DETECTION // ════════════════════════════════════════════════════════════════════════════════════════ /** * Surface classification angle thresholds in degrees * Walkable ≤50°, SteepSlope ≤85°, Wall ≤95°, Ceiling >95° * * @category Surface Detection * @instanceEditable true */ public readonly AngleThresholdsDegrees: S_AngleThresholds = { Walkable: 50, SteepSlope: 85, Wall: 95, }; // ════════════════════════════════════════════════════════════════════════════════════════ // COLLISION SETTINGS // ════════════════════════════════════════════════════════════════════════════════════════ /** * Distance to trace downward for ground detection * Should be slightly larger than capsule half-height * * @category Collision Settings * @instanceEditable true * @unit cm */ public readonly GroundTraceDistance: Float = 50.0; /** * Minimum step size for collision sweeps * Smaller values = more precise but more expensive * * @category Collision Settings * @instanceEditable true * @unit cm */ public readonly MinStepSize: Float = 1.0; /** * Maximum step size for collision sweeps * Larger values = less precise but cheaper * * @category Collision Settings * @instanceEditable true * @unit cm */ public readonly MaxStepSize: Float = 50.0; /** * Maximum collision checks allowed per frame * Prevents infinite loops in complex geometry * * @category Collision Settings * @instanceEditable true */ public readonly MaxCollisionChecks: Float = 25; // ════════════════════════════════════════════════════════════════════════════════════════ // CHARACTER ROTATION // ════════════════════════════════════════════════════════════════════════════════════════ /** * Character rotation speed (degrees per second) * How fast character turns toward movement direction * * @category Character Rotation * @instanceEditable true * @unit deg/s */ public RotationSpeed: Float = 360.0; /** * Minimum movement speed required to rotate character * Prevents rotation jitter when nearly stationary * * @category Character Rotation * @instanceEditable true * @unit cm/s */ public MinSpeedForRotation: Float = 50.0; /** * Enable/disable character rotation toward movement * Useful for debugging or special movement modes * * @category Character Rotation * @instanceEditable true */ public ShouldRotateToMovement: boolean = true; }