measure distance, high precision, short distance

Look for accelerometers. They're quite cheap and can be attached to the moving part, measuring its instantaneous acceleration.

Now as I don't really understand the scope of your project (both the physical layout as what you're trying to do and measure with it) I have no idea whether those would be suitable for you.