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

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

Description

@stephank

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions