Menu

rotate&bob

2005-02-12
2013-02-27
  • Nobody/Anonymous

    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

     
    • German Garcia

      German Garcia - 2005-02-17

      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?

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.