I'm really not good with vector formulas, and I'm trying to figure out how to move an entity around similar to how EntMod moves entities.
I know how to make the entity move in straight lines, but getting it to follow the angle I'm looking while moving my player around is what gets me.
Here is the code I came closest to working but is still way off:
PHP Code:
static Float:playerOrigin[3], Float:playerAngles[3], Float:retVec[3];
pev(id, pev_origin, playerOrigin);
pev(id, pev_angles, playerAngles);
angle_vector(playerAngles, 1, retVec);
retVec[0] *= playerOrigin[0];
retVec[1] *= playerOrigin[1];
retVec[2] *= playerOrigin[2];
engfunc(EngFunc_SetOrigin, entity, retVec);