1#ifndef _FREELOOKCOMPONENT_HPP_
2#define _FREELOOKCOMPONENT_HPP_
20 void Update(
float deltaTime)
override;
26 virtual void SetSpeed(
float speed) {this->speed = speed;}
28 virtual void SetAcceleration(
float acceleration) {this->acceleration = acceleration;}
30 virtual void SetDamping(
float damping) {this->damping = damping;}
32 virtual void SetMaxSpeed(
float maxSpeed) {this->maxSpeed = maxSpeed;}
48 void SetPitch(
float pitch) { this->pitch = pitch; }
50 void SetYaw(
float yaw) { this->yaw = yaw; }
52 void SetRoll(
float roll) { this->roll = roll; }
63 void UpdateInput(
float deltaTime)
override;
65 void UpdateCamera(
float deltaTime)
override;
68 void ApplyDamping(
float DeltaTime);
70 void ApplyAcceleration(
float DeltaTime);
76 float sensitivity = 0.1f;
81 bool isInvertY =
false;
89 bool m_firstFrame =
true;
91 std::string m_keyPressedHandlerId;
92 std::string m_keyReleasedHandlerId;
Math::Vector3D translationInput
CameraController(GameObject *object)
virtual void SetDamping(float damping)
void SetPitch(float pitch)
Math::Vector2D GetYawRange() const
bool Initialize() override
Derives initial yaw/pitch from the camera's current facing direction.
virtual float GetDamping() const
void Update(float deltaTime) override
Math::Vector2D GetRollRange() const
virtual void SetMaxSpeed(float maxSpeed)
void SetRollRange(Math::Vector2D range)
virtual float GetAcceleration() const
void SetYawRange(Math::Vector2D range)
void ToggleCursor(bool enable) override
Shows or hides the OS cursor and, typically, toggles relative mouse mode.
FreeLookCameraController(GameObject *object)
void SetPitchRange(Math::Vector2D range)
virtual float GetSpeed() const
void SetEnabled(bool enabled) override
Toggles relative mouse mode and, when re-enabling, resets velocity and re-syncs yaw/pitch.
virtual void SetAcceleration(float acceleration)
virtual Math::Vector3D GetVelocity() const
Math::Vector3D GetTranslationInput() const
Math::Vector2D GetPitchRange() const
void SetInvertY(bool invert)
virtual void SetSpeed(float speed)
virtual float GetMaxSpeed() const
Root namespace for everything the engine exposes.