function CharacterRealism.StepValue(o,B,K)local U=B.Current or 0 local m=B.Goal local a=5/(K*60)local H=math.min(1,(K*20)/3)local S=math.min(H,math.abs(m-U)/a)B.Current=Util:StepTowards(U,m,S)return B.Current end


function CharacterRealism:StepValue(state, delta)
	local current = state.Current or 0
	local goal = state.Goal

	local pan = 5 / (delta * 60)
	local rate = math.min(1, (delta * 20) / 3)

	local step = math.min(rate, math.abs(goal - current) / pan)
	state.Current = Util:StepTowards(current, goal, step)

	return state.Current
end
