CREATE YOUR WORLD
Players & Characters: Advanced

API to change ZEPETO character to basic body type

6min

When a ZEPETO avatar entering the world is wearing a body modification item or has chosen an excessively large or small body shape, it can hinder the gameplay in the world.

Using the API introduced in this guide, you can change the ZEPETO character back to its default body shape.

❗️ Caution

  • The ZEPETO.Character.Controller package is available from version 1.11.1 onwards.

API

Description

GetBodyModifierProperties()

- Returns information about which part of the body the ZEPETO character is wearing a body modification item.

DeformDefaultProperties()

- This API removes the body modification items worn by the ZEPETO character and changes it back to its default body shape.

DeformDefaultCostume()

- This API removes the body modification items worn by the ZEPETO character, changes it to its default body shape, and dresses it in the default ZEPETO costume. - It can also be applied at the ZEPETO Players level. In this case, all ZEPETO players entering the multiplayer world will have their body modification items removed and will be dressed in the default ZEPETO costume.



ZepetoPropertyFlag Enum




Example Script

Please refer to the following example script:

TypeScript




Script Description

1) The body modification item slot information worn by the Local Player is saved in this._itemProperties by GetBodyModifierProperties() and that information is printed to the console

Document image




2) All body modification items worn by the Local Player are removed by DeformDefaultProperties(), and the character is changed back to its default body shape.

Document image




3) By DeformDefaultCostume(), all body modification items worn by the Local Player are removed, and they are changed to the appearance of wearing the default ZEPETO costume.

Document image




4) The code below ensures that all players entering the world will have all their body modification items removed and will be dressed in the default ZEPETO costume.

  • However, the multiplayer settings and basic server-client script implementation must be completed in advance.
TypeScript

Document image




  • Animated avatar faces are also classified as body modification items.
  • Therefore, when using the DeformDefaultProperties(), DeformDefaultCostume() APIs, please note that the appearance of animated avatars entering the world will also change.