Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10287


Ignore:
Timestamp:
Feb 28, 2015, 11:50:41 PM (10 years ago)
Author:
landauf
Message:

use dynamic physics for projectiles. this seems to avoid 'tunneling' (if the projectile moves through an opponent without colliding) even with low FPS. projectiles now also collide with static entities.

Location:
code/trunk/src/modules/weapons/projectiles
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/weapons/projectiles/BasicProjectile.cc

    r10216 r10287  
    8282        if (!this->bDestroy_ && GameMode::isMaster())
    8383        {
    84             if (otherObject == this->getShooter()) // Prevents you from shooting yourself
     84            if (otherObject == this->getShooter() || otherObject->isA(Class(BasicProjectile))) // Prevents you from shooting yourself or other projectiles
    8585                return false;
    8686
  • code/trunk/src/modules/weapons/projectiles/Projectile.cc

    r10216 r10287  
    5858            this->enableCollisionCallback();
    5959            this->setCollisionResponse(false);
    60             this->setCollisionType(Kinematic);
     60            this->setCollisionType(Dynamic);
    6161
    6262            SphereCollisionShape* shape = new SphereCollisionShape(this->getContext());
Note: See TracChangeset for help on using the changeset viewer.