-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building new objects with Flexible extension #129
Comments
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 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 |
I did try adding collision detection but it is just giving me building ID rather than latlongs. |
Have you tried to store lat/lon in your custom MonoBehaviour when you're attaching it to gameobject? |
What is the way to get the latlon for the buildings? Can I get it while i build the mesh in GameObjectBuilder css? |
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 |
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? |
It is not responsibility of ThirdPersonBehaviour class to handle logic with buildings. |
Is it possible to create custom shaped building rather than rectangular buildings with the current raw data that OSM provides?? |
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 |
Does UtyMap provides any kind of latlong bounds to determine the centre of polygon or a building? |
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:
|
Hello reinterpret cat, great library.
I am colliding Ethan 3D model to the building and trying to get latlong of the corners for the same building.
If Ethan 3D model has already collided with the building, I will add a 3D cube on top of that building (as in https://github.com/reinterpretcat/utymap#flexible-extension) indicating the building’s location is already found.
On Collision of Ethan to the building, I am just getting the id of the building nothing more than that. And we need a node to use flexible extension.
So is it possible to do this?
The text was updated successfully, but these errors were encountered: