Is $c = \dim(X)$ if $P \otimes \mathcal{L} = P[c]$

Let $P \in \mathcal{D}^b(X)$ be an element of the derived category of coherent sheaves on a smooth projective variety. Suppose there is a line bundle $\mathcal{L}$ such that $P \otimes \mathcal{L}[\dim(X)] \cong P[c]$ for an integer $c$.

Does it follow that $c = \dim(X)$?

What I have done: We have $P \otimes \mathcal{L} \cong P[c-\dim(X)]$. Take on both sides the maximal cohomology which does not vanish. Then it follows $H^n(P) \otimes \mathcal{L} \cong H^{n+c-\dim(X)}(P)$, so $c - \dim(X) \leq 0$; analogously for the minimal cohomology which does not vanish?

-
It's not a good idea to have a title that's entirely in $\LaTeX$. – J. M. Nov 28 '11 at 10:54