local rotation implementation