Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Class MobileShipInputProvider

    Ship input provider for mobile devices using on-screen UI controls. Reads input from Unity UI Sliders and MobileInputButtons placed in the scene. All control assignments are optional - assign only the controls you need for your ship.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    InputProvider
    ShipInputProvider
    MobileShipInputProvider
    Inherited Members
    ShipInputProvider.RotateSail()
    ShipInputProvider.DragObjectPosition()
    ShipInputProvider.DragObjectModifier()
    InputProvider.Instances
    InputProvider.Awake()
    InputProvider.OnDestroy()
    InputProvider.CombinedInput<T>(Func<T, int>)
    InputProvider.CombinedInput<T>(Func<T, float>)
    InputProvider.CombinedInput<T>(Func<T, bool>)
    InputProvider.CombinedInput<T>(Func<T, Vector2>)
    Namespace: NWH.DWP2.ShipController
    Assembly: NWH.DWP2.dll
    Syntax
    public class MobileShipInputProvider : ShipInputProvider

    Fields

    | Edit this page View Source

    anchorButton

    Button for toggling anchor.

    Declaration
    public MobileInputButton anchorButton
    Field Value
    Type Description
    MobileInputButton
    | Edit this page View Source

    bowThrusterSlider

    Slider for bow thruster control.

    Declaration
    public Slider bowThrusterSlider
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    changeCameraButton

    Button for changing camera in demo scenes.

    Declaration
    public MobileInputButton changeCameraButton
    Field Value
    Type Description
    MobileInputButton
    | Edit this page View Source

    changeShipButton

    Button for changing ship in demo scenes.

    Declaration
    public MobileInputButton changeShipButton
    Field Value
    Type Description
    MobileInputButton
    | Edit this page View Source

    engineStartStopButton

    Button for starting/stopping engines.

    Declaration
    public MobileInputButton engineStartStopButton
    Field Value
    Type Description
    MobileInputButton
    | Edit this page View Source

    steeringSlider

    Slider for steering control.

    Declaration
    public Slider steeringSlider
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    sternThrusterSlider

    Slider for stern thruster control.

    Declaration
    public Slider sternThrusterSlider
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    submarineDepthSlider

    Slider for submarine depth control.

    Declaration
    public Slider submarineDepthSlider
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    throttleSlider

    Slider for primary throttle control.

    Declaration
    public Slider throttleSlider
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    throttleSlider2

    Slider for secondary throttle control.

    Declaration
    public Slider throttleSlider2
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    throttleSlider3

    Slider for tertiary throttle control.

    Declaration
    public Slider throttleSlider3
    Field Value
    Type Description
    Slider
    | Edit this page View Source

    throttleSlider4

    Slider for quaternary throttle control.

    Declaration
    public Slider throttleSlider4
    Field Value
    Type Description
    Slider

    Methods

    | Edit this page View Source

    Anchor()

    Toggle anchor drop/weigh state.

    Declaration
    public override bool Anchor()
    Returns
    Type Description
    bool

    True if anchor toggle was triggered this frame.

    Overrides
    ShipInputProvider.Anchor()
    | Edit this page View Source

    BowThruster()

    Bow thruster input from -1 to 1 for lateral movement at the front.

    Declaration
    public override float BowThruster()
    Returns
    Type Description
    float

    Bow thruster input value.

    Overrides
    ShipInputProvider.BowThruster()
    | Edit this page View Source

    EngineStartStop()

    Toggle engine start/stop state.

    Declaration
    public override bool EngineStartStop()
    Returns
    Type Description
    bool

    True if engine start/stop was triggered this frame.

    Overrides
    ShipInputProvider.EngineStartStop()
    | Edit this page View Source

    Steering()

    Horizontal steering input from -1 (port/left) to 1 (starboard/right).

    Declaration
    public override float Steering()
    Returns
    Type Description
    float

    Steering input value.

    Overrides
    ShipInputProvider.Steering()
    | Edit this page View Source

    SternThruster()

    Stern thruster input from -1 to 1 for lateral movement at the rear.

    Declaration
    public override float SternThruster()
    Returns
    Type Description
    float

    Stern thruster input value.

    Overrides
    ShipInputProvider.SternThruster()
    | Edit this page View Source

    SubmarineDepth()

    Submarine depth control from -1 (surface) to 1 (dive).

    Declaration
    public override float SubmarineDepth()
    Returns
    Type Description
    float

    Submarine depth input value.

    Overrides
    ShipInputProvider.SubmarineDepth()
    | Edit this page View Source

    Throttle()

    Primary throttle input from -1 (full reverse) to 1 (full forward).

    Declaration
    public override float Throttle()
    Returns
    Type Description
    float

    Throttle input value.

    Overrides
    ShipInputProvider.Throttle()
    | Edit this page View Source

    Throttle2()

    Secondary throttle input for independent engine control.

    Declaration
    public override float Throttle2()
    Returns
    Type Description
    float

    Throttle2 input value.

    Overrides
    ShipInputProvider.Throttle2()
    | Edit this page View Source

    Throttle3()

    Tertiary throttle input for independent engine control.

    Declaration
    public override float Throttle3()
    Returns
    Type Description
    float

    Throttle3 input value.

    Overrides
    ShipInputProvider.Throttle3()
    | Edit this page View Source

    Throttle4()

    Quaternary throttle input for independent engine control.

    Declaration
    public override float Throttle4()
    Returns
    Type Description
    float

    Throttle4 input value.

    Overrides
    ShipInputProvider.Throttle4()
    • Edit this page
    • View Source
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics