Hello Guys
Im really new with unity and 3D dev.
Im having some problems to create a box that when hitted by my controled char, will for it to stop.
Im trying to create something like a street, where the user can control a char, walking in the street but the char will stop when hit a building.
I appreciate any kind of help
Hello and welcome to Unity… that’s a great engine! As you i’m a bit new to Unity, but i started to love it immediately!
Anyway, what you are talking about is the collider…
You have two choices:
You can add a box collider to the object via component menu (Component>Physics>Box collider). It will create a box around the object (that may need some tweaking) and will prevent other objects with a colldier to go through it.
This is pretty much performance inexpensive related to the mesh colldier, and it is the one that is used in most games
Or you can add a mesh collider, that will create an area where other colliders can’t go through according to the mesh.
This one, though, can becaome really expensive, and it would be better to avoid it (except, of course, on situations like terrain, etc…)
keep in mind that you have to create a collider on things you want to avoid pass inside this, or enable Collider option inside the character controller contextual menu
Phil