Action disabled: source

Mesh Collider

The Mesh Collider takes a Mesh Asset and builds its Collider based on that mesh. It is far more accurate for collision detection than using primitives for complicated meshes. Mesh Colliders that are marked as Convex can collide with other Mesh Colliders.


A Mesh Collider used on level geometry

Properties

Material충돌체가 서로 어떻게 상호작용 하는지 결정하는 Physic Material에 대한 참고 자료.
Is Trigger 만일 활성화 되면, 이 충돌체(Collider)는 트리거 이벤트로 사용되고, 물리엔진(physics engine)은 무시할 것 입니다.
Mesh Reference to the Mesh to use for collisions.
Smooth Sphere Collisions When this is enabled, collision mesh normals are smoothed. You should enable this on smooth surfaces eg. rolling terrain without hard edges to make sphere rolling smoother.
Convex If enabled, this Mesh Collider will collide with other Mesh Colliders. Convex Mesh Colliders are limited to 255 triangles.

Details

The Mesh Collider builds its collision representation from the Mesh attached to the GameObject, and reads the properties of the attached Transform to set its position and scale correctly.

Collision meshes use backface culling. If an object collides with a mesh that will be backface culled graphically it will also not collide with it physically.

There are some limitations when using the Mesh Collider. Usually, two 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 other Mesh Colliders.

충돌체(Colliders)는 리지드바디(Rigidbodies)와 함께 Unity에서 물리를 재현하기 위해 작동합니다. 리지드바디는 오브젝트가 물리력에 지배하에 있게 하는 반면, 충돌체는 오브젝트가 서로 충돌할 수 있게 해 줍니다. 충돌체는 리지드바디와는 별도로 오브젝트에 추가되어야 합니다. 충돌체에 리지드바디가 반드시 부착되어야 하는 것은 아니지만, 해당 오브젝트가 충돌의 결과로써 움직이려면 _반드시_ 리지드바디가 부착되어야 합니다.

두 충돌체 사이에 충돌이 발생하고 그 중 적어도 하나에 리지드바디가 부착되어 있다면, 거기에 부착된 오브젝트에 3개의 충돌 메시지세 개의 충돌 메시지 가 전송됩니다. 이러한 이벤트들은 스크립트에서 처리할 수 있고, 사용자가 내장 NVIDIA PhysX을 가지고 있거나 가지고 있지 않을 경우 각각 고유한 작동을 생성할 수 있게 해 줍니다.

충돌체를 사용하는 또 다른 방법은 트리거(Trigger), 로 표시하는 것이며, 이는 그저 인스펙터에서 IsTrigger 속성 체크상자를 체크하면 됩니다. 트리거(Triggers)는 물리 엔진이 효과적으로 무시하고, 트리거와 함께 충돌이 발생하면 고유한 세트의 3개의 충돌메시지 (three trigger messages)을 전송합니다. 트리거는 사용자 게임에서 cutscenes, 자동 문 개방, 안내 메시지 표시 등의 다른 이벤트를 트리거 하는 데 유용하다. 당신의 상상력을 발휘해 보길 바랍니다.

두 개의 트리거(Triggers)가 충돌 시 트리거 이벤트를 전송하려면, 그 중 하나는 역시 리지드바디(Rigidbody)를 포함하여야 함을 주지하기 바랍니다. 트리거가 일반 충돌체와 충돌하려면, 그 중 하나에는 리지드바디가 부착되어야 합니다. 여러 다른 타입의 충돌에 대한 자세한 표를 보려면, 아래 고급(Advanced) 단원에 충돌 동작표를 참조합니다.

Hints

  • Mesh Colliders _cannot_ collide with each other unless they are marked as Convex. Therefore, they are most useful for background objects like environment geometry.
  • Convex Mesh Colliders must be fewer than 255 triangles.
  • Primitive Colliders are less costly for objects under physics control.
  • When you attach a Mesh Collider to a GameObject, its Mesh property will default to the mesh being rendered. You can change that by assigning a different Mesh.

오브젝트에 여러 개의 충돌체(Colliders)를 추가하려면, 자식 게임오브젝트(GameObjects)을 생성하고 그 각자에 충돌체를 부착합니다. 이렇게 하면 각 충돌체(Collider)을 독립적으로 조종할 수 있습니다.

  • 충돌체가 사용자의 오브젝트 상에서 어떻게 계산되지는 지를 보려면 사용자는 Scene View 에서 기즈모(gizmo)을 보면 됩니다.
  • 충돌체는 오브젝트의 규모에 최대한 맞추려고 합니다. 사용자가 일정하지 않은 규모를 가졌다면(각 방향으로 다른 규모), 메쉬 충돌체(Mesh Collider)만이 완전히 이를 맞출 수 있습니다.
  • 사용자가 오브젝트를 트랜스폼(Transform) 컴포넌트 사이로 움직이지만 메시지를 충돌/트리거 메시지를 수신하고 싶다면, 사용자는 움직이는 오브젝트에 리지드바디(Rigidbody)를 부착하여야 합니다.

역링크