I found this expression posted by Colin Braley, and I need some help to modify it.
Its about making an effect similar to Apple doc that magnify the icons when the mouse cursor come close.
mouse_layer = thisComp.layer("mouse layer");//Mouse layer
beginScale = 100;//Scale begins at this
endScale = 250;//Scale ends at this
beginDistance = 200;//Distance to begin magnifying in pixels
endDistance = 0;//Distance to end magnifying in pixels
//--Don't modify below here
dis = length(this.position, mouse_layer.position);
ease(dis, beginDistance, endDistance, beginScale, endScale)
What I want to ask, is it possible that instead of scaling the layers, they move forward and backward toward the camera in z-axis when the mouse layer get close to them?