Comments (11)
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.
I did try adding collision detection but it is just giving me building ID rather than latlongs.
from utymap.
Have you tried to store lat/lon in your custom MonoBehaviour when you're attaching it to gameobject?
from utymap.
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.
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.
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.
It is not responsibility of ThirdPersonBehaviour class to handle logic with buildings.
Yes, you can search for GO using unity API
from utymap.
Is it possible to create custom shaped building rather than rectangular buildings with the current raw data that OSM provides??
from utymap.
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.
Does UtyMap provides any kind of latlong bounds to determine the centre of polygon or a building?
from utymap.
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)
- Is there a 64bit version of the Utymap.Share library? HOT 3
- Crash bug when loading too many tiles HOT 5
- Migrate from mapzen to another vector tile provider HOT 4
- Error build in VS 2017 WIN64 HOT 9
- Unable to run the demo HOT 3
- Project Export & Unity Build APK Issue HOT 4
- Cannot setup object graph HOT 12
- Building Customization HOT 9
- Increasing Level of Detail HOT 1
- Building in Windows Standalone HOT 2
- Unable to load model errors HOT 2
- String.Format("{0}", 42.5) returns "42,5" in Germany HOT 2
- Error trying to run the demo HOT 1
- Is there any sample C++ OpenGL renderer available for utymap?
- type or namespace name 'UtyMap' could not be found. HOT 2
- Mobile demo does not exists
- Issue on Unity 2019.4.f1 Demo version
- Cmake error: missing: unit_test_framework system filesystem
- How to run the demo scenes? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from utymap.