Sitemap
Suleiman Abdullah

Suleiman Abdullah

My name is Suleiman Abdullah. Im learning game development and share what I learn by writing articles. :https://ko-fi.com/suleimanabdullah

Using Mesh Collider.

2 min readMay 1, 2025

--

Objective: Using Mesh Collider.

Why use mesh collider we use this for complex game object to get accurate collision.

Select the game Object and add mesh collider.

Press enter or click to view image in full size

You wont able to see the mesh collider because the mesh is exactly like the barrel shape. Now go to the scene view to the last Icon-right, click drop down and check Selection Wire

Press enter or click to view image in full size

This is exactly the mesh collider is created according to this vertex or triangle of the mesh.

Press enter or click to view image in full size

Important

If we add Rigid body to this barrel, the collision wont work at all.

Press enter or click to view image in full size

In order collision to work we need to enable is Kinematic, which mean is we exclude this object from physics engine. The Object wont fall no gravity nothing will work.

Press enter or click to view image in full size

But this object will affect other object which have rigid body, so if we create sphere with rigidbody it will collider with it.

Press enter or click to view image in full size

If isKinematic is enabled, Forces, collisions or joints will not affect the rigidbody anymore. The rigidbody will be under full control of animation or script control by changing transform.position. Kinematic bodies also affect the motion of other rigidbodies through collisions or joints

Get Suleiman Abdullah’s stories in your inbox

Join Medium for free to get updates from this writer.

https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Rigidbody-isKinematic.html

MeshCollider by Enabling Convex

When enable this option now rigidbody or physics engine function like normal. This option create complex collider but it reduce over head using cookies options.

Press enter or click to view image in full size

See you into the next one.

--

--

Suleiman Abdullah
Suleiman Abdullah

Written by Suleiman Abdullah

My name is Suleiman Abdullah. Im learning game development and share what I learn by writing articles. :https://ko-fi.com/suleimanabdullah