CREATE YOUR WORLD
Players & Characters: Tips
Controlling ZEPETO camera fixation
4min
the zepeto camera is set to follow the player's zepeto character this guide will show you how to prevent the zepeto camera from following your zepeto character at runtime step 1 write a script add a gameobject to the scene and include the runtimecamera example script below import { zepetoscriptbehaviour } from 'zepeto script'; import { zepetocamera, zepetoplayers } from 'zepeto character controller'; import { button } from 'unityengine ui'; export default class runtimecamera extends zepetoscriptbehaviour { public turnonbtn button; public turnoffbtn button; private mycamera zepetocamera; start() { zepetoplayers instance onaddedlocalplayer addlistener(() => { this mycamera = zepetoplayers instance localplayer zepetocamera }); this turnoffbtn onclick addlistener(() => { this mycamera statemachine stop(); }); this turnonbtn onclick addlistener(() => { this mycamera statemachine start(this mycamera currentstate); }); } } step 2 run if you press the pause button, you will notice that the zepeto camera no longer follows the player character and remains fixed in place when you press the resume button, you can see that the camera follows the character again