18.07.2012, 15:41
(
Последний раз редактировалось Mauzen; 18.07.2012 в 16:12.
)
You can do that wiht RNPC_SetAngleQuats(a, b, c)
a and c rotate the y axis and so create strange rotations, but b is the facing angle
This also needs to be in a RNPC_CreateBuild block of course, e.g.
(Thats basically how a later SetRNPCFacingAngle function would look like
But the problem is that it needs to consider all the current attributes of the NPC, like where he is walking etc)
@Archer: this would also work of course, but SetAngleQuats got a plugin-sided angle-to-quat converter, so it will be faster than calculating the quaternions in pawn
a and c rotate the y axis and so create strange rotations, but b is the facing angle
This also needs to be in a RNPC_CreateBuild block of course, e.g.
pawn Код:
RNPC_CreateBuild(npcid, PLAYER_RECRDING_TYPE_ONFOOT);
// Set angle
RNPC_SetAngleQuats(0.0, 80.0, 0.0);
// Add a short pause to apply the angle
RNPC_AddPause(100);
RNPC_FinishBuild();
// Playback sets the NPCs facing angle
RNPC_StartPlayback(npcid);
But the problem is that it needs to consider all the current attributes of the NPC, like where he is walking etc)
@Archer: this would also work of course, but SetAngleQuats got a plugin-sided angle-to-quat converter, so it will be faster than calculating the quaternions in pawn