NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Exhaust Flash

    ExhaustFlash inspector.

    Creates brief flame bursts from exhaust pipes during engine operation, gear shifts, and rev limiter engagement. Achieved through rapid sprite cycling with random textures and scales.

    Key Properties

    • Flash Chance (0-1): Probability of flash per engine cycle. 0.2 default provides occasional flashes.
    • Flash Duration: How long flash remains visible (default 0.05s). Actual duration randomized between 50%-150% of this value.
    • Flash On Rev Limiter: Trigger flashes when engine hits rev limiter.
    • Flash On Shift: Trigger flashes during gear changes.
    • On Flash Event: Unity event triggered when flash occurs. Use for complementary effects (sound, camera shake).

    Setup

    Adding Quads

    • Create two perpendicular Quads at exhaust location
    • Remove colliders from quads
    • Create material with emission-enabled shader (e.g. Particles/Standard Unlit) with Transparent rendering
    • Material must have _MainTex and _EmissionMap properties
    • Assign MeshRenderers to Mesh Renderers list

    Two perpendicular quads with flame sprites.

    Assigning Textures

    Random texture selected on each flash for variety.

    • Assign flame textures to Flash Textures list
    • Multiple textures recommended for visual variety

    'Flash Textures' list.

    Adding Point Lights

    Optional lights illuminate surroundings during flash.

    • Create PointLight at exhaust location
    • Disable the light initially
    • Add to Flash Lights list

    'Flash Lights' list.

    Methods

    • Flash(): Trigger single flash with event
    • FlashWithChance(): Trigger flash based on configured probability
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics