Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2018, 12:38:37 PM (7 years ago)
Author:
dreherm
Message:

HUd and Ghost rotations

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/3DPacman_FS18/src/modules/pacman/PacmanGelb.h

    r11898 r11978  
    4242#include "graphics/Camera.h"
    4343
     44
    4445namespace orxonox
    4546{
     
    5253
    5354            //no rotation
    54             //virtual void rotateYaw(const Vector2& value) override{};
     55            virtual void rotateYaw(const Vector2& value) override{
     56                this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() + value.x);
     57
     58                Pawn::rotateYaw(value);
     59
     60                // This function call adds a lift to the ship when it is rotating to make it's movement more "realistic" and enhance the feeling.
     61                if (this->getLocalVelocity().z < 0 && std::abs(this->getLocalVelocity().z) < stallSpeed_)
     62                this->moveRightLeft(-lift_ / 5.0f * value * sqrt(std::abs(this->getLocalVelocity().y)));
     63            };
    5564            virtual void rotatePitch(const Vector2& value) override{};
    5665
Note: See TracChangeset for help on using the changeset viewer.