Quote:
Originally Posted by Natsheh
Simple math check if the two vectors cross each other.
|
you can give me a simple example?
Here's a simple example of what I've tried:
PHP Code:
public hookthink(param[])
{
new id = param[0]
new HookEnt = param[1]
static Float:fOrigin1[3], Float:fOrigin2[3]
pev(id, pev_origin, fOrigin1)
pev(HookEnt, pev_origin, fOrigin2)
new tr
engfunc(EngFunc_TraceLine, fOrigin1, fOrigin2, DONT_IGNORE_MONSTERS, id, tr)
static Float:fFraction
get_tr2(tr, TR_flFraction, fFraction)
if (fFraction != 1.0)
client_print(id, print_chat, "right! have intersection")
}
In the example mentioned above, I can only get with solid entities. I cited this example to understand what I want to do.
Again, Thanks!