Postby Hoeloe » Sun Mar 03, 2019 9:02 am
Just as a note, I've used rubber banding techniques previously, and created an equation to determine the speed of a rubber banding object:
speed = s*(S/s)^(d/D)
Where:
S is the maximum speed of the camera (i.e. player runspeed)
s is the minimum speed of the rubber band
D is the maximum distance the rubber band can be from the player
d is the current distance the rubber band is from the player
And obviously, * is the multiply operator, / is the divide operator, and ^ is the power operator (in Lua that's math.pow).
This creates an exponential rubber band that slows down as it gets close to the player, but ensures it never gets more than a specified distance away. How to actually implement this is up to you, but the equation is there should you want it.