05.05.2012, 08:58
(
Последний раз редактировалось White_116; 06.05.2012 в 16:08.
)
Мне нужно высчитывать, для поворотов в плоскости ху я определился а вот дальше ...
//------------------------
Разобрался
//------------------------
Разобрался
PHP код:
GetPlayerCameraFrontVector(playerid, FV[0], FV[1], FV[2]);
new Float:unit_interval=floatsqroot(floatpower(FV[0],2) + floatpower(FV[1],2));
new Float:arccos = acos( FV[0]/unit_interval );
new Float:arcsin = asin( FV[1]/unit_interval );
new Float:angle;
if(arcsin >= 0.0) angle= arccos;
else angle=360.0 - arccos;
new Float:unit_interval2=floatsqroot(floatpower(FV[2],2) + floatpower(unit_interval,2));
new Float:arccos2 = acos( FV[2]/unit_interval2 );
new Float:arcsin2 = asin( unit_interval/unit_interval2 );
new Float:angle2;
if(arcsin2 >= 0.0) angle2 = arccos2;
else angle2 = 360.0 - arccos2;