Float increase based on proximity?

Is it possible to increase/decrease a float based on how close a certain mesh is to the player? Ideally a smooth increase (between a max and min value)- I’ve been looking around but can’t seem to find anything other than triggers/timelines. Also, when constantly checking the world location of a player or mesh, what is the most efficient way to do it? (Timer/Tick?)

Thanks!

You can get the distance within Tick and then apply a SmoothStep formula, something like this should do the trick :

Value = 1 - SmoothStep( DistanceMax, DistanceMin, Distance )

DistanceMax = distance where you want the result to be 1
DistanceMax = distance where you want the result to be 0
Distance = distance between the actors you are testing

Awesome, thank you- will test this out!