Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Class Thruster

    Lateral thruster for sideways ship movement. Bow thrusters are mounted at the front for tight turning and docking, stern thrusters at the rear. Multiple thrusters of each type can be added for increased lateral control.

    Inheritance
    object
    Thruster
    Namespace: NWH.DWP2.ShipController
    Assembly: NWH.DWP2.dll
    Syntax
    [Serializable]
    public class Thruster

    Fields

    | Edit this page View Source

    maxThrust

    Maximum thrust force in Newtons.

    Declaration
    [Tooltip("Max thrust in [N].")]
    public float maxThrust
    Field Value
    Type Description
    float
    | Edit this page View Source

    name

    Display name for this thruster.

    Declaration
    [Tooltip("Name of the thruster - can be any string.")]
    public string name
    Field Value
    Type Description
    string
    | Edit this page View Source

    position

    Position relative to ship transform where thrust force is applied.

    Declaration
    [Tooltip("Relative force application position.")]
    public Vector3 position
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    propellerRotationDirection

    Declaration
    [FormerlySerializedAs("rotationDirection")]
    [Tooltip("Rotation direction of the propeller. Visual only.")]
    public Thruster.RotationDirection propellerRotationDirection
    Field Value
    Type Description
    Thruster.RotationDirection
    | Edit this page View Source

    propellerRotationSpeed

    Declaration
    [Tooltip("Rotation speed of the propeller if assigned. Visual only.")]
    public float propellerRotationSpeed
    Field Value
    Type Description
    float
    | Edit this page View Source

    propellerTransform

    Declaration
    [Tooltip("Optional. Transform representing a propeller. Visual only.")]
    public Transform propellerTransform
    Field Value
    Type Description
    Transform
    | Edit this page View Source

    spinUpSpeed

    Declaration
    [Tooltip("Time needed to reach maxThrust.")]
    public float spinUpSpeed
    Field Value
    Type Description
    float
    | Edit this page View Source

    thrusterPosition

    Whether this is a bow or stern thruster.

    Declaration
    public Thruster.ThrusterPosition thrusterPosition
    Field Value
    Type Description
    Thruster.ThrusterPosition

    Properties

    | Edit this page View Source

    Input

    Current input value for this thruster from -1 to 1. Automatically retrieves from the appropriate input channel based on thrusterPosition.

    Declaration
    public float Input { get; }
    Property Value
    Type Description
    float
    | Edit this page View Source

    IsInitialized

    Returns true if the thruster has been initialized with a parent ship controller.

    Declaration
    public bool IsInitialized { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    WorldPosition

    World space position where thrust force is applied.

    Declaration
    public Vector3 WorldPosition { get; }
    Property Value
    Type Description
    Vector3

    Methods

    | Edit this page View Source

    Initialize(AdvancedShipController)

    Initializes the thruster with a reference to its parent ship controller.

    Declaration
    public void Initialize(AdvancedShipController sc)
    Parameters
    Type Name Description
    AdvancedShipController sc

    The ship controller this thruster belongs to.

    | Edit this page View Source

    Update()

    Declaration
    public virtual void Update()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics