Answer the question
In order to leave comments, you need to log in
How to make a script to pass obstacles, like in this example?
Good afternoon, in MagicaVoxel I created a single labyrinth model under Unity. Next, I added a picture of a rhombus. Imported, that's what happened.
My question is, I can make a rhombus move, but it will be possible to pass through obstacles (walls), but how can I make it exactly a labyrinth, so that I need to go around the walls, but you can’t go through them? I thought that we need a Box Collider, but this model is the only one, it will not be possible to make the walls separately there solid. How to be?
Answer the question
In order to leave comments, you need to log in
There is (as TheTalion
already pointed out ) Rigidbody
There is also MeshCollider, which will make you a collider according to the shape of the mesh.
But there is a problem in that the mesh Collider in terms of performance and "adequacy" is a bad idea.
Here's another link to the manual, there about gluing colliders, which interact with each other and other useful things .
In fact, it would be good practice to make walls for your labyrinth out of primitive BoxCollider, they will still be static for you and "stick together in the scene", so there should be no problems with performance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question