HingeJoint

Description

Add a door spindle liked Hinge between two objects.Constraints

Properties

        string    Name
    The custom name of this object.

        string    ClassName
    The object-type name.

        RWObject    Parent
    The parent of this object.

        Vector3    Position
    Display the position of an object (global position and relative position).

        Vector3    Rotation
    Displays the global orientation of an object.

        Vector3    Scale
    The size of an object.

        int    GoTreeId
    The other object connected with the constraint.

        Vector3    Anchor
    The position of Anchor 1.

        Vector3    ConnectedAnchor
    The position of Anchor 2.

        bool    UseSpring
    Enable hinge spring to restrict rotation angle.

        float    Spring
    Strength of the spring.

        float    Damper
    Amount that the spring is reduced when active.

        float    TargetPosition
    The target angle that the hinged object wants to reach.

        bool    UseMotor
    Whether to enable the power of the hinge.

        float    TargetVelocity
    The hinge's target angular velocity.

        Vector3    Force     The force that makes the hinge reach the target angular velocity.

        bool    FreeSpin
    When enabled, the hinge will be accelerated by power and has no rotation velocity limitation.

        bool    UseLimits
    Whether to limit the angle.

        float    Min
    The minimum angle.

        float    Max
    The maximum angle.

        float    Bounciness
    How much the object bounces when it hits the angle limit.

        float    BounceMinVelocity
    The minimum velocity that is required to trigger a bounce.

        float    BreakForce
    The maximum force that the constraint can withstand.

        float    BreakTorque
    The maximum torque that the constraint can withstand.

        bool    EnableCollision
    Whether to activate the collision between two objects which are connected with a constraint.

Functions

    RWObject.Create(classname)
    A special function, creating an instance of the specified class.

    DelAllChild()
    Deletes all child objects.

    Clone()
    Clones an object to create a copy.

    Destroy()
    Delete objects.

    GetAncestorByName(Name)
    Returns the object's first parent node with the same name.

    GetAncestorByClassName(className)
    Returns the object's first parent node of the same class.

    GetChildByName(Name,recursive)
    Returns the object's first child object with the same name. If the second parameter is true, it will search through descendants of all hierarchies.

    GetChildByClassName(className,recursive)
    Returns the object's first child object of the same type. If the second parameter is true, it will search through descendants of all hierarchies.

    GetAllChild()
    Seeks all its child objects and returns as a list.

    GetAllDescendant()
    Recursively seeks all its descendants and returns as a list.

    IsClass(ClassName)
    Judges whether it is the class the same as the given object class or not.

    IsAncestor(TarObj)
    Judges whether itself is the ancestor of the target object or not.

    IsDescendant(TarObj)
    Judges whether itself is the descendant of the target object or not.

    WaitForChild(childName,timeout)
    Seeks its own child object.

    Child(childName)
    Seeks its own child object by a given name.

    Equals(TarObj)
    Judges whether the target object is the same as itself or not.

Events

    ChildAdded(childobject)
    Triggered when a child object is added.

    ChildRemoved(childobject)
    Deletes all child objects.

    DescendantAdded(descendantobject)
    Triggered when a descendant is added.

    DescendantRemoved(descendantobject)
    Triggered when a descendant is removed.

    AncestryChanged(AncestryChanged)
    Triggered when the ancestry is changed.