As this is a request we have had a few times now (left and right slider), I have created an example project to help explain how this can be done.
Firstly, you can download the project here - Sliding Button Selector.zip (2.4 MB).
The project contains 5 buttons (planes) named from -2 to 2 in the Hierarchy (0 being the button starting in the middle). These planes have no functionality added to them, but material and color can be changed by simply editing the individual properties.
In my example, I want the planes to be interactive buttons (can be touched). This means that the ‘Touch Plane’ holding all the sliding inputs is positioned below the buttons so it does not interfere with the pointer down events. If for your project you would only like them to be images, you can position the ‘Touch Plane’ over the planes and change the opacity value to 0 so the instructions are not visible.
I have commented most of the work in the ‘Script’ node so should be understandable, but to summarise, the ‘Touch Plane’ works out the pointer move event which alters the positioning of the ‘Buttons’ group. There are then 2 trigger regions on either side. When a plane enters either trigger region, it is then positioned back at the start of the opposite side.
Hope this helps and please do feel free to use and edit this, to incorporate it in any projects you may have.