NWH Wheel Controller 3D
Search Results for

    Show / Hide Table of Contents

    Struct WheelHit

    Contact information for a grounded wheel - updated every physics frame. Used for friction, suspension, surface detection, and effects. Only valid when WheelController.isGrounded is true. Vectors are world space unless noted as "local".

    Namespace: NWH.WheelController3D
    Assembly: NWH.WheelController.dll
    Syntax
    [Serializable]
    public struct WheelHit

    Fields

    | Edit this page View Source

    collider

    Collider the wheel is touching. Null when airborne. Can be TerrainCollider, MeshCollider, etc. Used for surface type detection, terrain texture sampling, and triggering effects.

    Declaration
    [Tooltip("Ground collider the wheel is touching. Null when airborne.")]
    [NonSerialized]
    public Collider collider
    Field Value
    Type Description
    Collider
    | Edit this page View Source

    contactVelocity

    Relative velocity between wheel and surface (m/s). Zero = perfect grip. Forward component = accel/brake slip, sideways = cornering slip. Adjusted for moving platforms automatically.

    Declaration
    [NonSerialized]
    [Tooltip("Relative velocity between wheel and surface. Indicates slip.")]
    public Vector3 contactVelocity
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    hitRigidbody

    Rigidbody of contacted object, or null for static geometry. Forces applied to it if otherBodyForceScale > 0. Enables moving platform support.

    Declaration
    [NonSerialized]
    [Tooltip("Rigidbody of hit object. Null for static geometry.")]
    public Rigidbody hitRigidbody
    Field Value
    Type Description
    Rigidbody
    | Edit this page View Source

    hitRigidbodyVelocity

    Velocity of contacted Rigidbody at hit point (m/s). Zero for static objects. Used for moving platform support. Subtracted from wheel velocity for slip calculation.

    Declaration
    [NonSerialized]
    [Tooltip("Velocity of hit object at contact point. Zero for static objects.")]
    public Vector3 hitRigidbodyVelocity
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    localNormal

    Surface normal in wheel local space. (0,1,0) when upright on flat ground. Changes with steering and lean angle.

    Declaration
    [NonSerialized]
    [Tooltip("Surface normal in wheel local space. Relative to wheel orientation.")]
    public Vector3 localNormal
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    localPoint

    Contact point in wheel local space. Y = vertical position, Z = forward/backward on tire. Used internally for suspension compression calculations.

    Declaration
    [NonSerialized]
    [Tooltip("Contact point in wheel local space. Used for suspension calculations.")]
    public Vector3 localPoint
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    normal

    Surface normal in world space (normalized). Points away from ground - (0,1,0) on flat surfaces. Used for suspension force direction, slope detection, and friction calculations.

    Declaration
    [NonSerialized]
    [Tooltip("Surface normal in world space. Points away from ground.")]
    public Vector3 normal
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    point

    Contact point in world space. With 3D detection, this is the average across tire width. Used for force application, particle spawning, and sound positioning.

    Declaration
    [NonSerialized]
    [Tooltip("Contact point in world space. Where wheel touches ground.")]
    public Vector3 point
    Field Value
    Type Description
    Vector3
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics