Skip to content

Commit

Permalink
Fix incorrect X-axis movement
Browse files Browse the repository at this point in the history
  • Loading branch information
jmickle66666666 committed Dec 13, 2018
1 parent 91e9693 commit 6bf6db7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions DelvEdit/src/com/interrupt/dungeoneer/editor/EditorFrame.java
Original file line number Diff line number Diff line change
Expand Up @@ -2196,9 +2196,10 @@ else if(turnDown) {
zm *= 2.0f;
}

camX += (xm * Math.cos(rotX) + zm * Math.sin(rotX)) * walkSpeed;
camY += (zm * Math.cos(rotX) - xm * Math.sin(rotX)) * walkSpeed * Math.cos(rotY);
camZ += (zm * Math.sin(rotY)) * walkSpeed;
zm *= Math.cos(rotY);
camX += (xm * Math.cos(rotX) + zm * Math.sin(rotX)) * walkSpeed;
camY += (zm * Math.cos(rotX) - xm * Math.sin(rotX)) * walkSpeed;

if(player != null) {
player.rot = rotX;
Expand Down

0 comments on commit 6bf6db7

Please sign in to comment.