ox, oy are coordinates of object (box) center and they are know. Forward is a normal vector also know. Up is a another normal vector, also known and perpendicular to forward vector. Box W (width) and H (height) is known. x, y (A) is also a know point coordinate. What I need to calculate is distance between A and B - it should be positive or negative depending on each side the point A is. Please help!
2026-04-29 23:05:15.1777503915
Need help with some Vector math
34 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2

What you want is the orthogonal component of $(x,y)-(o_x,o_y)$ w.r.t. the direction of the vector $\text{Up}$, which is $$\frac{\langle(x,y)-(o_x,o_y);\text{Up}\rangle}{\sqrt{\langle\text{Up};\text{Up}\rangle}}=\frac{(x-o_x)\text{Up}_x+(y-o_y)\text{Up}_y}{\sqrt{\text{Up}_x^2+\text{Up}_y^2}}$$