Applies attack movement force to attacker position over time.
Korean: 공격 이동 적용 (Apply Attack Movement)
Uses smooth ease-out cubic curve for realistic lunge feel:
Original stance position (does not change during attack)
Attack movement result with displacement
Time elapsed since attack started
Whether in recovery (return) phase
New position with attack displacement applied
// In animation update loop (60fps)
const basePos = new THREE.Vector3(0, 0, 0); // Original stance position
if (elapsedTime < result.lungeDuration) {
// Lunge forward phase
const newPosition = physics.applyAttackMovement(
basePos,
result,
elapsedTime,
false
);
} else if (elapsedTime < result.totalDuration) {
// Recovery return phase
const newPosition = physics.applyAttackMovement(
basePos,
result,
elapsedTime,
true
);
}
Calculates attack movement displacement and timing.
Korean: 공격 이동 계산 (Calculate Attack Movement)
Determines forward lunge distance and recovery timing based on:
Attack movement configuration
Attack movement result with displacement and timing
// Front kick with Heaven stance
const kick = physics.calculateAttackMovement({
animationType: AnimationType.FRONT_KICK,
currentStance: TrigramStance.GEON,
direction: attackVector,
animationDuration: 0.4,
});
// Result: ~0.88m forward (0.8m * 1.1 Geon modifier)
// Jab with Mountain stance
const jab = physics.calculateAttackMovement({
animationType: AnimationType.JAB,
currentStance: TrigramStance.GAN,
direction: attackVector,
animationDuration: 0.25,
});
// Result: ~0.24m forward (0.3m * 0.8 Gan modifier)
PrivategetPrivateGets base forward movement distance for animation type.
Korean: 기본 이동 거리 (Base Movement Distance)
Movement distances by technique category:
Type of attack animation
Base movement distance in meters
PrivategetPrivateGets stance movement modifier for attack lunge.
Korean: 자세 이동 배율 (Stance Movement Modifier)
Trigram stance movement modifiers based on combat philosophy:
Current trigram stance
Movement multiplier (0.8 to 1.3)
Checks if attacker is in recovery return phase.
Korean: 회복 상태 확인 (Check Recovery State)
Time elapsed since attack started
Attack movement result with timing
True if in recovery return phase
Attack Movement Physics Engine.
Korean: 공격 이동 물리 엔진
Calculates realistic forward movement during attack animations based on technique type, stance modifiers, and animation timing. Provides smooth lunge and recovery phases for authentic martial arts feel.
Example
Korean
공격이동물리