Some road meshes are sprawling, twisting, and winding and could "collide" with a number of roads without actually touching them. Furthermore, many of the meshes have bad verts in them, which wont allow mesh colliders to work anyway, and box colliders wont work for non-straight roads. For one, in order to get points of intersections between two colliders, they need to have rigidbodies attached to them and it's too expensive to do that, since there are hundreds of roads. I have tried to use colliders with no success. The Mesh itself is rectangular prism extruded from some line data by Mapbox. A long road can cross multiple tiles, and thus the same "road" may exist as two or more gameobjects on two or more tiles. The roads have a local position 0,0,0 with meshes on them that dictate their rendered position. The roads are gameobjects attached to a "Tile" gameobect. But, I'm having trouble finding a good way to do that. I want to place a gameobject at each intersection in an area. I'm currently using MapBox's Untiy SDK, which allows me to render 3D Buildings and roads.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |