Update the way judging gravity

Support multi gravity values(separated by '|')