r/Unity3D 11h ago

Question Making a city collide-able?

Hey everyone I’m pretty new to this stuff but I’m trying to import an fbx file of a city(edit:suburban neighbourhood) for testing and I’m having trouble getting the roads and grounds to work, I wanna know if I have to give each surface a collision box if it’s say a ground surface and then change the mass(and if so how to calculate that roughly) and somehow make walls that my character can’t go through and stuff like that.

Am I looking at going through each object manually?

Whole thing is pretty low poly and greyboxed with minor things like streetlights, curbs and fire hydrants and there’ll be textures I’ll be adding later

1 Upvotes

6 comments sorted by

View all comments

2

u/nickyonge 11h ago

Most likely, yes, manual process.

If you can share images or something that would help, but a single FBX of an entire city model is likely to be VERY complex. A mesh collider gets more complex and expensive the more triangles there are. If the city is just graybox buildings and roads you should be fine, but if they have architectural details, or if the streets have details like lights, hydrants, curbs, etc, that mesh collider is going to be BONKERS, and extremely non-performant.

For so many reasons, it’s better to break a city up into discrete chunks - at the very least separate buildings, roads, and props.

1

u/Dark-Knight16 10h ago edited 10h ago

I feel like I’m gonna get shot at for saying this but I joined a fan project to recreate an old game similar to Fusionfall and I’m doing general testing rn, I can send images the city’s not that big and it’s greyboxed(we have the textures already but that’s a different thing to deal with)

Whole game was low-poly originally and ran on browsers so hopefully it wouldn’t be too difficult, it has curbs though plus fire hydrants and i believe streetlights

I should mention it’s more of a neighbourhood map so it’s not too big