- Home /
Collisions on imported objects
Hi. I have two objects that have been imported, a landscape, and an aeroplane. For some reason, I can not get them to collide. I have a tried using a mesh collider, and a rigidbody, but the plane just flies through it. Missile collide with the landscape, but not the plane. To get the missiles to collide, I had to add a mesh collider to each of the 2 parts of the landscape, but the plane has around a hundred parts, but adding one to all of them doesn't work. Any help?
Answer by Eric5h5 · Apr 18, 2011 at 12:12 PM
Don't use mesh colliders for moving objects, use primitive colliders. Also you need to read the docs: http://unity3d.com/support/documentation/Components/class-MeshCollider.html
What exactly is a "privitive collider"? Is it like box and sphere colliders? This plane has 100+ pieces, so I have no idea how I would do that.
@dragonfathom: Unless this is some kind of detailed realistic simulation, you don't usually need the collision shape to exactly match the vehicle shape. Just use a collection of several primitives or so (yes, boxes etc.) that's approximately the right shape.
So, would I have to individually add a collider to each piece? This may take a while...
@dragonfathom: no, there's no reason for that. An aeroplane can use one box for the body and another box for the wings.
Answer by OSharp · Nov 12, 2017 at 05:35 PM
well... having imported a file it came into 2 parts one of which was a mesh, if you haven't already tried make a mesh collider and drag the mesh onto it? this was with a .fbx - am I missing something? it works for me
@OSharp This has worked for me, I put the .obj file in my assets, dragged it into the Hierarchy where I wanted it. Then I clicked the arrow in the assets and that opened a menu that had the model, the material, and the mesh in the assets. so I created a $$anonymous$$esh Collider component and dragged the mesh into the mesh section of the $$anonymous$$esh Collider Component.
Answer by zmar0519 · Apr 18, 2011 at 12:04 PM
check Generate Colliders
in the mesh importer in the project.
That won't have any effect; the point is to not use mesh colliders.
No need to vote down!!! Some of us(O$$anonymous$$, most of us) do not know as much as you apparently do!!!
Your answer
Follow this Question
Related Questions
Is it possible to import other games? 2 Answers
FBX Import model won't change transform in playmode, only in Scenepreview. Why? 1 Answer
Blender transparent model Import and wierd line appears 0 Answers
How do I import animations from max with the clips already split out? 1 Answer
how to import a (.avi) video inside unity project ? 1 Answer