Use the new function entity:get_direction4().