Unity prefabs importing without a colliders - unity3d

In my project, I have imported around 15 assets, but none of them have a collider, which would allow me to walk through the prefab (the whole house).
walking through the house
Would someone be able to assist me in fixing this? Is there anything I am doing wrong, or what am I doing wrong?
It was very difficult for me to find any prefabs with normal colliders, but I was able to find some fence prefabs.

You can add a mesh collider to whatever objects have a mesh renderer component attached, and it should automatically generate it.
https://docs.unity3d.com/Manual/class-MeshCollider.html

Related

Blender to Unity: Add Custom Collider to A Low Poly Style Terrain

I have created a low poly terrain object from Blender using a Plane, displaced and decimated it. I then exported it to Unity as an FBX object. As what I expected, my player simply falls through it since it has no colliders on. I could place a Box Collider on the object, but seeing it is a low poly style terrain with lots of bumps, it'll be pretty awkward to have my player walk straightly even if the ground is slightly raised. Even so, there are mountain areas in my terrain object and box colliders would totally be out of the question.
I was thinking of using the Mesh Collider in Unity. I tried experimenting with it but failed. There are also no clear tutorials online on the said situation. How can I add a custom collider to this terrain so the player can walk to it, plus without using the hastly Box Collider.
Here is my terrain object in Blender:
As you can see, putting a box collider is totally impossible.
You can make individual Sphere, Capsule and Box Colliders, hide their Mesh Renderers and then rotate, scale and place them to make something similar to your mesh. However, Mesh Colliders should be your best option, after adding a mesh collider to your mesh, make sure the convex option is NOT checked and also make sure to select the same mesh that the GameObject is using from the Mesh field in the Mesh Collider component.
Alternatively, if you want your collider to be simpler than your actual mesh, you could make a simpler mesh (either with an external program or by downloading the ProBuilder package in Unity), overlay that mesh with the terrain you have, give it a Mesh Collider and then hide its Mesh Renderer component.
I don't exactly understand what you meant by "I tried experimenting with it but failed." Did your character keep falling through? Did the character get stuck? Was the mesh collider generated in an incorrect way? I would be able to help you better if you can give me a detailed explanation.

Why the player is walking through objects in scene?

Instead walking on the ground he walk through it same for the ship and debris the other objects. He stay on the ground on the terrain but all the other objects in the scene he walk through it.
In the past i added Mesh Collider to the ship sapceship and checked the Convex turned the Convex on so it worked fine. but now i tried to add Mesh Collider almost to everything in the scene and it didn't change anything.
The scene is not my own but there is nothing speical i think. A terrain camera and objects. I added the ThirdPersonController.
Maybe there is a way to solve it making a new script in c# ? So far i could not find solution.
Make sure the collider of the Player is big enought to hold the model. And also that the terrain collider is adjusted to the terrain.
Try to change Center(Y) value of CapsulCollider

Don't know how to use collider in Unity3D

I'm having a weird problem. I just downloaded an object model from the internet which is a garbage can, and I inserted it into Unity.
It seems to ave no collider! I also added Box Collider but again it does not work too, and I can go through the object!
Here's the image of project and the object with its components. Can you please tell me what's going on?
Hy,
The cube collider is useless.
Your mesh collider don't work because there is no mesh on your object.
The mesh must be on a child of this element.
Sorry for my bad english i'm french.

Unity3d - How can I assign a full body mesh collider to a character with many meshes

I downloaded the free Zombies asset pack off the unity store, and have set up all the animations and everything. When I shoot it nothing happens obviously because there is no collider attached to it.
The problem I face is that there are around 20 different meshes for each part of the zombies body, and no complete mesh for the whole body. I have tried assigning each mesh to a part of the zombies body in the hierarchy but the mesh doesn't follow the movement nor is it in the correct position. This also seems like it would be resource heavy.
What I want to know is how can I get a mesh collider that will follow the animations of this zombie? If I have to compile all these parts and export as a mesh or what have you.. I am really not sure.

Unity3d - Create new gameobject from existing objects in unity

I am beginner in Unity3d. i would like to ask you about creating new gameobject from exsiting objects in unity3d.
I want to to create new gameobject from existing spheres and squares in unity3d. Right now, i only drag them to become a group. In addition, I want spheres and squares in the new gameobject not to effect collider together.
The new object only collide with other outside objects. How i can do it?
More a question, i would like to create a hoop object in Unity3D, Has already hoop object existed in Unity3D? It has not existed yet, please tell me how to create it? and the space is at middle of hoop not to effect collider ??? Thanks so much,
If my question is not easy to understand, i will edit.
Sounds like you're after a Prefab.
Once you've created your prefab, you might want to Instantiate it.
To avoid collisions, make sure your prefab does not have a Collider component. Simply remove the component inside the prefab.
A hoop shape is also known as a taurus or a donut. This isn't available as a primitive in Unity3D but it is very easily created in 3D modelling programs and used within Unity3D's mesh import.
As Nathan pointed out, create a prefab from your objects.
It looks like you want your objects to act like a compound collider (see Compound Colliders section here). You need your objects to have Collider components, and you need to add RigidBody component to their parent GameObject.
About torus collider: http://forum.unity3d.com/threads/27906-Adding-a-new-collider-primitive