Wheel

Description

When a Wheel is mounted on a part or a mesh part, the original part collider is replaced with the wheel so as to simulate a more realistic physical movement of a wheel.

Properties

        string    Name
    The custom name of this object.

        string    ClassName
    The object-type name.

        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.

      Vector2  Tiling
    The times that the material texture piles on the part surface. The larger the value, the higher the texture density.

      Vector2  Offset
    The offset of the material texture from the default position.

        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 the effect 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
    Whether to callback the collision.

        float    Mass
    Mass.

        float    WheelMass
    Wheel mass is recommended to be set within 20~80.

        float    Radius
    The radius of wheels affects the size of wheel's collision appearance. Under the same power, the actual speed decreases as the radius becomes larger.

      Vector3  WorldPosition
    Global position.

      Vector3  WorldRotation
    Global direction.

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.

    CreateJoint(targetPart, jointType)
    Creates a constraint of the specified type between itself and the target object.

    GetJointList()
    Returns a list of all physical constraints on the object.

    DelAllJoint()
    Deletes all physical constraints on the object.

    GetJointPartList(recursive)
    Retrieves all part objects connected with itself by constraints and returns as a list.

    GetMass()
    Retrieves its own mass.

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

    GetNetworkOwner()
    Returns the player who is owning this part.

    GetNetworkOwnershipAuto()
    Returns whether the ownership of this part is automatically assigned.

    SetNetworkOwner(player)
    Sets the ownership of this part and all other parts connected to it.

    SetNetworkOwnershipAuto()
    Makes the game engine automatically handle parts.

    GetTriggeringPart()
    Returns the other part objects that the part is in contact with.

Events

    ChildAdded(childobject)
    Triggered when a direct 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.

    JointBreak()
    Triggered when the constraint is deleted or bears a break force.