how do I rotate the results of this code so the 0 points towards a different vector? For example modifiying it with the vector (-1,1) should yield these results:
this formula would result in something like angle = 150
however this is only because the frame of reference is taking 0Âş to be alligned to the direction (1,0)
if the frame of reference was alligned to (-1,1) the formula should give something like 10Âş for the same object position like here:
as you see the green point and the red point didnt move at all, but the angle result is different because the frame of reference at 0Âş is alligned differently
my goal is to make changes to the formula to somehow take into account the direction towards where 0 is pointing, and even though the target and the center might be in the same position, to get a different angle based on input of a different direction vector, being that the formula currently solves for (x1,y0)
It seems as if you realize “[the code you wrote]-140” would accomplish exactly what you want, but for fun you want to solve it in a different, more complicated way. You want to do it by modifying the 2 values inside Math.Atan2? Again, just for fun.
it could be solved like that but that is just hardcoding it? It wont be dynamic, what if I want it to allign to (0.24,3.5) how much should I subtract from the angle?