CREATE YOUR WORLD
Players & Characters: Advanced

Changing the collision area of the ZEPETO character

4min

Regardless of the ZEPETO character's body shape, the size of the character controller's collision area is consistent for all.

The collision area of the character controller is tailored to the basic body shape and is cylindrical in form.

In the runtime's Scene mode, by selecting a generated ZEPETO character, you can view the character controller's collision area.

Character Controller Collision Area in Cylindrical Form
Character Controller Collision Area in Cylindrical Form

Default Values of Controller Collision Area
Default Values of Controller Collision Area




The height of a ZEPETO character can vary based on its body shape or the items equipped.

When there's a significant difference from the basic body shape, the collision area can sometimes appear unnatural.

📘 Please refer to the following guide. [Want to know the character's height]



In such instances, you can modify the Collider attribute value of the character controller using scripts during runtime.

  • Height: The height of the collision area
  • Center: The central axis of the collision area
  • Radius: The radius of the collision area

Please note, the values used in the examples are set for the test world and test account. Adjust the settings to suit your world. In the example, the Radius value wasn't altered.

TypeScript

  • The essential script involves accessing the character controller and modifying the properties’ values:
    • this._localPlayer.zepetoPlayer.character.characterController.height = number;
    • this._localPlayer.zepetoPlayer.character.characterController.center = Vector3;
Appearance of a reduced collision area for smaller body shapes during runtime
Appearance of a reduced collision area for smaller body shapes during runtime

  • There may be instances where you cannot measure the height correctly for avatars wearing specific unique items.