Topic: Airplane Altitude

Hi ,
Supposed that in "Aircraft script" ,position.y=Altitude .
But at runtime ,it not the same;pos.y increments when altitude changes but they have never the same values. ??

Post's attachments

Attachment icon altitude.PNG 843.35 kb, 4 downloads since 2019-06-10 

Re: Airplane Altitude

Hello.

Position.y is equal to altitude only if you are not using elevations.

Here is the code. Look at the second line:

pos.y = altitude;
if (elevationManager != null) pos.y *= OnlineMapsElevationManagerBase.GetBestElevationYScale(tlx, tly, brx, bry) * elevationManager.scale;
Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

Re: Airplane Altitude

thank you for your answer.
There is a methode to get the altitude even if i'm using elevation or it's complicated ?

Re: Airplane Altitude

Please explain in detail what you want to do, and I will explain the best way to do it.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!

5 (edited by Amen 2019-06-10 12:08:01)

Re: Airplane Altitude

Sorry for not being  too clear..
I want pos.y equal to the real altitude of my airplane even when i'm using elevation for my map.

Re: Airplane Altitude

Use code from post #2.

Kind Regards,
Infinity Code Team.

Do not know the best way to thank the developer? Rate the asset in Asset Store!