Skip to content

Commit

Permalink
Added readme file media.
Browse files Browse the repository at this point in the history
Updated readme file.
  • Loading branch information
Sztorm committed Aug 12, 2021
1 parent 7a8d674 commit fcf378b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Assets/Scenes/Scene_Benchmark.unity
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 507999435}
m_LocalRotation: {x: 0.29360813, y: 0.30989194, z: -0.101252206, w: 0.89861524}
m_LocalRotation: {x: 0.14877805, y: 0.30521247, z: -0.048340917, w: 0.93934745}
m_LocalPosition: {x: -15.37, y: 19.24, z: -29.63}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 36.188004, y: 38.054, z: 0}
m_LocalEulerAnglesHint: {x: 18, y: 36, z: 0}
--- !u!114 &507999439
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -562,7 +562,7 @@ MonoBehaviour:
- {fileID: 129127392586359912, guid: 1d134c733f719d746aa2981e90615a84, type: 3}
- {fileID: 416619951210422322, guid: b2cb4299c4af014499d785e91fe97498, type: 3}
objectIndex: 0
objectCountDimensions: {x: 10, y: 10, z: 10}
objectCountDimensions: {x: 20, y: 10, z: 10}
origin: {x: -6, y: 3, z: -6}
distanceBetweenObjects: {x: 1.7, y: 1.7, z: 1.7}
objectRotation: {x: 0, y: 0, z: 0}
Expand Down
Binary file added Media/CylinderCollider_Benchmark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media/MeshCollider_Benchmark.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Media/Screenshot_Inspector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,36 @@
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 it could make it more computationally demanding.
**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 collider equivalents with primitive-collider-based colliders.
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].

![Screenshot of inspector](Media/Screenshot_Inspector.png "Screenshot of inspector")

2000 cylinder compound colliders with 12 sides:

![CylinderCollider_Benchmark](Media/CylinderCollider_Benchmark.gif "CylinderCollider_Benchmark")

2000 mesh colliders with 12 sides:

![MeshCollider_Benchmark](Media/MeshCollider_Benchmark.gif "MeshCollider_Benchmark")

## 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.
Expand Down

0 comments on commit fcf378b

Please sign in to comment.