Repository navigation
Zenkai Opcode SetCollisionRect
Johnathon edited this page Sep 20, 2026
·
2 revisions
Sets a collision rectangle (blocking region) on the current map.
SetCollisionRect(x1, y1, x2, y2)x1
Integer
Left edge of the rectangle, in world pixels.
y1
Integer
Top edge, in world pixels.
x2
Integer
Right edge, in world pixels.
y2
Integer
Bottom edge, in world pixels.
Sets a collision rectangle (blocking region) on the current map. The four values are the rectangle's corners, not a width and height: every use in the game passes them that way (for example SetCollisionRect(240, 352, 272, 384), followed by RemoveRectFromMask2 with the same values).
Minimal illustrative encoding (synthetic, not from a real ROM script):
0x00, N // PushByte(x1)
0x00, N // PushByte(y1)
0x00, N // PushByte(x2)
0x00, N // PushByte(y2)
0x02, 0x47 // Step -> BytecodeVM_SetCollisionRect| Game | Notes |
|---|---|
| Legacy of Goku 2 | Supported |