Position sensitive device

Hi guys,

I’m looking for a 2D position detecting device!!

And I’m looking for a specific one, but unfortunately I don’t know the exact name or working principle, but it was a long and thin bar, with a usb socket, probably connected to a computer and gives the readings (position) once any object crosses the cross-section area aligned with the bar.

Can you also suggest any easy-to-use 2D optical position detection devices/ sensors!!

Can you please advise!! Appreciate your cooperation!!