Use vec_dist for this. It'd go something like this:

Code:

if (vec_dist(my.x, camera.x) > range_limit) // set to a reasonable value*
{
my.passable = on; // passable if too far away
}

else
{
my.passable = off; // enable collsision if close
}



* 1024 or 2048 are good ideas. It should always be half the model's diameter plus the fastest rate of speed travelled, plus some clearance for possible jerks and the related. If going 128 quants per frame at 5 fps, and the model's diameter was 128, a range of 512 is sufficient enough.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials