-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shaky direction choosing on hex grid #100
Comments
I am also seeing that: On Hex Columns, moving up or down gives always the right direction. If you move in one of the "diagonal" hex directions, sometimes you get the correct diagonal direction, but somtimes the facing indicvator points up or down. |
I investigated a bit closer: On a hex grid, the movemnts on the "diagonal" hex directions don't result in factional pixel distances that get rounded. Depending on the column/row, the distance is rounded up or down. So when moving one hex south-west on hex-columns even, the messuered directions is slightly grater than 150 on some columns and slightly lower than 150 on others. About Face seems to assinge any angle to a cardinal direction that is >= this cardinal direction and < then next cardinal direction. That gives odd results also on square grids: When moving one square east and more than one square north (no mather how many), the resulting direction is north. But if moving one square west and any number of squares north, you always get north-west. That is a starnge asymetrie. Woudn't it better to chose a cardinal direction for any angle in the interval halfways midpoinst between this direction and the previous and next direction? |
This behavior seems to be the result of this commit: e4478dd#diff-a2f9859a7925afd20d70d4825709ee85fa48b4f37f93c17bb11094121cc1f6abL92 The line let secondAngle = facings.reduce((prev, curr) => (curr > prev && curr <= normalizedDir ? curr : prev), facings[0]); is not eqivalent to the previous let secondAngle = facings.find((e) => e > normalizedDir); The orignal line finds the smallest angle > normalizedDir, the new line finds the greatest angle <= normalizedDir. Was this change intentional? |
Using About Face with the GURPS GGA system, I find that it often snaps the direction of the indicator, well, "wrong". Using hex grids, it often seems to choose a direction that seems non-intuitive to the direction the token has travelled. Does anyone else have this experience?
The text was updated successfully, but these errors were encountered: