I want to rotate my game object on 90 180 270 and 360 degrees

I wrote my script and it didnt work. I cant find mistake.

And also i have problem when i move one of my objects and it colides with other i began to move and this object. I want that when i move one object others were disabled to move.

Two things this might or might not help but rotation in defold is done in radians not degrees plus when you reference your rotate bool you misspelled it as rotat

I corected mistakes but i also cant rotate object. When i press to fingers on the screen nothing happened.

Have you searched the forum? Rotating game objects has been discussed several times:



And I’ve created an example as well: https://github.com/britzl/publicexamples/tree/master/examples/rotate_and_move