Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 6, 2009, 11:12:01 PM (15 years ago)
Author:
rgrieder
Message:

Added some basic sound classes: WorldSound (to be used for 3D sound, is a WorldEntity) and AmbientSound (BaseObject, just add it somewhere and it will play with playOnLoad=true).
Also moved the sound listener device updating to the HumanController. We might want to modify this again so that the listener is at the camera position again, not at the space ship.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/controllers/HumanController.cc

    r5813 r5896  
    3636#include "infos/PlayerInfo.h"
    3737#include "overlays/Map.h"
     38#include "sound/SoundManager.h"
    3839#include "Radar.h"
    3940#include "Scene.h"
     
    7778    }
    7879
     80    void HumanController::tick(float dt)
     81    {
     82        if (HumanController::localController_s && HumanController::localController_s->controllableEntity_)
     83        {
     84            if (GameMode::playsSound())
     85            {
     86                // Update sound listener
     87                SoundManager::getInstance().setListenerPosition(HumanController::localController_s->controllableEntity_->getPosition());
     88                SoundManager::getInstance().setListenerOrientation(HumanController::localController_s->controllableEntity_->getOrientation());
     89            }
     90        }
     91    }
     92
    7993    void HumanController::moveFrontBack(const Vector2& value)
    8094    {
Note: See TracChangeset for help on using the changeset viewer.