Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Class Anchor

    Approximates the behavior of a real anchor by keeping the object near the anchored position, but allowing for some movement.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    Anchor
    Namespace: NWH.DWP2.ShipController
    Assembly: NWH.DWP2.dll
    Syntax
    public class Anchor : MonoBehaviour

    Fields

    | Edit this page View Source

    dragForce

    Maximum force that can be applied to anchor before it starts to drag.

    Declaration
    [Tooltip("Maximum force that can be applied to anchor before it starts to drag.")]
    public float dragForce
    Field Value
    Type Description
    float
    | Edit this page View Source

    dropOnStart

    Should the anchor be dropped at start?

    Declaration
    [Tooltip("Should the anchor be dropped at start?")]
    public bool dropOnStart
    Field Value
    Type Description
    bool
    | Edit this page View Source

    forceCoefficient

    Coefficient by which the force will be multiplied when the object starts pulling on the anchor.

    Declaration
    [Tooltip("Coefficient by which the force will be multiplied when the object starts pulling on the anchor.")]
    public float forceCoefficient
    Field Value
    Type Description
    float
    | Edit this page View Source

    localAnchorPoint

    Point in coordinates local to the object this script is attached to.

    Declaration
    [Tooltip("Point in coordinates local to the object this script is attached to.")]
    public Vector3 localAnchorPoint
    Field Value
    Type Description
    Vector3
    | Edit this page View Source

    zeroForceRadius

    Radius around anchor in which the chain/rope is slack and in which no force will be applied.

    Declaration
    [Tooltip("Radius around anchor in which the chain/rope is slack and in which no force will be applied.")]
    public float zeroForceRadius
    Field Value
    Type Description
    float

    Properties

    | Edit this page View Source

    AnchorPoint

    World space position of the anchor attachment point on the ship.

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

    AnchorPosition

    Position of the anchor.

    Declaration
    public Vector3 AnchorPosition { get; set; }
    Property Value
    Type Description
    Vector3
    | Edit this page View Source

    Dropped

    Has the anchor been dropped?

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

    IsDragging

    Is the anchor dragging on the floor?

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

    ParentRigidbody

    Rigidbody to which the force will be applied.

    Declaration
    public Rigidbody ParentRigidbody { get; }
    Property Value
    Type Description
    Rigidbody

    Methods

    | Edit this page View Source

    Drop()

    Drops the anchor. Opposite of Weigh()

    Declaration
    public void Drop()
    | Edit this page View Source

    Weigh()

    Weighs (retracts) the anchor.

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