I am looking for math that gives me the direction in which I cross the body. I have no ideas, I know that this should be a very simplified application of trigonometry, but I tried different things without success. Not sure if this is the best approach.
Here are the details:
So, I have a body that rotates at a given angle, and I need to find out if I enter the body from it or from it in front. The trajectory in this use case is determined by the position of the mouse (when moving), so I can draw a line from the previous Point and the current point.
Hope someone can help me with this :) and thanks very much in advance.
, . , , .
movement = currentPoint - previousPoint
, , ( "", ), : movement dot normal > 0, , . .
movement dot normal > 0
, - , , , . , movement, ( , normal ), movement normal : angle = arccos(movement dot normal)
movement
normal
angle = arccos(movement dot normal)
, , , . , . ( , .)
, , , . , 2 , , , .
, , , , "" , , .