Skip to content

Commit

Permalink
Merge pull request #4 from kensonjohnson/fix-camera-shift-in-demo
Browse files Browse the repository at this point in the history
Fix camera shifting in example demo
  • Loading branch information
setanarut authored Sep 6, 2024
2 parents 7b3d506 + 98b31cb commit 52cf8e8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions examples/demo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,6 @@ func (g *Game) Update() error {
if ebiten.IsKeyPressed(ebiten.KeyS) {
delta.Y = g.CamSpeed
}
if inpututil.IsKeyJustPressed(ebiten.KeyL) {
delta.Y = g.CamSpeed
}
// Check for diagonal movement
if delta.X != 0 && delta.Y != 0 {
factor := g.CamSpeed / math.Sqrt(delta.X*delta.X+delta.Y*delta.Y)
Expand Down

0 comments on commit 52cf8e8

Please sign in to comment.