- Home /
Collision for Animating Meshes
Basically, I cannot figure how to get collision to work on animating models. The only scenario that I know how to make colliders work would be to have a bunch of separate meshes and exactly one bone per mesh. Unfortunately, I usually have more bones than meshes.
For example, I have a plane mesh that is split (knifed) 14 times and that has 15 bones on it. Each bone rotates on its x axis, resulting in a wiggling/earthquakish animation. Now, when I import the model (from Blender) into Unity and put a mesh collider on the plane, the physics do not animate with the animation. If I put mesh colliders on the bones, they make a bunch of separate planes (that animate on their x axis) that are not all attached at the edges, resulting a many gaps while the animation is playing.
So, how is one supposed apply colliders to an animation? I am new to Blender, let alone animation, so I may be handling this all wrong.
Thanks!
Answer by 3DMagicVR · Jan 20, 2011 at 04:59 AM
Hi, the method I know it's this:
You can use rigid bodies on every object to detect collision because the collision system it's defined this way, (Box, Sphere or Capsule) collide with Mesh collider or Rigid Bodies but not with another same collider, and the same for the Mesh collider, but the Rigid Body can collide with another same collider, the Character Controller collide with all the others, now if You use the Rigid Body make sure You check the Is Kinematic option (Active) this way you can move your objects separately and make every one can collide with other objects, keep in mind that the object with that is all ways collision with the Character Controller so if You want to make an air plane to have been impact on every part of it you have to set an script option to ignore the Character Controller, search in the manual for this option "collisionDetectionMode" to enabled or disabled the collision or use a conditional state to make it some function.
I appreciate the response! I am not sure if I fully understand what you mean.
Where should I put the mesh collider and rigidbody? Frankly, I do not really need the rigidbody, because the only thing that I need to collide with the object has a rigidbody itself. Am I wrong?
When no animations are playing, I can make my colliders work beautiful (have the colliders on the mesh), but when I start an animation, the colliders on the mesh do not move even though the mesh moves. I hope I am explaining myself better!
Thank you!
I have concluded that it is impossible to have mesh colliders on a model that is animating (and have the colliders animate too). You just have to put colliders on the bones that make up the armature of the animation.
Your answer
Follow this Question
Related Questions
How do I use a mesh collider With .blend? 3 Answers
Giant colliders restricted to a set size? 0 Answers
Glitchy Convex Mesh Collider 1 Answer
Crawling around the terrain 3 Answers
Problem with collision detection in an animated object 1 Answer