As in most instances, a photo or a drawing of your intended mechanical setup is worth in clarity,many thousands of words.
What immediately springs to mind when you mention rotational, is a shaft/rotor encoder.
Many available and relatively cheap these days, possibly $30 or less.