Support all-direction rotation, fixes #6