Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2009, 12:06:22 PM (15 years ago)
Author:
rgrieder
Message:

Found the firing direction bug: "Fixed goes first" we were told a few weeks ago in a lecture about spatial coordinates.
Here the problem was a quaternion multiplication.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/steering/src/orxonox/weaponsystem/WeaponMode.cc

    r6055 r6058  
    206206            {
    207207                Vector3 muzzleDirection(controller->getTarget() - this->muzzlePosition_);
    208                 this->muzzleOrientation_ = this->weapon_->getWorldOrientation() * (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection);
     208                this->muzzleOrientation_ = (this->weapon_->getWorldOrientation() * WorldEntity::FRONT).getRotationTo(muzzleDirection) * this->weapon_->getWorldOrientation();
    209209            }
    210210            else
Note: See TracChangeset for help on using the changeset viewer.