SpecialMesh

Description

Applies a custom mesh to a basic part without changing its collision.

SpecialMesh can be used as a child of Part, MeshPart or Hook to change their appearances.

The mesh, which is created by other 3D modeling softwares and uploaded to the Reworld editor, will be converted to the internal format that the game engine can read. For the imported mesh file, the number of vertexes must be 3000 or less, and the file size cannot be more than 1Mb. The mesh size must be 100*100 or less. The Reworld editor supports uploading obj and fbx files.

Properties

        string   MeshId
    Mesh ID. When it is given a value by a script, a prefix rwid:// should be added, for example: " rwid://T1hRdTBybT1RCxfErK".

        string   TextureId
    Texture ID. When it is given a value by a script, a prefix rwid:// should be added, for example: " rwid://T23tdTB4bT1RCvBVdK".

        string   ClassName
    The object-type name. Read only.

        string    Name
    The custom name of this object.

        RWObject   Parent
    The parent of this object.

      Enum.MeshTypes  UseType
    Shape.

      Vector3  Position
    The offset of special mesh relative to the center of its parent.

      Vector3  Rotation
    The offset of special mesh relative to the center of its parent.

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.