Giter Club home page Giter Club logo

Comments (11)

reinterpretcat avatar reinterpretcat commented on May 24, 2024

You could try to add your collision detection script via https://github.com/reinterpretcat/utymap/blob/master/unity/demo/Assets/Scripts/Core/Plugins/GameObjectBuilder.cs::BuildFromMesh
Buildings are built in core library and they are materialized using BuildFromMesh method.

Another way is just to search for building's GameObject in scene using its id and knowing how are building names are generated.

Another way might involve search api implemented in core lib

from utymap.

chinnuGarg avatar chinnuGarg commented on May 24, 2024

I did try adding collision detection but it is just giving me building ID rather than latlongs.

from utymap.

reinterpretcat avatar reinterpretcat commented on May 24, 2024

Have you tried to store lat/lon in your custom MonoBehaviour when you're attaching it to gameobject?

from utymap.

chinnuGarg avatar chinnuGarg commented on May 24, 2024

What is the way to get the latlon for the buildings? Can I get it while i build the mesh in GameObjectBuilder css?

from utymap.

reinterpretcat avatar reinterpretcat commented on May 24, 2024

No, mesh geometry is already mapped to unity coordinates. Here you have raw geometry: https://github.com/reinterpretcat/utymap/blob/master/unity/demo/Assets/Scripts/Core/Interop/MapDataAdapter.cs

from utymap.

chinnuGarg avatar chinnuGarg commented on May 24, 2024

Thank you.

Also isn't it possible to get all building objects in ThirdPersonBehaviour script? Normally we should be able to get gameobject as GameObject.Find() right?

from utymap.

reinterpretcat avatar reinterpretcat commented on May 24, 2024

It is not responsibility of ThirdPersonBehaviour class to handle logic with buildings.
Yes, you can search for GO using unity API

from utymap.

chinnuGarg avatar chinnuGarg commented on May 24, 2024

Is it possible to create custom shaped building rather than rectangular buildings with the current raw data that OSM provides??

from utymap.

reinterpretcat avatar reinterpretcat commented on May 24, 2024

You can change or add new implementation for that based on current building builder implementation: https://github.com/reinterpretcat/utymap/tree/master/core/src/builders/buildings

from utymap.

chinnuGarg avatar chinnuGarg commented on May 24, 2024

Does UtyMap provides any kind of latlong bounds to determine the centre of polygon or a building?

from utymap.

reinterpretcat avatar reinterpretcat commented on May 24, 2024

There is getCentroid function in https://github.com/reinterpretcat/utymap/blob/master/core/src/utils/GeometryUtils.hpp

However, there is two things to be aware:

  • convex vs non-convex polygons
  • building representation in osm might consist of multiple independent polygons.

from utymap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.