Hello, I'm trying to angulate entity according to the ground, but keep its view direction.
I tried to get global plane normal vector and convert it to angle vector, but didn't work properly.
Code:
engfunc(EngFunc_MakeVectors, vecAngles);
static Float:vecPlaneNormal[3];
global_get(glb_trace_plane_normal, vecPlaneNormal);
vector_to_angle(vecPlaneNormal, vecAngles);
set_pev(this, pev_angles, vecAngles);
Any suggestion?
__________________