Fixed strafing with HACKS

pull/12/head
Caroline Bell 2020-02-28 00:04:35 -08:00
parent b7f25c72e4
commit 60e2d30705
1 changed files with 6 additions and 6 deletions

View File

@ -27,17 +27,17 @@ public class Player extends RenderObject
position.z -= Math.cos(ry) * Constants.movementSpeed;
position.x += Math.sin(ry) * Constants.movementSpeed;
break;
case LEFT:
position.z -= Math.cos(ry) * Constants.movementSpeed;
position.x -= Math.sin(ry) * Constants.movementSpeed;
break;
case BACKWARD:
position.z += Math.cos(ry) * Constants.movementSpeed;
position.x -= Math.sin(ry) * Constants.movementSpeed;
break;
case LEFT:
position.z -= Math.cos(ry + 105) * Constants.movementSpeed;
position.x += Math.sin(ry + 105) * Constants.movementSpeed;
break;
case RIGHT:
position.z += Math.cos(ry) * Constants.movementSpeed;
position.x += Math.sin(ry) * Constants.movementSpeed;
position.z -= Math.cos(ry - 105) * Constants.movementSpeed;
position.x += Math.sin(ry - 105) * Constants.movementSpeed;
break;
case UP:
if (this.noWeight) position.y += Constants.movementSpeed;