Dynamic Water Physics 2
Search Results for

    Show / Hide Table of Contents

    Anchor

    Anchor inspector.

    Anchor is a simple script that keeps a Rigidbody anchored to a point where the anchor was dropped through a physics joint. It approximates the behavior of a real anchor by keeping the object near the anchored position while allowing some movement, and can drag on the seafloor if forces exceed a threshold.

    Fields
    • dropOnStart - Should the anchor be dropped automatically at the start of the scene
    • localAnchorPoint - Point in coordinates local to the object this script is attached to. Defines where on the ship the anchor chain is attached
    • zeroForceRadius - Radius around the anchor in which the chain/rope is slack and no force will be applied. This allows small movements without resistance
    • forceCoefficient - Coefficient by which the force will be multiplied when the object starts pulling on the anchor. Controls the strength of the anchoring force
    • dragForce - Maximum force that can be applied to the anchor before it starts to drag along the seafloor
    Public Properties and Methods
    • Drop() - Drops the anchor. Sets the anchor position to the current anchor point position
    • Weigh() - Weighs (retracts) the anchor, allowing the object to move freely
    • Dropped - Property indicating whether the anchor has been dropped
    • IsDragging - Property indicating whether the anchor is currently dragging on the seafloor (force exceeds dragForce)
    • AnchorPoint - World space position of the anchor attachment point on the ship
    • AnchorPosition - Current world position of the anchor itself
    • Edit this page
    In this article
    Back to top Copyright © NWH - Vehicle Physics, Aerodynamics, Dynamic Water Physics