https://github.com/sztorm/cylindercollider
A cylinder collider approximation made of primitive colliders.
https://github.com/sztorm/cylindercollider
collider cylinder physics physics-3d unity unity3d
Last synced: about 1 month ago
JSON representation
A cylinder collider approximation made of primitive colliders.
- Host: GitHub
- URL: https://github.com/sztorm/cylindercollider
- Owner: Sztorm
- License: mit
- Created: 2021-08-12T02:37:33.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T13:47:46.000Z (almost 5 years ago)
- Last Synced: 2025-04-02T23:31:54.719Z (about 1 year ago)
- Topics: collider, cylinder, physics, physics-3d, unity, unity3d
- Language: C#
- Homepage:
- Size: 25.1 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CylinderCollider
A cylinder collider approximation made of primitive colliders.
## Description
**CylinderCollider** is a compound collider made of **BoxColliders**. It's usage is limited in
playmode as making it dynamically editable could make it more computationally demanding.
Project contains benchmark scene to compare mesh-based cylinder colliders with
primitive-collider-based colliders.
Mesh-based cylinder colliders seem to have better performance, but the compound colliders may
still perform better than more complex mesh colliders as stated in
[Unity Documentation](https://docs.unity3d.com/Manual/CollidersOverview.html).

2000 cylinder compound colliders with 12 sides:

2000 mesh colliders with 12 sides:

## Instruction
* Select the game object you want to add **CylinderCollider**
* Click **AddComponent** button
* Select **Physics** tab and click **CylinderCollider**
* Set appropriate values in **CylinderCollider** inspector
* Click **Generate Collider** button
If you want to modify prefabs with **CylinderCollider**, then you need to go to prefab editor and
generate colliders as prefabs in scene editor cannot destroy child objects without losing prefab
link.
## Requirements
No special requirements are required. Package is tested and works in Unity 2019.4.28f1, however
**CylinderCollider** may work in newer as well as in older Unity versions.
## Instalation
Download release unitypackage and import it to your project.
## License
**CylinderCollider** is licensed under the MIT license. **CylinderCollider** is free for
commercial and non-commercial use.
[More about license.](./LICENSE)