I got a weird 3.5.1 question.
I'm relatively new to GoDot as well and have watched a number of tutorials and I'm so close to getting this but after 3 days I'm coming for help.
Long story short. I have 2 values for a 2d game. The movement of the player (in degrees only cause I'm more familiar with it, this is probably not the best idea but it allows me to understand and see it better) and the angle the mouse cursor is from the player (i.e. the player will be facing the mouse cursor at all times.) My goal is to have it base the speed of the player based on how he's looking at the mouse. i.e. facing = fastest (within 90 degrees (between -45 and 45), going to the side = medium speed (45 to 135 / -45 to -135) and reverse = slowest. (135 to 180 and -135 to -180)
... after typing this out I just realized that degrees just aren't a viable solution to this and maybe I should stick to the 0,0 solution for rotation that I already have for velocity and how I'm translating the AnimationTree coordinates...
Either way, I would appreciate any advice. I have this programmed already but it takes about 100 lines of IF statements and taking upon the good ole adage of old commercials. "There's got to be a better way." Thanks in advance.
(EDIT to be clearer): I should've been clearer, sorry. I meant the angle in which he's moving in relation to the mouse. I.e. if the mouse is on the left and he's moving to the right, he gets the cut speed as he's walking backwards. Hopefully that makes sense. I want to dig more into your response though and see if that does it.