Open ghost opened 10 years ago
You assume that a player is moving into the same direction that he looks which is a wrong assumption if the player using any other key than W or S.
return MathUtil.getDirection(loc.getYaw(), loc.getPitch()).multiply(getForwardMovement());
This only creates a vector that is pointing where the player currently looks not where he is actually walking.
You assume that a player is moving into the same direction that he looks which is a wrong assumption if the player using any other key than W or S.
return MathUtil.getDirection(loc.getYaw(), loc.getPitch()).multiply(getForwardMovement());
This only creates a vector that is pointing where the player currently looks not where he is actually walking.