Quantcast
Channel: Answers for "Spiral staircase, stairs in general"
Viewing all articles
Browse latest Browse all 8

Answer by MadMenyo

$
0
0
I know this is old but like 99% of the question here, it lacks a "proper" answer. You should always optimize your mesh no matter what. But just using the same mesh as a mesh collider as well is killing. Always use boxes or spheres whenever possible for this. If you absolutely need more detail use a mesh. For a normal stairs of say "6 steps" I would import the mesh and add 6 box colliders. For a spiral stairs you can do the same but you have to rotate your box colliders, you can rotate collider components by attaching them to there own empty `GameObjects`. The colliders will overlap but this is no problem as long as you check for `tagged` collisions. If your spiral stairs is to narrow and steep you might still get into trouble with the height of the character not fitting in between, besides rethinking your design (unless you really intent on such a small and cramped space) you could try to add multiple boxes per step, from inner (small) to outer (large). Boxes are always a ton cheaper even when not aligned to world axis then checking per triangle on a custom collider mesh. Yet, when you think you can get away with some awful optimized expensive calculations then go for it. Don't optimize prematurely but keep the above in mind when designing.

Viewing all articles
Browse latest Browse all 8

Trending Articles