Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/OrxoKart_HS18/src/modules/orxokart/OrxoKartKart.cc @ 12161

Last change on this file since 12161 was 12147, checked in by emustafa, 6 years ago

controlls tweaks

File size: 2.4 KB
RevLine 
[12057]1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Cyrill Burgener
24 *
25 */
26
27/**
[12066]28    @file OrxoKartKart.cc
29    @brief Implementation of the OrxoKartKart control
[12057]30*/
31
[12066]32#include "OrxoKartKart.h"
[12057]33#include "core/CoreIncludes.h"
34#include "core/XMLPort.h"
35#include <BulletCollision/NarrowPhaseCollision/btManifoldPoint.h>
[12147]36#include "controllers/HumanController.h"
[12057]37
38namespace orxonox
39{
[12066]40    RegisterClass(OrxoKartKart);
[12057]41
[12066]42    OrxoKartKart::OrxoKartKart(Context* context) : SpaceShip(context)
[12057]43    {
[12147]44
[12066]45        RegisterObject(OrxoKartKart);
[12057]46        enableCollisionCallback();
47    }
48
[12066]49    void OrxoKartKart::moveFrontBack(const Vector2& value)
50        { 
[12147]51            this->steering_.z -= value.x;
52           
[12066]53        }
[12057]54
[12066]55    void OrxoKartKart::moveRightLeft(const Vector2& value)
[12147]56        {   
[12066]57            this->rotateYaw(value);
58        }
[12057]59
[12066]60    void OrxoKartKart::moveUpDown(const Vector2& value)
61        { 
62            this->steering_.y += value.x; 
[12147]63           
[12066]64        }
[12057]65
[12066]66    void OrxoKartKart::rotateYaw(const Vector2& value)
67        {
[12147]68            this->localAngularAcceleration_.setY(this->localAngularAcceleration_.y() - value.x); 
[12066]69        }
[12057]70
[12066]71    void OrxoKartKart::XMLPort(Element& xmlelement, XMLPort::Mode mode)
[12147]72        {
73            SUPER(OrxoKartKart, XMLPort, xmlelement, mode);
74           
75        }
[12057]76
77
78    /**
79    @brief
80        Removed, does nothing.
81    @param value
82    */
[12066]83    void OrxoKartKart::rotatePitch(const Vector2& value) { }
[12057]84
85    /**
86    @brief
87        Removed, does nothing.
88    @param value
89    */
[12066]90    void OrxoKartKart::rotateRoll(const Vector2& value) { }
[12057]91
92
93}
Note: See TracBrowser for help on using the repository browser.