Hook

Description

A Hook can be connected to an avatar part if attached to its hook point. For example, you can connect accessories and tools to an avatar by using hooks.

Properties

        string   ClassName
    The object-type name. Read only.

        string    Name
    The custom name of this object.

        RWObject   Parent
    The parent of this object.

      Vector3  Color
    Click to open the detailed color adjustment panel.

      Enum.MaterialType  Material
    The material of the part. Each material has its own physical properties.

      float  Transparency
    The transparency of the part.

      float  AlphaCutoff
    The section without texture will display the transparency of the material. AlphaCutoff is the transparency of the basic material texture.

      bool  VertexColor
    Whether to use the original part color.

      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.

      bool  IsLock
    "Lock" can make an object unselectable in the editing window, but selectable in the manager.

      bool  Anchored
    "Anchor" can remove effects of physics laws on an object.

      bool  CanCollide
    Whether an object can collide with other objects with the laws of physics.

      Vector3  RotVelocity
    Current rotation velocity, measured in radians per second. Rotation velocity of the anchored object can be synchronized to the parts or characters that connected to it.

      Vector3  Velocity
    Current velocity, measured in meters per second. Velocity of the anchored object can be synchronized to the parts or characters that connected to it.

      bool  IsCustomPhysics
    You can define physical properties of the part.

      float  Density
    Density.

      float  Friction
    Friction coefficient. When two objects come into contact, the smaller friction coefficient will be adopted.

      float  Bounciness
    Elasticity coefficient.

      float  FrictionWeight
    Friction Weight, taking effect only when an avatar touches other objects. The higher a friction weight, the greater the influence that the friction coefficient will be affected on the final friction coefficient.

      bool  UseGravity
    Whether to enable gravity.

      bool  IsCollisionCallBack
    Enable to trigger collision events.

      float  Mass
    Mass, read only.

      Enum.MeshTypes  UseType
    Part's shape.

      Enum.HookHumanoidBodyPart  HookPart
    Determine which part of the body will be connected with the hook.

      Vector3  PositionOffset
    The position offset of the hook relative to the hooked part.

      Vector3  DirectionOffset
    The direction offset of the hook relative to the hooked part.

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.

    GetMaterialName()
    Retrieves the name of its own material. Temporarily cannot be used for the terrain.

    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.

    GetMass()
    Retrieves its own mass.

    CanCollideWith()
    Returns whether itself is involved in the collision.

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.

    CollisionEnter()
    Triggered when the object starts a collision.

    CollisionExit()
    Triggered when the object ends a collision.

    TriggerEnter()
    Triggered when the object starts a contact.

    TriggerExit()
    Triggered when the object ends a contact.