Skip to content
This repository has been archived by the owner on Sep 2, 2020. It is now read-only.

Movement along non-cardinal directions is slighty off. #2

Open
stephank opened this issue Sep 4, 2010 · 1 comment
Open

Movement along non-cardinal directions is slighty off. #2

stephank opened this issue Sep 4, 2010 · 1 comment

Comments

@stephank
Copy link
Owner

stephank commented Sep 4, 2010

When moving along a direction one step away from a cardinal direction, the movement simulation is incorrect. These are the directions at 22.5°, 67.5°, 112.5°, etc.

This can be clearly reproduced when at a minimum velocity, by just tapping forward until movement starts, then turning to one of these directions. Movement appears 'rounded off' to the nearest cardinal direction.

The code to this is in src/tank.coffee. I tried to model it after WinBolo's movement code. Perhaps this is a floating point rounding thing?

@stephank
Copy link
Owner Author

stephank commented Oct 2, 2010

Looks like winbolo actually does this too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant