Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 8, 2011, 11:45:32 PM (14 years ago)
Author:
dafrick
Message:

Documenting collision shapes in an effort to understand them and implement scaling.
Scaling is however not working yet, and thus not yet enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup/src/orxonox/worldentities/WorldEntity.cc

    r7937 r8422  
    642642    void WorldEntity::setScale3D(const Vector3& scale)
    643643    {
    644 /*
    645 HACK HACK HACK
    646         if (bScalePhysics && this->hasPhysics() && scale != Vector3::UNIT_SCALE)
    647         {
    648             CCOUT(2) << "Warning: Cannot set the scale of a physical object: Not yet implemented. Ignoring scaling." << std::endl;
    649             return;
    650         }
    651 HACK HACK HACK
    652 */
     644        // If physics is enabled scale the attached CollisionShape.
     645        if (false && this->hasPhysics() && this->collisionShape_ != NULL)
     646        {
     647            this->collisionShape_->setScale3D(scale);
     648        }
     649
    653650        this->node_->setScale(scale);
    654651
Note: See TracChangeset for help on using the changeset viewer.