I just solved something that’s annoyed me for a while…
When you’ve 2d tracked 2 objects in a scene and want a lookat between them,
But if you use a lookat (either expression or link) between 2 axis both with z position 0, the axis with the lookat will flip round 180 degrees when x or y values on either axis cross through 0.
Here’s the solution (instead of using lookat, enter this expression into rotation.z)…
degrees(atan2(axisA.position.y-axisB.position.y,axisA.position.x-axisB.position.x))
Here’s why it works…
I never knew about atan2 until today. I’ve always just used atan and been annoyed.