Map objects don't seem to rotate properly, not sure how to fix it :(
I did find the following in the q3a game source though, is it something to do with it?
wi = NULL;
// the weapons have their origin where they attatch to player
// models, so we need to offset them or they will rotate
// eccentricly
if ( item->giType == IT_WEAPON ) {
wi = &cg_weapons[item->giTag];
cent->lerpOrigin[0] -=
wi->weaponMidpoint[0] * ent.axis[0][0] +
wi->weaponMidpoint[1] * ent.axis[1][0] +
wi->weaponMidpoint[2] * ent.axis[2][0];
cent->lerpOrigin[1] -=
wi->weaponMidpoint[0] * ent.axis[0][1] +
wi->weaponMidpoint[1] * ent.axis[1][1] +
wi->weaponMidpoint[2] * ent.axis[2][1];
cent->lerpOrigin[2] -=
wi->weaponMidpoint[0] * ent.axis[0][2] +
wi->weaponMidpoint[1] * ent.axis[1][2] +
wi->weaponMidpoint[2] * ent.axis[2][2];
cent->lerpOrigin[2] += 8; // an extra height boost
}
any chance you could take a look at the rotate code?
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hmm... Weapons and items rotate fine for me. Maybe you're refering to a different object type? Could you point me to a place in a q3 map where I can see the problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Map objects don't seem to rotate properly, not sure how to fix it :(
I did find the following in the q3a game source though, is it something to do with it?
wi = NULL;
// the weapons have their origin where they attatch to player
// models, so we need to offset them or they will rotate
// eccentricly
if ( item->giType == IT_WEAPON ) {
wi = &cg_weapons[item->giTag];
cent->lerpOrigin[0] -=
wi->weaponMidpoint[0] * ent.axis[0][0] +
wi->weaponMidpoint[1] * ent.axis[1][0] +
wi->weaponMidpoint[2] * ent.axis[2][0];
cent->lerpOrigin[1] -=
wi->weaponMidpoint[0] * ent.axis[0][1] +
wi->weaponMidpoint[1] * ent.axis[1][1] +
wi->weaponMidpoint[2] * ent.axis[2][1];
cent->lerpOrigin[2] -=
wi->weaponMidpoint[0] * ent.axis[0][2] +
wi->weaponMidpoint[1] * ent.axis[1][2] +
wi->weaponMidpoint[2] * ent.axis[2][2];
cent->lerpOrigin[2] += 8; // an extra height boost
}
any chance you could take a look at the rotate code?
thanks
hmm... Weapons and items rotate fine for me. Maybe you're refering to a different object type? Could you point me to a place in a q3 map where I can see the problem?