View Single Post
Old 07-20-2006, 03:32 PM   #1
Vruki Salet
Junior Member
 
Vruki Salet's Avatar
 
Join Date: Aug 2005
Location: Somewhere else entirely
Posts: 443
Why can't bone angles be adjusted by value of variables??

I'm messing with setting bone angles in BG_G2PlayerAngles and a weird thing happens.

This doesn't work:

Code:
static vec3_t rhangAngle;
float p = 20.0f;

VectorCopy(vec3_origin, rhangAngle);
rhangAngle[PITCH] +=  p;

--snip irrelevant if(){} for being in a vehicle--

strap_G2API_SetBoneAngles(ghoul2, 0, "rhang_tag_bone", rhangAngle, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time);
This does:

Code:
static vec3_t rhangAngle;
float p = 20.0f;

VectorCopy(vec3_origin, rhangAngle);
rhangAngle[PITCH] +=  20.0f;

--snip irrelevant if(){} for being in a vehicle--

strap_G2API_SetBoneAngles(ghoul2, 0, "rhang_tag_bone", rhangAngle, BONE_ANGLES_POSTMULT, POSITIVE_X, NEGATIVE_Y, NEGATIVE_Z, 0, 0, time);
See the only difference is in the first I added "p" (float value of 20.0) to rhangAngle[PITCH] and in the second I just added a float of 20.0 directly.

What gives?
Vruki Salet is offline   you may: quote & reply,