Question 1:My game is a 2D puzzle game that need to rotate the game object and until a certain angle, the box will stopped and not move again, for example game like “Plumber Game”. I tried to use box colider 2D to make the connect point between the image i put in, but I don’t know what to do in c# part.
Question 2: My puzzle should be randomize angle at the start of the game, how can i randomize it?
Attach the following script to your gamobject. It’ll randomize the rotation of the object at the start of the game by a factor of 90 degrees, and then rotate the object by 90 degrees (clockwise) each time you click on it.