Начинающий
- Статус
- Оффлайн
- Регистрация
- 20 Окт 2024
- Сообщения
- 3
- Реакции
- 0
ss киньКод: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)); }