Quote:
Originally Posted by Backstabnoob
check this stock:
Code:
stock intersects(ent1,ent2) {
static Float:minsa[3], Float:maxsa[3]
static Float:minsb[3], Float:maxsb[3]
pev(ent1,pev_absmin, minsa)
pev(ent1,pev_absmax, maxsa)
pev(ent2,pev_absmin, minsb)
pev(ent2,pev_absmax, maxsb)
if(minsb[0] > maxsa[0] ||
minsb[1] > maxsa[1] ||
minsb[2] > maxsa[2] ||
maxsb[0] < minsa[0] ||
maxsb[1] < minsa[1] ||
maxsb[2] < minsa[2])
return 0
return 1
}
You can easily make it work for a point as well.
|
this will not work for my entity ( entity from picture )
you see it will check a box but what about ohter mdl poly what are inside of that abs box?
thats way i tagged it to very hard, ive tried many things for now and no idea how to do it.