Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Часть функционала SlothAC Rotation 360 3.1 Base

Код:
Expand Collapse Copy
           case "Ai" -> {
                yawDelta = MathHelper.wrapDegrees(yawToTarget - rotateVector.x);
                pitchDelta = MathHelper.wrapDegrees(pitchToTarget - rotateVector.y);

                float distance = (float) Math.hypot(yawDelta, pitchDelta);
                float smoothExp = MathHelper.clamp(distance / 15f, 0.15f, 0.75f);

                float jitterYaw = (float) ((Math.random() - 0.5) * 1.2f);

                float jitterPitch = (float) ((Math.random() - 0.5) * 0.3f);

                float nextYaw = rotateVector.x + (yawDelta * (smoothExp * 1f)) + jitterYaw;
                float nextPitch = rotateVector.y + (pitchDelta * (smoothExp * 0.6f)) + jitterPitch;
               
                float gcd = SensUtils.getGCDValue();
                nextYaw -= (nextYaw - rotateVector.x) % gcd;
                nextPitch -= (nextPitch - rotateVector.y) % gcd;
               
                rotateVector = new Vector2f(nextYaw, MathHelper.clamp(nextPitch, -90, 90));
            }
ss кинь
 
Назад
Сверху Снизу