Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 13, 2009, 11:21:40 AM (15 years ago)
Author:
rgrieder
Message:

Resolved projectile targeting problem by introducing a ClassTreeMask. It's a bit hacky but currently I don't see another quick way.
There is a problem though: The weapons aim into other directions while rolling the space ship…
I just couldn't figure it out.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/steering/src/modules/weapons/weaponmodes/HsW01.cc

    r6045 r6055  
    111111        model->setScale(5);
    112112
    113         //projectile->setOrientation(this->getMuzzleOrientation());
    114         projectile->lookAt(this->getTarget(), WorldEntity::World);
     113        this->computeMuzzleParameters();
     114        projectile->setOrientation(this->getMuzzleOrientation());
    115115        projectile->setPosition(this->getMuzzlePosition());
    116         projectile->setVelocity((projectile->getOrientation() * Vector3::UNIT_Z) * this->speed_); //getWorldOrientation??
    117         //projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
     116        projectile->setVelocity(this->getMuzzleDirection() * this->speed_);
    118117
    119118        projectile->setOwner(this->getWeapon()->getWeaponPack()->getWeaponSystem()->getPawn());
Note: See TracChangeset for help on using the changeset viewer.