Repository navigation
Zenkai Opcode PanCameraToPosition
Johnathon edited this page Sep 20, 2026
·
1 revision
Pans the camera so the top-left of the viewport reaches (x, y), blocking the script until the pan finishes.
PanCameraToPosition(x, y, speed)x
Integer
X of the top-left of the viewport, in world pixels (not the centre; the viewport is 240x160). To centre on world point wx, pass wx - 120.
y
Integer
Y of the top-left of the viewport, in world pixels. To centre on world point wy, pass wy - 80.
speed
Integer
Pan speed. Larger is faster.
The same pan as CenterCameraOnChar, aimed at a position instead of a character.
Minimal illustrative encoding (synthetic, not from a real ROM script):
0x00, N // PushByte(x)
0x00, N // PushByte(y)
0x00, N // PushByte(speed)
0x02, 0x1F // Step -> PanCameraToPosition| Game | Notes |
|---|---|
| Legacy of Goku 2 | Supported |