Added in more robust calculations for moving across different floor types.