Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on An Examination of Physics in Video Games. Parent comment
- if "forward" key held down, add unit motion vector to position
- if "left" key held down, rotate motion vector to left and add it to the position
In that case, you've added two copies of the vector at 90 degrees to each other, and the player moves by sqrt(2) times the normal speed.
There are no comments on this comment yet.
- if "forward" key held down, add unit motion vector to position
- if "left" key held down, rotate motion vector to left and add it to the position
In that case, you've added two copies of the vector at 90 degrees to each other, and the player moves by sqrt(2) times the normal speed.