(2021-03-10, 10:38 AM)Radical Wrote: rz = 98.899940;
This is the angle. You have to change it using GetDynamicActorFacingAngle(actorid, rz);
I tried:
Code:
? ? // created [15:21:57] x[-29.020599] y[-186.818206] z[1003.546875] RotX[0] RotY[0] RotZ[0]
? ? // moved [15:23:45] x[-28.945550] y[-186.275421] z[1003.882324] rx[0.000000] ry[-3.300002] rz[98.899940]
? ? // http://www.calculadoraonline.com.br/basica
? ? new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
? ? GetDynamicActorPos(actorid, x, y, z);
? ? x = 1.0;
? ? x -= 0.924951;
? ? y = 0.542785;
? ? z = 0.335449;
? ? rx = 0.0;
? ? ry = 3.300002;
? ? // angle to hands
? ? new Float:tmpRZ;
? ? GetDynamicActorFacingAngle(actorid, tmpRZ); // 1.677500
? ? new Float:base = 100.57744; // 98.899940.677500 = 100.57744
? ? rz = base - tmpRZ; // 98.899940
? ? //
? ? DestroyDynamicObject(ActorInfo[actorid][actorGun]);
? ? ActorInfo[actorid][actorGun] = CreateDynamicObject(GetGunObjectID(24), x, y, z, rx, ry, rz);
It looks better, but its not like the original actor...
Original Actor:
How it was:
How it is now: