I’m very new at UE4’s api and c++ in general but know my way around blueprints and have written some basic code, followed some basic tutorials.
I just need some guidance on how I would acheive the following, you can see my blueprint issues here https://forums.unrealengine.com/showthread.php?110007-Tait-Bryan-(Nautical-Angles)-from-Float-degrees&p=526165#post526165
I have a target (AI) ship that is pointed -90d world rotation aka west assuming 0d is north in 0-180 for North to South clockwise and -180 to -0 for South to North CCW
I have my player ship pointed 0d aka north as in they are perpindicular.
I need to calculate what angle is from the line pointing +x (staright forward extending through the boat back to front) to the center of the player ship. The rotation of the players ship doesnt matter due to the second issue…
If the angle is 0-180 positive aka to the right I need to return a bool saying its to port (thats easy)
If its -180 to -0 aka 180-360 in a full circle clockwise rotation from that forward axis then the bool will return false aka to starboard. I’m talking aobut ships here.
How might I calculate this angle. I’ve done khan academys vector course, trig course, and can get all angles I need (over two dozen) except this one because its independant of the players rotation
Heres and image, I need (~)Bow
I have code for a std lib project that I linked in the BP forums post which I’ve ben struggeling with for almost a week on this one angle and I’m just going to try to reproduce it in ue4s api first, but if anyone has any tips that would be great.
Edit: I have the length of the target ship and the distance between the two points to measur the angle from so I should be able to use trig I would assume…