Advertisement
Guest User

Untitled

a guest
Jan 25th, 2024
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.34 KB | None | 0 0
  1. int vInput = Game.current.renderer.VerticalInput;
  2.         float rad = ((float)Rotation / 4096) * (3.14f * 2);
  3.        
  4.         float prevX = X;
  5.         float prevZ = Z;
  6.        
  7.         boolean isMoved = vInput != 0;
  8.        
  9.         X -= -Math.sin(rad) * (vInput * MOVEMENT_SPEED);
  10.         Z -= Math.cos(rad) * (vInput * MOVEMENT_SPEED);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement