CalcAngles for bones

Posts 1–4 of 4 · Page 1 of 1
CalcAngles for bones
can someone give me the calc angles for bones?
or i dont need to change nothing im doing some thing wrong

heres my calc angles now
Code:
void CalcAngle(float *src, float *dst, float *angles)
{
	double delta[3] = { (src[0] - dst[0]), (src[1] - dst[1]), (src[2] - dst[2]) };
	double hyp = sqrt(delta[0] * delta[0] + delta[1] * delta[1]);
	angles[0] = (float)(asinf(delta[2] / hyp) * 57.295779513082f);
	angles[1] = (float)(atanf(delta[1] / delta[0]) * 57.295779513082f);
	angles[2] = 0.0f;
	if (delta[0] >= 0.0) { angles[1] += 180.0f; }
}
your calcangle is okay

arguments:
src = view vector
dst = bone vector
Quote Originally Posted by Zaczero View Post
your calcangle is okay

arguments:
src = view vector
dst = bone vector
i calculate ok but my aim is very up but following the head

nvm i fixed sry for waste of time
use vectorangles instead
Posts 1–4 of 4 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us