A remote character suddenly spins all the way round when it turns past north
Facing directions are circles, not lines. When another player turns just a little past the point where the numbers start over, the smoothing can send the body on a full lap. This also bites when the direction is squeezed into one small number for the network.
Why this works
A direction is a point on a circle, so the distance between two directions is the shorter way round, not a plain subtraction. Blending along that shorter way gives the turn the player actually made, and a fixed rule for exact opposites keeps every screen the same.
When not to use it
Wrong when the full lap is real, such as a spinning attack, a wheel or a propeller: shortest-path smoothing would show it turning backwards or standing still. Send the number of turns, or the spin speed, for those.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- 21 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "A remote character suddenly spins all the way round when it turns past north" (read_entry remote-character-spins-the-long-way-round) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP