Blender Unity - coordinates

Hi guys,
I have a big problem.
In my project with extrusion and other stuff I imported a city using blender and this script (https://github.com/vvoovv/blender-geo/wiki/Import-OpenStreetMap-(.osm) ). (Not the best way because streets is a big object and the city the same…but this is another problem )

I imported all in unity.
I insert 180degree of rotation on y in unity because the axis are different in unity and blender.
Now I need to insert some object at runtime with coordinates (latitude,longitude).
So I convert a part of the script in the link for c#.

The problem is: I tried to insert the objects in the vertex of the OSM square, so for (minLat-minLon),(maxLat-minLon),(maxLat-maxLon),(minLat,maxLon) but…

I see the object at the bottom left, bottom right, etc etc but If I see the streets and the buildings the objects are in the wrong position…

Lower and not centered, what could be the problem? The different orientation of the axis blender-unity?A wrong rotation? Something in the script(I can post it…but It’s a porting of the phyton script…seems ok)? X,Y unit in blender is different from X,Y in unity?

The objects are effectively bottom left- bottom right- up, upside right and upside down, and they appear in the scene so what is my mistake?

I attach blender image and unity image with the 4 object

Any suggest?
Thanks

Attachments



Can’t you add needed rotation in Blender before the export and additionally export separate ‘marker’ object(s) from Blender to get known their coords in Unity?

Yes, sorry, I rotated the mesh in unity before know this problem.
Now I used he fbx exporter: Z forward and Y up and apply transformation(experimental). In unity i see a rotation of -180 on y so I insert 0, in this way I see the same thing in unity and in blender.

As I know the only problem could be the rotation (I assume that the x,y,z coordinates if I set 1 in the scale are the same). But with the FBX exporter setted as I said I don’t solve anything.

In any case, in unity the mesh 0,0,0 is exactly the red object so the mesh is centered.
Any suggest?

Yes, sorry, I rotated the mesh in unity before know this problem.

Now I used he fbx exporter: Z forward and Y up and apply transformation(experimental). In unity i see a rotation of -180 on y so I insert 0, in this way I see the same thing in unity and in blender.
In the fbx importer I set 1 to scale (unity use 0.01). So 1 unit=1meter

As I know the only problem could be the rotation (I assume that the x,y,z coordinates if I set 1 in the scale are the same). But with the FBX exporter setted as I said I don’t solve anything. And the picture that I attached seems to has also scale problem because the objects should be in the corners.

In any case, in unity the mesh 0,0,0 is exactly the red object so the mesh is centered.

I try also to parent the mesh as a child in blender before the exporting but the results are the same.

Any suggest?

I solved the problem with a new project in which I used the exported FBX with Zup and Yforward and checked the apply transform box, easy!.
I don’t know what is the problem in the old project(not centered).