FORGE3D
  • Welcome
  • FAQ
  • Sci-Fi Effects
    • Getting started
    • Turrets
    • Turret Controller
    • Pool Manager
    • Examples
    • Scripts
    • Changelog
  • Force Field
    • Getting started
    • Force Field Video Tutorial
    • Force Field Controller
    • Rigidbodies
    • Shaders
    • Impact Points
    • Upgrading
    • Platform Differences
    • Changelog
  • Wasp Interdictor
    • VR Setup
    • Controller Components
    • PSD Template
    • Substance Painter Sources
  • Damage FX
    • Shader
    • Controller
    • Colliders
    • Material
    • Debugging damage
    • Impact points
    • Damage FX Shader Node
  • Planets
    • Changelog
Powered by GitBook
On this page
  1. Damage FX

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.

PreviousControllerNextMaterial

Last updated 4 years ago