Let $X,Y $ be smooth projective varieties over a field $k$. The following example is taken from Huybrecht's "Fourier Mukai Transforms in Algebraic Geometry" [example 5.4.vi]:
"Suppose $\mathcal{P}$ is a coherent sheaf on $X\times Y$ flat over $X$ and consider the Fourier Mukai Transform $\Phi_\mathcal{P}$. If $x\in X$ is a closed point with $k(x)\cong k$, then $\Phi_\mathcal{P}(k(x))\cong P_{|x\times Y}$ where $\mathcal{P}_{|x\times Y}$ is considered as a sheaf on $Y$ via the second projection."
Let $q: X\times Y\to X$ and $p: X\times Y\to Y$ denote the projections. Let $i: x\times Y\to X\times Y$ denote the closed immersion obtained from $x\to X$ by base change.
I calculated $q^*k(x)\cong i_*i^*\mathcal{O}_{X\times Y}$ and then I got
$q^*k(x)\otimes\mathcal{P}\cong i_*i^*\mathcal{O}_{X\times Y}\otimes \mathcal{P}\cong i_*(i^*\mathcal{O}_{X\times Y}\otimes i^*\mathcal{P})\cong i_*i^*\mathcal{P}$ via the projection formula.
Applying the right derived functor $Rp_*$ yields Rp_*i_*i^*\mathcal{P}\cong R(p_*i_*)(i^*\mathcal{P})\cong q'_*i^*\mathcal{P} where q':x\times Y\to Y is the second projection. This is the result from the example. I do not see where I have used flatness of $\mathcal{P}$ over $X$ though. Where do I need it ? Thanks a lot .
EDIT: Flatness over $X$ should play a role in calculating the derived tensor. I actually assumed the derived tensor product equals the usual tensor product when calculating the FMT. Is this implied by $\mathcal{P}$ being flat over $X$?