Rotating object

How do you programme a rotating object that isn’t affected by gravity, where touching it results in winning the game?

Just create an object of type obstacle, background or foreground. Enable rotation for it, and add an initial rotation speed rule. Then either on this object or on your main character, add a contact condition and an end game action, with a win screen in it.