Added some local functions to unit.lua for working out friction and force