Fix TransformCx hack that put collision detection rotation and render rotation out of sync.
(originally introduced to workaround AI getting the Y axis flipped)
This commit is contained in:
parent
5fed6ea82f
commit
02239bb4d2
1 changed files with 1 additions and 1 deletions
|
@ -3,7 +3,7 @@ import { Join } from "./Data";
|
|||
|
||||
export function TransformCx(cx: CanvasRenderingContext2D, location: Location, dt = 0) {
|
||||
cx.translate(location.X + location.VX * dt, location.Y + location.VY * dt);
|
||||
cx.rotate(-location.Angle + location.VAngle * dt);
|
||||
cx.rotate(location.Angle + location.VAngle * dt);
|
||||
}
|
||||
|
||||
export function TfPolygon({points}: Polygon, {X, Y, Angle}: Location): Polygon {
|
||||
|
|
Loading…
Reference in a new issue