- Home /
A question about collisions.
Hi, I am mainly programming orientated but recently I have ventured more into the art field to enhance my skill set. I hope someone can shed some light on this issue.
The issue: Currently I have a shape with many different sides, bending and turning in all sorts of directions. The shape consists of more than 256 polygons, therefore I cannot use a mesh collider and have to use a primitive collider. I understand this much but what I am wondering is whether or not there is a simple way to add collisions to your more complex OBJ/FBX files rather than adding multiple box colliders to eventually form the full shape?
If anyone can shed any light on this for me I would be extremly grateful. I just don't want to begin adding hundreds of box colliders if there is a simple way :)
Thanks in advance!
After importing go to the object in your project folder, and then go to your import settings in the inspector and turn on generate colliders.
I already did this. The physics involved were very weak and my character, if persistent, can travel through them. Should I code something to stop that or does Unity have something built in?
1 thing you really have to do to get correct physics is set the mass in the rigidbody OR character controller etc. Else you should try put the speed down of the object.
I changed the mass but nothing changed to be honest. Is this because I am using transform.Translate? I hear this ignores physics, is that correct?
$$anonymous$$aybe you should try using a different controller to move your character. i personaly like this one very much, and indeed translate does ignore physics.
http://docs.unity3d.com/Documentation/ScriptReference/CharacterController.$$anonymous$$ove.html
Answer by GS-Kiwibird · Jan 18, 2013 at 10:45 PM
I would sort of "trace" the complex object in a 3D program with a simple model and use that as your mesh collider. That's what a lot of game companies do.
I know you could do that in UD$$anonymous$$, but I'm pretty sure Unity doesn't support that.
Your answer
Follow this Question
Related Questions
Box Collider Vs Simple Plane Mesh Collider 1 Answer
MeshCollider vs. anyOtherCollider 1 Answer
Box colliders from procedural mesh 1 Answer
Is Mesh Collider Optimal for GUI? 2 Answers
Internal collisions 1 Answer