public void AttackPosture(float deltaTime) { posture.HandVisible(); attackPhase += walkPhaseSpeed * deltaTime; while (attackPhase > 180) { attackPhase -= 180; } float angle = walkPhaseAmplitude * (1 + (float)Math.Cos(attackPhase * Math.PI / 180)); posture.RotateTo(posture.rightHandObject, angle); }