I also have a rotation.
I want the X and Y to point at the object.
This might explain it better, it's hard for me to explain.
rotation = Atan2(objectA.y - objectB.y, objectA.x - objectB.b)
ObjectA.x + cos(rotation) * distance ObjectA.y + sin(rotation) * distance