Quick answer: Deactivated instances are excluded from collision checks. If collisions still fire, your deactivate region didn’t actually cover them — verify the region math.

An optimization deactivates off-screen enemies via instance_deactivate_region. The player still collides with “invisible” enemies — those instances were never actually deactivated.

Deactivation Is Complete

A deactivated instance is fully skipped: no Step, no Draw, and crucially it’s invisible to place_meeting, instance_place, collision_line, etc. If collisions fire, the instance is still active.

Verify the Region

// common bug: region not centered on the camera
var cx = camera_get_view_x(view_camera[0]);
var cy = camera_get_view_y(view_camera[0]);
var cw = camera_get_view_width(view_camera[0]);
var ch = camera_get_view_height(view_camera[0]);
var pad = 128;

instance_activate_region(cx - pad, cy - pad, cw + pad*2, ch + pad*2, true);
instance_deactivate_region(cx - pad, cy - pad, cw + pad*2, ch + pad*2, false, true);

Activate the on-screen region first, then deactivate everything outside. The last argument notme keeps the controller alive.

Order Matters

activate_region with inside=true turns on what should be visible; deactivate_region with inside=false turns off the rest. Do both each step or things stay stuck.

Persistence Pitfall

Deactivated instances aren’t saved by game_save / don’t survive room change unless you reactivate first. Activate all before saving.

Verifying

Move the camera. Off-screen enemies deactivate (instance_count drops). Player can’t collide with anything off-screen. On-screen enemies behave normally.

“Deactivation works — if your region actually covers the instances. Debug the region rect, not the collision.”

Draw the deactivation rect in a debug overlay while tuning — you’ll immediately see if it’s offset from the camera.