Center continent on globe on touch / click

Hi guys!

We have a 3D globe with continents on it. When a continent is clicked I would like to rotate the globe so that the clicked continent is shown in the center of the current camera view.
I was thinking about FromToRotation. But I am not quite sure how to get it to work. How would you guys solve the problem above?

Best regards.

This is more Game Design problem.
What have you tried?

I give you a hint.
Use Latitude and Longitude.

1 Like

Can’t you just use Vector3.RotateTowards?

2 Likes

Yeah I just noticed, that I posted in the wrong place. Could an admin move it to the right one please? :slight_smile:

Thanks @Antytpodish. I’ll try it out to use Latitude and Longitude somehow. :slight_smile:

@Murgilod thanks! Wouldn’t it rotate the continent? I’ll try it out a bit and write again.

The idea with this approach is, that you get rotation from continent vector. And you apply the rotation to the camera, or whatever else needed.
Is simple to implement.

With this approach, you can easily increment value of either, and have nice smooth camera around the globe.

1 Like