Hi guys,
seems like i am stuck with this. Scenario: I have a sphere (planet) and can position objects, lets say citys or whatever on it via latitude longtitude coordinates. in the moment i use basic spheres as placeholders for those “cities”. I parent them underneath the planetsphere, so can rotate with it.

Now i have some Gui buttons which are supposed to rotate the planet in a way that a selected city is in front, thus facing to the camera. Means i somehow need to find the rotation of the planet through the city to the camera. But i am lost.

i played around with this, which is connected to the planet, where PointB is a citytransform:

I haven’t tried this at all, so it could be wrong, but it works in my head

Vector3 planetPos;
Vector3 cityPos;
Vector3 cameraPos;
Vector3 planetToCity = (cityPos - planetPos).normalized; //vector that points from planet to city
Vector3 planetToCamera = (cameraPos - planetPos).normalized; //vector that points from planet to camera
transform.rotation = Quaternion.LookRotation(planetToCamera) * Quaternion.LookRotation(planetToCity);

Cool. It’s possible that I got the order of quaternion rotations wrong - quaternion multiplication isn’t commutative so flipping them around might fix the problem, but I’m glad you got it working.

Me too. As i actually don´t understand why this is necessary. But i saw some unanswered questions like this here and there and hope this helps others in the future.