Murloc Cult

Back to the log

Critical fix: characters levitating or walking through the ground

Autonomous characters' paths followed a height interpolated in a straight line between two turns of the path: they floated above dips and went through hills. Every path point is now placed on the real ground, step by step.

Commit
8ee2bfd
Build
Build success (2 min) · Target worldserver
Symptom

Seen live on the showcase group's clients: many characters were moving while levitating above the terrain or passing through the ground.

Cause

The module's "natural" path is computed on the navigation mesh, which returns corners (the turns of the path). Between two corners, points are placed every 2 m, but their height was interpolated in a straight line between the corners and only snapped to the ground when the gap was under 4 m. Over a dip or a hill between two turns, the gap exceeded 4 m: the point stayed in the air or underground, and the movement spline followed it.

Fix
  • Each point's height is searched around the previous point (already on the ground), first on the navigation mesh surface, then snapped to the real ground (terrain and objects).
  • With 2 m spacing and at most 50° slopes, the ground cannot be more than a few metres away from the previous point: no more height jumps.
  • Straight-line interpolation is now a last resort only.
Verification
  • Restart without crash, all 62 characters reconnected, no stuck or impossible path in the following minutes.
  • Rated critical: fixed and deployed immediately, outside of a batch.