Colliders

The Damage FX works best with precise colliders that match its mesh geometry, e.g. mesh colliders.

If the distance between the closest mesh point and the collider hitpoint is bigger than the hit radius, then the effect won’t be visible at all. It’s important to provide a properly designed colliders to your Damage FX Objects.

The key is to get the impact from the hitpoint of the raycast against the collider to the original vertex position of the mesh. Sometimes this is not possible, for example, because you want to use the rigid body on the same object which will cause Unity to throw an error. Here’s a workaround to it. Remember, that you can use a convex collider or any number of simplified ones instead, either detach the mesh collider in the Awake(), and move it along each frame. You can also try using any third party tools/assets to help with generating a series of convex colliders covering the mesh.

Last updated