---
title: Controlling ZEPETO camera fixation
slug: world-sdk-guide/controlling-zepeto-camera-fixation
docTags: 
createdAt: 2024-09-02T08:34:13.135Z
---

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.

```typescript
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

![](https://api.archbee.com/api/optimize/fCt3n1oCa8rgNJ8fw9I2N-osuH6nz1qdE_FwgCY1xgf-20240904-102422.gif)



- If you press the Pause button, you will notice that the ZEPETO camera no longer follows the player character and remains fixed in place.

![](https://api.archbee.com/api/optimize/fCt3n1oCa8rgNJ8fw9I2N-ovYTgg6jvDv2y5J31kIJ4-20240904-102422.gif)



- When you press the Resume button, you can see that the camera follows the character again.

