Quote:
Originally Posted by VEN
I didn't get two things: why not solid and why sphere? Isn't it should be solid parallelepiped?
|
no no, the entity have to be solid that i can get its ID by get_user_aiming() function (to remove it)
Why not sphere? It works realy got with find_ent_in_sphere()...do you suggest using a other function?
The only thing other i can think of is ent_distance()...
Quote:
|
Isn't it should be solid parallelepiped?
|
Don't know what you mean...has this to do with 3D math !?
Btw.: i found functions to rotate a point around a axis...but it doesn't work
Code:
stock rotate_point_by_angle(const Float:angle[3],Float:point[3])
{
log_amx("before point : %f - %f - %f", point[0], point[1], point[2]);
point[0] = (point[0] * floatcos(angle[1], degrees)) - (point[1] * floatsin(angle[1], degrees));
point[1] = (point[1] * floatcos(angle[1], degrees)) + (point[0] * floatsin(angle[1], degrees));
log_amx("after1 point : %f - %f - %f", point[0], point[1], point[2]);
point[0] = (point[0] * floatcos(angle[2], degrees)) - (point[2] * floatsin(angle[2], degrees));
point[2] = (point[2] * floatcos(angle[2], degrees)) + (point[0] * floatsin(angle[2], degrees));
log_amx("after2 point : %f - %f - %f", point[0], point[1], point[2]);
point[1] = (point[1] * floatcos(angle[0], degrees)) - (point[2] * floatsin(angle[0], degrees));
point[2] = (point[2] * floatcos(angle[0], degrees)) + (point[1] * floatsin(angle[0], degrees));
log_amx("after3 point : %f - %f - %f", point[0], point[1], point[2]);
return 1;
}
I get weird server crashes... got an error window "backward mins/maxs"
Does anyone know what i did wrong?
I found out that floatcos()/floatsin() need a flag with degrees otherwise it returns radians..0o
But that also crashes the server...
Thanks VEN for responding!
greetz regalis
__________________