NWH Vehicle Physics 2
Search Results for

    Show / Hide Table of Contents

    Class SkidmarkManager

    Manages per-wheel skidmark generation, appearance, and lifetime for the vehicle.

    Inheritance
    object
    VehicleComponent
    Effect
    SkidmarkManager
    Inherited Members
    VehicleComponent.state
    VehicleComponent.vehicleController
    VehicleComponent.IsActive
    VehicleComponent.VC_Initialize(VehicleController)
    VehicleComponent.VC_Initialize()
    VehicleComponent.VC_FixedUpdate(float)
    VehicleComponent.VC_SetDefaults()
    VehicleComponent.VC_LoadStateFromStateSettings()
    VehicleComponent.VC_Update(float)
    VehicleComponent.VC_DrawGizmos()
    VehicleComponent.VC_Validate(VehicleController)
    VehicleComponent.UpdateLOD()
    VehicleComponent.ToggleState()
    Namespace: NWH.VehiclePhysics2.Effects
    Assembly: NWH.VehiclePhysics2.dll
    Syntax
    [Serializable]
    public class SkidmarkManager : Effect

    Fields

    fallbackMaterial

    Material used when the current surface has no skidmark material assigned or the surface is null.

    Declaration
    [Tooltip("Material that will be used if no material is assigned to current surface or current surface is null.")]
    public Material fallbackMaterial
    Field Value
    Type Description
    Material

    globalSkidmarkIntensity

    Higher value gives darker skidmarks for the same slip.

    Declaration
    [Range(0, 5)]
    [Tooltip("Higher value will give darker skidmarks for the same slip.")]
    public float globalSkidmarkIntensity
    Field Value
    Type Description
    float

    groundOffset

    Height above ground at which skidmarks are drawn.

    Declaration
    [Tooltip("Height above ground at which skidmarks will be drawn.")]
    public float groundOffset
    Field Value
    Type Description
    float

    intensitySmoothing

    How fast the skidmark fades in/out. Higher is faster, 10-20 is a good range.

    Declaration
    [Tooltip("Controls how fast the skidmark fades in/out. Higher = faster response. 10-20 is good.")]
    public float intensitySmoothing
    Field Value
    Type Description
    float

    lowerIntensityThreshold

    Below this skidmark alpha the skidmark mesh is not generated.

    Declaration
    [Tooltip("When the skidmark alpha value is below this value, skidmark mesh will not be generated.")]
    public float lowerIntensityThreshold
    Field Value
    Type Description
    float

    maxSkidmarkAlpha

    Max skidmark texture alpha.

    Declaration
    [Range(0, 1)]
    [Tooltip("Max skidmark texture alpha.")]
    public float maxSkidmarkAlpha
    Field Value
    Type Description
    float

    maxTotalTris

    Total skidmark mesh triangles per wheel before the oldest section is destroyed.

    Declaration
    [Tooltip("Total number of skidmark mesh triangles per wheel before the oldest skidmark section gets destroyed.")]
    public int maxTotalTris
    Field Value
    Type Description
    int

    maxTrisPerSection

    Triangles drawn per section before the mesh is saved and a new one is generated.

    Declaration
    [Tooltip("Number of triangles that will be drawn per one section, before mesh is saved and new one is generated.")]
    public int maxTrisPerSection
    Field Value
    Type Description
    int

    minDistance

    Distance from the last skidmark section needed to generate a new one.

    Declaration
    [Tooltip("Distance from the last skidmark section needed to generate a new one.")]
    public float minDistance
    Field Value
    Type Description
    float

    simplifiedShading

    Cheap shading path for URP Low / mobile - no specular, procedural relief or breakup.

    Declaration
    [Tooltip("Cheap shading path for low-end/mobile. Disables specular, procedural relief and breakup.")]
    public bool simplifiedShading
    Field Value
    Type Description
    bool

    skidmarkContainer

    Game object that contains all the skidmark objects.

    Declaration
    [Tooltip("Game object that contains all the skidmark objects.")]
    public GameObject skidmarkContainer
    Field Value
    Type Description
    GameObject

    skidmarkDestroyDistance

    Skidmarks are deleted when their distance from the parent vehicle exceeds this.

    Declaration
    [Tooltip("Skidmarks get deleted when the distance from the parent vehicle is higher than this.")]
    public float skidmarkDestroyDistance
    Field Value
    Type Description
    float

    skidmarkDestroyTime

    Time after which the skidmark is destroyed. Set to 0 to disable.

    Declaration
    [Tooltip("Time after which the skidmark will get destroyed. Set to 0 to disable.")]
    public float skidmarkDestroyTime
    Field Value
    Type Description
    float

    textureLengthMeters

    Length in meters over which the skidmark texture tiles along the mark.

    Declaration
    [Tooltip("Length in meters over which the skidmark texture tiles along the mark.")]
    public float textureLengthMeters
    Field Value
    Type Description
    float

    Properties

    EffectiveMaxTotalTris

    Triangle budget the generators run with. Floored at two sections so trimming cannot delete the section currently being written.

    Declaration
    public int EffectiveMaxTotalTris { get; }
    Property Value
    Type Description
    int

    EffectiveSkidmarkDestroyDistance

    Destroy distance the generators run with. Floored at the length of a full section so a section cannot be culled while it is still being drawn.

    Declaration
    public float EffectiveSkidmarkDestroyDistance { get; }
    Property Value
    Type Description
    float

    Methods

    SkidmarkUpdateCoroutine()

    Per-tick loop that computes slip-based intensity per wheel and drives each generator.

    Declaration
    public IEnumerator SkidmarkUpdateCoroutine()
    Returns
    Type Description
    IEnumerator

    VC_Disable(bool)

    Disables the component and stops its updates.

    Declaration
    public override bool VC_Disable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent

    True when called by a parent ManagerVehicleComponent fan-out or the VehicleController enable/disable loop. The LOD system passes false.

    Returns
    Type Description
    bool

    True if successfully disabled, false otherwise

    Overrides
    VehicleComponent.VC_Disable(bool)
    Remarks

    Refused on a component that is not initialized. Records whether the call came from a parent, which is what VC_Enable checks before a bulk re-enable.

    VC_Enable(bool)

    Enables the component and starts its updates.

    Declaration
    public override bool VC_Enable(bool calledByParent)
    Parameters
    Type Name Description
    bool calledByParent

    True when called by a parent ManagerVehicleComponent fan-out or the VehicleController enable/disable loop. The LOD system passes false.

    Returns
    Type Description
    bool

    True if successfully enabled, false otherwise

    Overrides
    VehicleComponent.VC_Enable(bool)
    Remarks

    Initializes the component first if it is not initialized yet. A parent bulk enable is refused unless the last disable also came from a parent, so it cannot resurrect a component turned off by LOD, by a script, or disabled in StateSettings.

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