NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class LOD

    Represents a single Level of Detail (LOD) configuration for performance optimization. Defines the distance threshold at which the vehicle switches to this detail level.

    Inheritance
    object
    Object
    ScriptableObject
    LOD
    Namespace: NWH.VehiclePhysics2
    Assembly: NWH.VehiclePhysics2.dll
    Syntax
    [Serializable]
    [CreateAssetMenu(fileName = "NWH Vehicle Physics 2", menuName = "NWH/Vehicle Physics 2/LOD", order = 1)]
    public class LOD : ScriptableObject
    Remarks

    LODs are used to optimize performance by reducing the complexity of vehicle simulation and rendering based on the distance from the camera or player. Vehicles farther away use lower LOD levels with fewer active components and reduced update frequencies. Multiple LOD instances are typically configured in order from lowest distance (highest detail) to highest distance (lowest detail). For example: LOD0 at 0-50m, LOD1 at 50-100m, LOD2 at 100m+.

    Fields

    distance

    The distance threshold in meters at which this LOD becomes active. Vehicles beyond this distance from the camera will use this or a higher LOD level. Lower values indicate closer distances and typically correspond to higher detail levels.

    Declaration
    public float distance
    Field Value
    Type Description
    float

    See Also

    StateSettings
    StateDefinition
    VehicleComponent
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics