Hi, is there a way to find distance this way
- Forward distance from two vectors? So left and right wont take in count
- Left & Right distance from two vectors? So Forward wont take in count
Currently i only know to calculate corners and compare that, and that works fine but seems like a trash way to go about it and waste of performance
What if they are opposite?
Could you elaborate, perhaps find an image that illustrate what you want?
As If the forward vector of both actors are facing opposite direction. (I imagine that is what you want)
Oh, sorry it should only take in count of forward vector from A not B
So Imagien a line plane for forward A, The distance i want to find would be the “Closes point at line plane where input is B”
If that makes sense, but without (hopefully) using that method
Maybe this will be helpful:
Yes. I remember you from the round corners topic.
Hope this illustrate what (I think) you asked for:
In case you want to investigate further, what I did was basically construct a triangle:
- Get the angle between forward vector to direction to B.
- Get dista form A to B (this would be the hypothenuse)
- Then found the adjacent side length: Adjacent = hypothenuse * cos( Angle )
- Finally from A i projected a point with ForwardVector * Adjacent.
Worked like a charm, thank you!