Hi!
How can I make an object look at a vector using only logic nodes? I tried by the transform, but unfortunately, there is no way to define the roll, pitch, yaw, or somemthing like this with the transform nodes.
So how can I do this? It’s like the opposite way from the node “Vector From Transform”.
The only way I know of doing it is with cold math. You can calculate the rotating objects facing angle in 2d by feeding an arc-tangent with the divisions of the two objects deltas in X and Y coordinates. Then you need to take account for armory’s weird rotations since when you rotate something along the Z axis only it will first go up pi until the first half then the x or y rotation value gets set to pi while the z value goes down again. Once you are at the 3/4 waypoint sometimes one of them randomly jumps up to 2pi.
For doing it in 3d I did never get it to work, but in theory it should do just like in 2d but with the Z and X as deltas. I gave up because it seems like there are more strange rotations shenanigans which for me seemed to occur on random.