I am very new to Three and am trying to get my head around how everything works before I start working on anything large and I ran into an issue with rotation. I want my square to rotate 45 degrees whenever the s key is pressed but whenever I do press it it seems to rotate 45, 90, 135, etc degrees. I am using this code
To try and do it.
I have tried Math.PI/4 and rough values (5dp) to see if there was any change but the problem still persisted.
I am running the code on Microsoft edge and I am coding in visual studio code if that is important
Sorry if this is an incredibly simple question.
-initial screen
-after s pressed once
-after s pressed thrice (no change on second press)