Home > Software engineering >  How can I detect if there was a change on the transform rotation on the y only?
How can I detect if there was a change on the transform rotation on the y only?

Time:10-05

Tried to search in google but could not find any solution.

I don't have yet any code that I tried. I want in the update to check that if there was a change on the transform rotation on the Y only than do something.

CodePudding user response:

Use Transform.hasChanged in your Update() loop. When it changes, store the last known y value, then compare it the next time it changes.

  • Related