TreeCollider: Generate colliders for trees, fast and easy

TreeCollider
Available in the Asset Store

Current version: 1.2
(Mars 15, 2022)

Tool for generating colliders for trees created using the built-in Tree Editor.

This package will let you add a new component called TreeCollider. It will use data from the tree and generate a mesh collider or capsule colliders for each spline. You may store colliders on the prefab or generate them temporary during play.

How to use:
– Create a new Tree
– Add the component: Physics/TreeCollider
– Change settings using the inspector so that the collider fit your needs

Capsule mode
Every spline on every branch will be used to create capsule colliders. (Needs to be pre generated for builds)

Mesh mode
A collision mesh will be extracted from your tree mesh (bark) to create a mesh collider.

Pre-generated colliders
If enabled, existing colliders will be kept.
If not, colliders will be replaced with generated colliders during play.

Target layer
What layer the generated colliders should have.

Target material
What physics material the generated colliders should have.

Trigger zone
Another component that can be added to only enable the colliders if a collider with the specified layer is inside the trigger zone. This feature can be a way to reduce the amount of active objects in a scene.

Screenshots:

Changelog:

Version 1.2 (2022-03-15)

  • Added new component “TriggerZone” to enable/disable colliders using layers
  • Restrictions added to prevent data loss when doing edits in various ways (tools will be disabled with information about how to use them in these cases)
  • Added new feature “Target material” (Physics material)
  • Added a sample with examples and an updated demo scene

Version 1.1 (2021-12-27)

  • Added new feature “Target layer”
  • Fix: Filter vectors with non-finite values when extracting Tree mesh
  • Improved custom editor (support for undo, prefab override marks, tooltips, no auto-replace during edit unless in play mode)
  • Added help boxes for various situations
  • Added button for clearing colliders
  • Less restrictions for capsule colliders (only the mesh collider needs a prefab to store the extracted mesh)
  • Added Unity version directives (2018.3^)
  • Tested with Unity 2018.4.36, 2019.4.34 and 2020.3.25

Version 1.0 (2021-08-23)

  • New component added: Physics/TreeCollider
  • Support for auto-generated colliders during play
  • Support for pre-generated colliders to store in prefab
  • Mode added: Mesh collider
  • Mode added: Capsule colliders

Version 1.2 released!

Added some screenshots!

Also removed the affiliate tag from the link.
In case someone want to check out this asset using my affiliate link, here it is: TreeCollider | Physics | Unity Asset Store

Added video!

https://vimeo.com/726314172

Just lowered the price from $10 USD to $4.99 USD