Math help in rotation

you didnt break the rotation, you only want the zaw for the base and the pitch for the light. you may need to offset it depending on the default rotations but should work