NWH Wheel Controller 3D
Search Results for

    Show / Hide Table of Contents

    Class WheelControllerState

    Cached Rigidbody state for physics substepping. Allows wheel physics to run at higher frequency than Unity's native physics rate.

    Inheritance
    object
    WheelControllerState
    Namespace: NWH.WheelController3D
    Assembly: NWH.WheelController.dll
    Syntax
    [Serializable]
    public class WheelControllerState

    Fields

    | Edit this page View Source

    angularVelocity

    World-space angular velocity (rad/s).

    Declaration
    public Vector3 angularVelocity
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    centerOfMass

    Center of mass in body-local space (m).

    Declaration
    public Vector3 centerOfMass
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    inertiaTensor

    Diagonal inertia tensor in inertia space (kg*m^2).

    Declaration
    public Vector3 inertiaTensor
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    inertiaTensorRotation

    Rotation of the inertia tensor relative to the body.

    Declaration
    public Quaternion inertiaTensorRotation
    Field Value
    Type Description
    Quaternion
    | Edit this page View Source

    inverseInertiaTensor

    Per-component reciprocal of inertiaTensor (0 where the tensor is near zero).

    Declaration
    public Vector3 inverseInertiaTensor
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    inverseMass

    Reciprocal of mass.

    Declaration
    public float inverseMass
    Field Value
    Type Description
    float
    | Edit this page View Source

    localToWorldMatrix

    Body-to-world transform matrix (scale 1).

    Declaration
    public Matrix4x4 localToWorldMatrix
    Field Value
    Type Description
    Matrix4x4
    | Edit this page View Source

    mass

    Body mass (kg).

    Declaration
    public float mass
    Field Value
    Type Description
    float
    | Edit this page View Source

    position

    World-space body position (m).

    Declaration
    public Vector3 position
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    rotation

    World-space body rotation.

    Declaration
    public Quaternion rotation
    Field Value
    Type Description
    Quaternion
    | Edit this page View Source

    velocity

    World-space linear velocity (m/s).

    Declaration
    public Vector3 velocity
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    worldCenterOfMass

    Center of mass in world space (m).

    Declaration
    public Vector3 worldCenterOfMass
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    worldToLocalMatrix

    World-to-body transform matrix (inverse of localToWorldMatrix).

    Declaration
    public Matrix4x4 worldToLocalMatrix
    Field Value
    Type Description
    Matrix4x4

    Methods

    | Edit this page View Source

    ApplyForce(Vector3, float)

    Apply force at center of mass.

    Declaration
    public void ApplyForce(Vector3 force, float dt)
    Parameters
    Type Name Description
    Vector3 force
    float dt
    | Edit this page View Source

    ApplyForceAtPosition(Vector3, Vector3, float)

    Apply force at world position.

    Declaration
    public void ApplyForceAtPosition(Vector3 force, Vector3 worldPoint, float dt)
    Parameters
    Type Name Description
    Vector3 force
    Vector3 worldPoint
    float dt
    | Edit this page View Source

    ApplyTorque(Vector3, float)

    Apply torque in world space.

    Declaration
    public void ApplyTorque(Vector3 torque, float dt)
    Parameters
    Type Name Description
    Vector3 torque
    float dt
    | Edit this page View Source

    GetPointVelocity(Vector3)

    Calculate point velocity at world position. Matches Rigidbody.GetPointVelocity behavior.

    Declaration
    public Vector3 GetPointVelocity(Vector3 worldPoint)
    Parameters
    Type Name Description
    Vector3 worldPoint
    Returns
    Type Description
    Vector3
    | Edit this page View Source

    IntegrateTransform(float)

    Integrate position and rotation forward by dt. Call after all forces for this substep have been applied.

    Declaration
    public void IntegrateTransform(float dt)
    Parameters
    Type Name Description
    float dt
    | Edit this page View Source

    ReadFromRigidbody(Rigidbody)

    Read current state from a Rigidbody.

    Declaration
    public void ReadFromRigidbody(Rigidbody rb)
    Parameters
    Type Name Description
    Rigidbody rb
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics