Log inGet started
World

Slag Saint

Branchmain
Branchesmain
Commit5e87281b36

README.md

game/combat/fight

Stateless helpers shared by Emberward.component and CombatCamera.component.

  • Fight.damp(current, goal, tau, dt) — frame-rate independent approach.
  • Fight.xyz(p) — read any position-ish value as three numbers.
  • Fight.horizDist(a, b) / Fight.yawTo(a, b) / Fight.angleDelta(from, to).
  • Fight.yawQuat(yaw) — a rotation about +Y as the array a transform takes.
  • Fight.inArc(origin, yaw, target, arcDegrees, range) — cone + range test.
  • Fight.newShake() / Fight.addShake(s, amp, dur) / Fight.sampleShake(s, dt, scale) — trauma-based screen shake, sampled from layered sines so it stays smooth.

Yaw is measured about +Y from world +Z: forward is (sin yaw, 0, cos yaw), so a yaw of 0 faces the saint down the arena's +Z axis.