Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2008, 11:26:16 PM (16 years ago)
Author:
landauf
Message:
  • Readded smooth camera movement (configurable through CameraPosition), works also with camera-position-changes
  • Added free mouse look (press left control key)
  • Made strength of boost-blur configurable
Location:
code/branches/objecthierarchy2/src/orxonox/objects/items
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.cc

    r2361 r2478  
    3131
    3232#include "core/CoreIncludes.h"
     33#include "core/ConfigValueIncludes.h"
    3334#include "core/XMLPort.h"
    3435#include "objects/Scene.h"
     
    6364        this->boostBlur_ = 0;
    6465
     66        this->setConfigValues();
    6567        this->registerVariables();
    6668    }
     
    9597    }
    9698
     99    void Engine::setConfigValues()
     100    {
     101        SetConfigValue(blurStrength_, 3.0f);
     102    }
     103
    97104    void Engine::registerVariables()
    98105    {
     
    197204
    198205        if (this->boostBlur_ && this->maxSpeedFront_ != 0 && this->boostFactor_ != 1)
    199             this->boostBlur_->setParameter("Ogre/Compositor/Radial_Blur", 0, 0, "sampleStrength", 5.0f * clamp((-velocity.z - this->maxSpeedFront_) / ((this->boostFactor_ - 1) * this->maxSpeedFront_), 0.0f, 1.0f));
     206            this->boostBlur_->setParameter("Ogre/Compositor/Radial_Blur", 0, 0, "sampleStrength", this->blurStrength_ * clamp((-velocity.z - this->maxSpeedFront_) / ((this->boostFactor_ - 1) * this->maxSpeedFront_), 0.0f, 1.0f));
    200207    }
    201208
  • code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.h

    r2350 r2478  
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4747            void registerVariables();
     48            void setConfigValues();
    4849
    4950            virtual void tick(float dt);
     
    127128
    128129            Shader* boostBlur_;
     130            float blurStrength_;
    129131    };
    130132}
Note: See TracChangeset for help on using the changeset viewer.