Hi Thomas
here’s what i use for this purpose, and it works the same for both 2D and 3D.
i find it very easy to read and manipulate.
for me this has worked in complicated settings, such as rearranging multiple layers across different comps (fun!!).
best,
y
lead1 = thisComp.layer("leader1").transform.position;
lead2 = thisComp.layer("leader2").transform.position;
select = effect("Slider Control")("Slider");
linear(select, 0, 100, lead1, lead2)