Topic: conversion between mesh.bounds value and height in meter


I'm trying to find a way to convert a mesh size into meters

I' creating a mesh based on points that i manually select on the map. I'm able to change this mesh heigh by scaling the vertex.y values.

By doing so, i'm getting a value with mesh.bounds that is proportional to the mesh height.

So i'm looking for a way to convert this value into meters.

That would allow me to set a specific scaleY value for my vertex according to the height i want in meters.

Are there some methods i missed in the documentation that would helped me ?

Maybe i have a bad conception of how things should work but i often find myself in the need of having some function that would give me, according to the current zoom level, a ratio value between meters and units.

Like, at N zoom value, how much meters is 1 units on x,y,or z ?

I usually end up converting position to lat/long and use OnlineMapsUtils.GetCoordinateInDistance or in the opposit way OnlineMapsUtils.DistanceBetweenPoints but it won't work for an altitude difference

Re: conversion between mesh.bounds value and height in meter


Most likely you need OnlineMapsControlBase3D.GetBestElevationYScale. … ed29bda9d.
This method gives you a factor for converting meters to Unity World Points.

Kind Regards,
Infinity Code Team.

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