Why haven’t these been added yet? Afaik these have been requested since 2009. For 3D applications cylinder shaped colliders are best for humanoid shaped characters. Box colliders are ok, but there are few downsides. First one is that if the collider rotates with player, the corner of the box can clip a damage source or slide off a platform when turning. The second is that if the corners of two box colliders hit it makes it feel like you take hit farther away (Minecraft suffers from this problem (especially with spiders) when facing diagonally relative to the block grid because hitboxes don’t rotate). Cylinder shapes shouldn’t be too hard to calculate, so why haven’t they been added yet?
Hello. What about the capsule collider which seems to be the best way to simulate a body? This way you can efficiently simulate a slip when the player is on the edge of a mesh like some stairs, a roof, a platform, etc. With a cylinder collider, you cannot do that - instead you could stay on the edge and it’s not really realistic. Respectfully, I think that a cylinder collider is just useless - and a box collider is probably the worst thing that you can do - except if you are creating a game with cubes as enemies and player ++
I think cylinder colliders are just much harder to process than say capsule collider and other primitives so there’s no reason to add them among primitives. At the end of the day you can just use cylinder mesh and add a convex mesh collider component to it. I believe there is a simple cylinder mesh in unity so you don’t have to import it from a 3D software.
Never seen a 3D app that uses cylinders for character collision. The usual shape used is a capsule, which is both cheaper and yields smoother results.
What if you don’t want your character to slip off?
Either use a convex mesh collider, or a capsule w/ high friction. This is however not what most games do.
The typical approach is using a capsule as it allows the character to run over small edges, stairs, and similar obstacles. A cylinder or any other flat-base shape would cause the character to bump against the smallest protrusion in the floor.
Constrain rotation on all 3 axis if you are using rigidbody. This is really essential and it will remove the sliding almost completely. Also if you don’t constraint collision, physic material on your collider won’t have any effect at all.
Use blender, make a simple cylinder, export as .obj, to Unity, and parent your cylinder GameObject to that. Use the parent for PHYSICS ONLY with a Mesh Collider and delete any rendering. The GameObject child will be VISUAL only with rendering. Make sure they are matching size!
I would like to see a built in cylinder collider.
Hi,
Have you tried to delete the default capsule collider on the cylinder gameobject, and add a mesh collider instead?
In that case then you’d need to speak to nVidia and not Unity.
.Why can’t I just use the primitive Unity Cylinder as parent and add a mesh collider to this primitive cylinder shape??