Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
Physics
1/5

Forum Thread | Discord | Email | Demo | Documentation | API Reference

--------------------------------------------------------------------------

Better Physics Layers gives you fine-grained and easy-to-use control over which colliders can collide.


✅ Features:
----------------
Up to 64 layers, totally separate from Unity's built-in layer system
Separate physics layers from rendering layers
Easy to use - Just specify which layer (or layers!) the object belongs to, without worrying about bitmasks
Fine-grained control - Objects can belong to any combination of layers, and can collide with any combination of layers
Mix and match - Any object without a PhysicsMask component will behave exactly like normal and won't be affected
Fast - No measurable performance hit even with thousands of rigidbodies*
Full source included, so you can inspect and modify to your heart's content


❔ Why?
----------------
Normally, whether or not two colliders can collide depends on the GameObject's layer and the physics layer matrix. This is a problem for two main reasons:

- There are only 32 layers, of which 8 are reserved, and these layers also affect rendering (among many other things!)
- Objects can only belong to one layer at a time


Better Physics Layers solves this by making good use of Unity's IgnoreCollision functions. This is extremely fast and doesn't hurt performance.


I created this system because I needed it. While working on my portal system I discovered that it was extremely limiting not being able to have an object belong to more than one physics layer at once, and I quickly used up all 24 of Unity's customisable built-in layers.


❗ *Limitations:
----------------
- Raycasts/spherecasts/etc. can't easily be filtered within the physics engine except by Unity's built-in layers, so there's an included function to filter the results of the cast instead.
- There's a small performance cost to updating the collision ignores, simply due to sheer number of loops required. On my computer this is ~0.2ms in the editor with 100 objects, or ~3ms in the editor with 1000 objects. The cost is O(n^2). The collision ignores only need to be updated when changing layers or adding new objects, so in most cases this performance cost is negligible.
- Currently only supports 3D physics, but I want to add 2D support in future.

Better Physics Layers

(not enough ratings)
15 users have favourite this asset
(15)
$15
Seat
1
Updated price and taxes/VAT calculated at checkout
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
License type
File size
320.1 KB
Latest version
1.0.0
Latest release date
Dec 3, 2020
Original Unity version
2019.4.5
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR