- Home /
Add material and collider to a mesh imported from AutoCAD
I have a fbx file imported from AutoCAD. This contains a game object made up of 3D mesh (3D faces). I want to add material and collider to this file after I import this to unity.
This file basically represents a tunnel in which the 3D faces represents the walls of the tunnel. If i remove any 3D face of it, I can easily see it as a hollow inside.
My end goal is to move a camera inside the tunnel and keep it inside by applying the collider to it.
Currently, the 3D faces are quite thin and also there is no collider thus the camera corsses the walls. Please suggest me on this.
The file on: https://www.dropbox.com/s/aufd5xq5d661eej/mar1.7z
Thanks, Hitesh
I haven't downloaded your files or anything, so I won't write this out as a full answer, but you should be able to add your tunnel object to the scene, add a mesh collider component to it, set the mesh on the collider to the mesh of the object, and add a mesh renderer component. I would guess that the easiest way to get the camera to collide with the tunnel would be to control it with a character controller. I hope that helps get you started.
Thank you Ozone! Applying the mesh collider and using the character controller really made this work. Now I Can move the camera through FPS controller.
Also I am looking into the implementation of the character controller as I want my tunnel to penetrate the plane. currently the plane penetrate my tunnel.
Do you believe that will help me? Sorry I behave like a dumb here.
Your answer
Follow this Question
Related Questions
MeshCollider has different shape than MeshFilter 1 Answer
Colliders on this spider 1 Answer
How to change meshcollider thickness 2 Answers
How to correct add collider to every child of gameobject? 1 Answer
Making two mesh colliders collide 2 Answers