Using 2D ColliderGen Without the Officially Supported Packages
[divider_advanced color=”#0067A3″ paddingTop=”0″ paddingBottom=”10″ thickness=”4″ width=”100%” top=”true”]
Even if you are using other 2D packages than the officially supported 2D Toolkit, SmoothMoves or Orthello packages – or even no 2D package at all – you can still use the 2D ColliderGen framework.
The workflow will be similar to using the Orthello framework – you can still add AlphaMeshColliders to your sprite game objects. The collider will then be generated based on the game object’s main texture, leading to the desired result in most cases. The main benefit of using one of the officially supported packages is that scale, offset, rotation, horizontal and vertical mirroring and texture atlas usage is automatically analized in order to fit the collider perfecly to the sprite without any tweaking. With other packages you may need to set the offset and scale parameters manually if it does not get it right from the start.
If your GameObject has no texture attached at all, you can still set the Advanced Settings – Custom Image parameter to your desired sprite image and/or modify the “Custom Rotation”, “Custom Scale” and “Custom Offset” parameters.
Some problems might occur if your 2D framework extracts only part of a texture (typical when using sprite atlases) or maps the texture in a mirrored way, etc. A solution is again to use the Advanced Settings – Custom Image parameter and point it to an image that contains only a single sprite. You normally have these images at hand when building your texture atlases anyway.
Please visit the “2D ColliderGen Documentation – Orthello” page for information on using the 2D ColliderGen package:
[button id=”Orthello” size=”medium” align=”left” full=”false” link=”https://pixelcloudgames.com/tools/2d-collidergen/documentation/orthello/” linkTarget=”_self” color=”gray”]Visit Orthello Documentation Page[/button]