Show / Hide Table of Contents

    Class DistanceJoint3D

    Inheritance
    System.Object
    NativeObject
    BaseJoint
    DistanceJoint3D
    Inherited Members
    BaseJoint._autoConfigureConnected
    BaseJoint._numPosSolverIter
    BaseJoint._inertiaScaleA
    BaseJoint._inertiaScaleB
    BaseJoint._connectBody
    BaseJoint.autoConfigureConnected
    BaseJoint.numPosSolverIter
    BaseJoint.inertiaScaleA
    BaseJoint.inertiaScaleB
    BaseJoint.ignoreCollision
    BaseJoint.anchorFrame
    BaseJoint.connectedAnchorFrame
    BaseJoint.anchorPosition
    BaseJoint.worldAnchorPosition
    BaseJoint.worldAnchorRotation
    BaseJoint.connectedAnchorPosition
    BaseJoint.worldConnectedAnchorPosition
    BaseJoint.worldConnectedAnchorRotation
    BaseJoint.body
    BaseJoint.connectedBody
    BaseJoint.breakForce
    BaseJoint.breakTorque
    BaseJoint.OnCreateNative()
    BaseJoint.OnDestroyNative()
    BaseJoint.OnEnable()
    BaseJoint.OnDisable()
    BaseJoint.ApplyProperties()
    BaseJoint.ToString()
    NativeObject.OnDestroy()
    NativeObject.CreateNativeIfNot()
    Namespace: Motphys.Rigidbody
    Assembly: solution.dll
    Syntax
    public class DistanceJoint3D : BaseJoint

    Properties

    currentDistance

    Declaration
    public float currentDistance { get; }
    Property Value
    Type Description
    System.Single

    Current distance between two rigidbodies

    limitSpring

    Declaration
    public SpringDamper limitSpring { get; set; }
    Property Value
    Type Description
    SpringDamper

    The spring used to limit the distance.

    maxDistance

    Declaration
    public float maxDistance { get; set; }
    Property Value
    Type Description
    System.Single

    The max distance limit of the distance joint. It must be greater than 0.

    minDistance

    Declaration
    public float minDistance { get; set; }
    Property Value
    Type Description
    System.Single

    The min distance limit of the distance joint. It must be greater than 0.

    motor

    Declaration
    public LinearMotor motor { get; set; }
    Property Value
    Type Description
    LinearMotor

    The motor this joint uses.

    useLimit

    Declaration
    public bool useLimit { get; set; }
    Property Value
    Type Description
    System.Boolean

    If false, the default limit is [0,0].

    useMotor

    Declaration
    public bool useMotor { get; set; }
    Property Value
    Type Description
    System.Boolean

    Whether to use a motor.

    useSpring

    Declaration
    public bool useSpring { get; set; }
    Property Value
    Type Description
    System.Boolean

    Whether this joint uses a spring. If false, the spring will be infinity stiffness and 0 damper.

    Methods

    Awake()

    Declaration
    protected override void Awake()
    Overrides
    BaseJoint.Awake()

    SetDistanceLimit(Single, Single)

    Set the distance limit of the joint.

    Declaration
    public void SetDistanceLimit(float min, float max)
    Parameters
    Type Name Description
    System.Single min
    System.Single max
    Exceptions
    Type Condition
    System.ArgumentException

    Thrown when min > max

    Back to top Copyright © 2020-2024 北京谋先飞技术有限公司及其关联公司北京谋先飞科技有限公司
    Generated by DocFX