Project

General

Profile

Bug #678

Automap: Rotation angle smoothing

Added by vermil about 13 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2009-04-19
% Done:

100%


Description

Beta6.1.

If you do a 360 spin on the map, the map will very often suddenly quickly rotate back to zero degrees the opposite way than you were spinning when you reach about 359 degrees.

As in the map and player arrow rotate the same way the player is turning from 0 through 359 degrees, then seem to turn the opposite way very quickly (but it's still highly noticeable) to get from 359 degrees to 0/360 degrees. Seemingly about half the time.

This affects all games.

Labels: Gameplay

History

#1 Updated by danij about 13 years ago

I'm not entirely sure which type of interpolation should be used for this, any suggestions skyjake?

#2 Updated by skyjake about 13 years ago

I'm guessing the map angle is trying to follow the player mobj angle, and when the 0xffffffff <-> 0 jump occurs, it chooses the wrong direction to interpolate to the target. One fix could be to just check which is the shorter way to the destination angle, taking into account the discontinuity of the angle values. (Basically comparing against both directions for the turn and choosing the shorter one.)

#3 Updated by danij about 13 years ago

That is kind of what is happening atm when the angle wraps.

In fact, I'm actually wondering whether we should be extrapolating rather than interpolating given the way the player angles are updated in response to mouse/joystick axis deltas (i.e., they can trail, given axis delta smoothing).

#4 Updated by danij over 12 years ago

Fixed for 1.9.0-beta6.8

Also available in: Atom PDF