- Home /
how to stop mesh entering another mesh, both with colliders
This might be a stupid question but its really bothering me because i cant figure it out. I have a prefab mesh that is instantiated in code, so during the game all of those meshes are "clones". Anyways they all have mesh colliders and rigidbody's but when they come in contact the merge into each other, which is not what i want, i would really prefer them hit each other and not bounce off but just to not merge if you no what i mean.
can anyone suggest a solution to this probably simple problem.
thanks for all feedback.
Answer by Muzz 1 · Apr 30, 2011 at 06:52 PM
You might want to add other types of colliders. So box colliders etc. instead of mesh, which don't always hit each other.
Answer by Joshua · Apr 30, 2011 at 07:05 PM
It's because mesh colliders with rigidbodys can not collide with other mesh colliders. The general solution is to have your entire world be mesh colliders (trees, buildings, ground, statues, etc) and have all players and player-objects like guns be box/sphere/capsule colliders.
Haha thanks, it's because I'm starting to slowly understand Unity better :)
Answer by David C · Apr 30, 2011 at 09:20 PM
thanks guys it works perfectly! the help is greatly appreciated
Your answer
Follow this Question
Related Questions
Creating a solid, immoveable object ? 1 Answer
Make sphere rotate when controlled 7 Answers
Physics artifacts on terrain seams 0 Answers
More realistic physics? 0 Answers