Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double pitch = (player.getPitch() + 90.0F) * Math.PI / 180.0D;
- double rot = (player.getRotation() + 90.0F) * Math.PI / 180.0D;
- double x = Math.sin(pitch) * Math.cos(rot);
- double y = Math.sin(pitch) * Math.sin(rot);
- double z = Math.cos(pitch);
- Location loc = new Location(x+1, player.getY(), y);
- player.teleportTo(loc);
Advertisement
Add Comment
Please, Sign In to add comment