Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 26, 2009, 11:59:39 AM (15 years ago)
Author:
landauf
Message:

Fixed attachment of "absolute" CameraPosition-Nodes in the Network (this refers to the top-down camera in Pong)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/worldentities/WorldEntity.cc

    r2787 r2851  
    181181
    182182        // Attach to parent if necessary
    183         registerVariable(this->parentID_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::parentChanged));
     183        registerVariable(this->parentID_,       variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged));
    184184    }
    185185
     
    188188        Network function that object this instance to its correct parent.
    189189    */
    190     void WorldEntity::parentChanged()
     190    void WorldEntity::networkcallback_parentChanged()
    191191    {
    192192        if (this->parentID_ != OBJECTID_UNKNOWN)
     
    362362        this->parentID_ = newParent->getObjectID();
    363363
     364        this->parentChanged();
     365
    364366        // apply transform to collision shape
    365367        this->collisionShape_->setPosition(this->getPosition());
    366368        this->collisionShape_->setOrientation(this->getOrientation());
    367369        // TODO: Scale
    368        
     370
    369371        return true;
    370372    }
     
    406408        this->parent_ = 0;
    407409        this->parentID_ = OBJECTID_UNKNOWN;
     410
     411        this->parentChanged();
    408412
    409413        // reset orientation of the collisionShape (cannot be set within a WE usually)
Note: See TracChangeset for help on using the changeset viewer.