1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-14 06:32:45 +01:00
openrw/rwengine/include/ai/PlayerController.hpp
2015-01-27 15:25:45 +00:00

43 lines
798 B
C++

#pragma once
#ifndef _PLAYERCONTROLLER_HPP_
#define _PLAYERCONTROLLER_HPP_
#include <ai/CharacterController.hpp>
class PlayerController : public CharacterController
{
glm::quat cameraRotation;
glm::vec3 direction;
glm::quat lastRotation;
bool _enabled;
public:
PlayerController(CharacterObject* character);
/**
* @brief Enables and disables player input.
* @todo actually implement input being disabled.
*/
void setInputEnabled(bool enabled);
bool isInputEnabled() const;
void updateCameraDirection(const glm::quat& rot);
void updateMovementDirection(const glm::vec3& pos, const glm::vec3& rawdirection);
void exitVehicle();
void enterNearestVehicle();
virtual void update(float dt);
virtual glm::vec3 getTargetPosition();
void jump();
};
#endif