Answer the question
In order to leave comments, you need to log in
How to create a collider for a complex shape (screenshot)?
There is a Player in the scene, and he should not be allowed to leave the alley. That is, the Player cannot walk among the trees, go beyond the alley (1st screenshot - the alley is highlighted). Somehow I don't really want to add a large number of Box Colliders for the two sides of the alley. What is the best way to solve this problem?
Answer the question
In order to leave comments, you need to log in
Most often, they take and simply arrange BoxColliders, it's long and tedious, but productive and flexible. MeshCollider can be used as an alternative, but it is more expensive and harder to iterate with. You can speed up work with it using ProBuilder or a similar plugin. Sometimes they also write utilities for the editor that place colliders along a given path. If the level is not going to change much, then I would advise using BoxCollider, otherwise take ProBuilder.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question