1 (edited by danielesuppo 2019-05-21 14:44:52)

Topic: How to translate the map (or the Camera) on Y axis

Hello,
I should move the map from Gps point A to Gps point B.
The problem is that the elevation of point B (800m) is much different from elevation of point A (200m), and my Camera is not perpendicular to the map, but is rotated 45° on X axis,  so when a move the map to the new location the camera is looking at the wrong position (because the target of the camera stay at the bottom of the map (200m).

One possible solution, I think, would be to be able to smoothly move the target of the Camera to 800m.
Another one, I think, would be to smoothly shift down the map on Y axis, while the map is moving to the new position.

I've read about "OnlineMapsCameraOrbit.adjustTo", but I don't know how can I pass the new elevation in it.

Is it one of this option feasible? Or maybe there's a 3rd better option?
Many thanks!

Re: How to translate the map (or the Camera) on Y axis

Hello.

I think the best way is to use “OnlineMapsCameraOrbit.adjustTo = OnlineMapsCameraAdjust.gameObject”, set GameObject which the camera will look at (OnlineMapsCameraOrbit.adjustToGameObject).
In this case, you can get any camera pivot point by simply changing the position of GameObject.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to translate the map (or the Camera) on Y axis

Thank-you.
Do “OnlineMapsCameraOrbit.adjustTo" is a performance killer or can I use it in Update?

Re: How to translate the map (or the Camera) on Y axis

"is a performance killer" - what does this mean?
Why do you need to use adjustTo in Update?
You specify once what the camera should look at, and the camera automatically looks to the specified place.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: How to translate the map (or the Camera) on Y axis

Yes, my fault sorry.
Many thanks