Search Unity

XYZ blender unity OpenStreetMap

Discussion in 'Asset Importing & Exporting' started by davidezanin, Jun 19, 2016.

  1. davidezanin

    davidezanin

    Joined:
    Aug 24, 2015
    Posts:
    10
    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
     

    Attached Files: