A couple of scripts that helps you optimize the non primitive 2D Colliders in Unity (Edge Collider 2D and Polygon Collider 2D). You can change the level of optimization in the Editor with direct feedback in the Scene View (see the GIFs) to find a suitable compromise between performance and good approximation of the sprite shape. Usually you can loose quite a bit of points with virtually no change in the polygon contour.
For the Edge Collider it should also be said that it creates a good edge collision shape for you which doesn't happen by default in Unity.
The Rigidbody2D attached to the Collider2D. Bounciness: Get the bounciness used by the collider. Bounds: The world space bounding area of the collider. Composite: Get the CompositeCollider2D that is available to be attached to the collider. Density: The density of the collider used to calculate its mass (when auto mass is enabled). Unity 3D - Handling Collisions of GameObject using Collider2D Collisions are Unity's way of understanding the physical interaction between two Rigidbodies, and indeed, two gameObjects in general. In real life, when we say two objects collided, we mean that they touched each other physically.
At this point you can also get the latest package from the Asset Store
Status | Released |
Category | Tool |
Rating | |
Author | Alchem |
Tags | physics2d, tool, unity2d, unity3d |
Download
Unity Box Collider 2d
Unity On Trigger Enter 2d
Log in with itch.io to leave a comment.