Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Class Rudder

    Represents a ship rudder that rotates based on steering input. Provides visual rotation only - actual steering forces are applied by WaterObject components on the rudder itself. Multiple rudders can be used on a single ship.

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

    Fields

    | Edit this page View Source

    localRotationAxis

    Axis around which the rudder will be rotated.

    Declaration
    [Tooltip("Axis around which the rudder will be rotated.")]
    public Vector3 localRotationAxis
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    maxAngle

    Max angle in degrees rudder will be able to reach.

    Declaration
    [Tooltip("Max angle in degrees rudder will be able to reach.")]
    public float maxAngle
    Field Value
    Type Description
    float
    | Edit this page View Source

    name

    Name of the rudder. Can be any string.

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

    rotationSpeed

    Rotation speed in degrees per second.

    Declaration
    [Tooltip("Rotation speed in degrees per second.")]
    public float rotationSpeed
    Field Value
    Type Description
    float
    | Edit this page View Source

    rudderTransform

    Transform representing the rudder.

    Declaration
    [Tooltip("Transform representing the rudder.")]
    public Transform rudderTransform
    Field Value
    Type Description
    Transform

    Properties

    | Edit this page View Source

    Angle

    Current angle of the rudder in degrees. Positive angles indicate starboard turn, negative angles indicate port turn.

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

    AnglePercent

    Current rudder angle as a normalized value between -1 and 1.

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

    Methods

    | Edit this page View Source

    Initialize(AdvancedShipController)

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

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

    The ship controller this rudder 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