Hover effect without keyframes

Hover Expression for any parameters:

pointer = thisComp.layer("Pointer"); 
hoverStart = 60; // The higher value, the larger zone of influence 
hoverEnd = 20; // The higher value, the smaller zone at which influence will stop 
maxValue = 0.7; // Multiplies the maximum value 

L = length(toComp(anchorPoint), pointer.toComp(pointer.anchorPoint)); 
C = clamp(hoverStart-L,0,hoverEnd); 

value + C*maxValue

Hover Expression for 2D-Position:

pointer = thisComp.layer("Pointer"); 
hoverStart = 60; // The higher value, the larger zone of influence 
hoverEnd = 20; // The higher value, the smaller zone at which influence will stop 
maxValue = 0.7; // Multiplies the maximum value 

L = length(toComp(anchorPoint), pointer.toComp(pointer.anchorPoint)); 
C = clamp(hoverStart-L,0,hoverEnd); 

[value[0], value[1] - C*maxValue]

Hover Expression Overlap Fix (for 3D-layer):

pointer =  thisComp.layer("Pointer"); 
hoverStart = 60; // The higher value, the larger zone of influence
hoverEnd = 20; // The higher value, the smaller zone at which influence will stop
maxValue = 0.0001; // Adds a shift along the Z-axis

L = length(toComp(anchorPoint), pointer.toComp(pointer.anchorPoint));
C = clamp(hoverStart-L,0,hoverEnd);

[value[0], value[1], value[2] - C*maxValue]

Recommended Posts

Start typing and press Enter to search