- Home /
Why my collision - PhysicMaterial - Camera doesn't work ?
I created the building, later on, I did put this in the scene, and I did import the Physic Material Packages from Unity Standard Assets, then, I put the "Box Collider" in every part of my building, and every box collider I attach the Physic Material "Bouncy" in the material property, it did work it, but in a new model, doesn't work this method, someone knows what happened, please help me, I just need move my camera and that my camera will collisions with my building, please what can I do?, before I didn't need the scripts, what can I do?
Answer by Bunny83 · Feb 04, 2011 at 12:11 AM
I guess your "building" is imported via FBXImporter? from 3ds max/maya/blender/...? Then you should turn you complete building into a new prefab. To create a prefab rightclick into your project view and select Create-->Prefab. Rename it (to find it later on) and drag and drop your building (with all colliders as child objects) from the scene view onto the prefab. That will turn your building in the scene into a prefab-instance. Now when you drag drop your prefab again into the scene it will look like the first one.
For imported models we use a special hierarchy inside the prefab. Because if you plan to edit your model very often and you're going to reimport it very often, it's better to put the actual model gameobject as a child of the prefab. That way you can replace the model without destroying anything that have been added as child objects.
In the scene view we always create an empty GameObject and add the model as child to it. All other stuff like boxcolliders ... are also added to this "root" gameobject. But it depends also on what you need more: flexibility or maybe performance. Very deep hierarchies drops the performance but as long as you keep the scale of the GO-tree by 1.0 it shouldn't be that much.
Doesn't work please help me, look it this is the first model that I do http://www.virtualworkcorporation.com/newtech/vesubioV2/
and this is the second http://www.virtualworkcorporation.com/newtech/demo/
the first collision right but the second doesn't collision whyyy ? :(
Your two samples are completely different (not the models). In your first like you used some kind of a FPS controller (i guess with a charactercontroller). The second link have some kind of free look movement. Are you sure your camera have some kind of a collider attached? And you could add the movement script to your question, maybe there's something wrong.
Your answer

Follow this Question
Related Questions
Jittery Collision Detection 0 Answers
Detect bounce amount 1 Answer
Keeping Rigidbody on Moving Platform? 1 Answer
How can I change camera when colliding with "X" object? 1 Answer
How to keep player in screen? 1 Answer