Why does the model with mesh (mesh) Add rigid bodies rigidbody and meshcollider, or will it go through the floor?

Source: Internet
Author: User

Two gameobject are placed in the air, one is cube, the other is an eggplant model.

Cube's Collider is Box Collider, the Collider of the tomato juice is the mesh Collider, they all add the rigid body (rigidbody) component, check the gravity gravity

However, the result of the operation is:

The cube is falling and falling to the ground and stopping.

Eggplant whereabouts, did not stop, penetrate the ground, has been down.

Pepsi is not the solution ...

Finally, I see this in the official documentation:

There is some limitations when using the Mesh Collider. Usually, both Mesh colliders cannot collide with each other. All Mesh colliders can collide with any primitive Collider. If your mesh is marked as convex, then it can collide with the other mesh colliders.

There are some restrictions on using mesh collider. Typically, there is no collision between two mesh collider. All mesh collider can collide with any prototype collider. If the grid is marked as raised (convex), it can collide with other mesh collider.

Try, put the eggplant mesh collider convex hook,

OK, stop it!

There are a few things to note:

Http://www.ceeger.com/Components/class-MeshCollider.html

Hints Tips
    • Mesh colliders cannot collide with all other unless they is marked as convex. Therefore, they is most useful for background objects like environment geometry.
      There is no collision between the mesh collider unless it is marked as raised (convex). Therefore, they are most often used for background objects such as environmental scenes.
    • Convex Mesh colliders must be fewer than 255 triangles.
      A raised mesh collider contains no more than 255 triangular faces.
    • Primitive colliders is less costly for objects under physics control.
      The prototype controller is more resource-efficient for physical control of objects.
    • When you attach a mesh Collider to a gameobject, it mesh property would default to the mesh being rendered. You can change this by assigning a different Mesh.
      When a mesh collider is attached to a game object, its grid properties are defined as the mesh for rendering and can be changed by assigning other meshes.
    • To add multiple colliders for a object, create child gameobjects and attach a Collider to each one. This allows the Collider to be manipulated independently.
      To add multiple collider to an object, you should create sub-objects and add a collider to each sub-object. This allows each collider to be manipulated individually.
    • You can look at the gizmos in the Scene View of the Collider is being calculated on your object.
      You can view the expected effect of the collider on your object through a wireframe (gizmos) in the scene view.
    • Colliders does their best-match the scale of an object. If you had a non-uniform scale (a-scale which was different in each direction), only the Mesh Collider can match Completel Y.
      The collider matches the proportions of the object as much as possible. If there is a set of irregular scaling (the proportions are different on each dimension), only the mesh collider can be used to match exactly.
    • If you is moving an object through it Transform component but you want to receive Collision/trigger messages, you must a Ttach a rigidbody to the object which is moving.
      If you want to receive the collision/trigger information of an object moving through the transform component, you must give the moving object attachment rigid body.

Why does the model with mesh (mesh) Add rigid bodies rigidbody and meshcollider, or will it go through the floor?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.