4#ifndef TRAM_SDK_COMPONENTS_CONTROLLERCOMPONENT_H
5#define TRAM_SDK_COMPONENTS_CONTROLLERCOMPONENT_H
13class PhysicsComponent;
14class TriggerComponent;
46 wallbonk_callback = callback;
99 template <
typename>
friend class Pool;
Wrapper for an EntityComponent pointer.
Definition: entitycomponent.h:53
Definition: controller.h:16
vec3 velocity
Definition: controller.h:69
void TurnLeft()
Definition: controller.cpp:64
bool running
Definition: controller.h:89
void Jump()
Definition: controller.cpp:57
void SetWalkSpeed(float walk_speed)
Definition: controller.h:49
void TurnRight()
Definition: controller.cpp:68
void SetFriction(float friction)
Definition: controller.h:52
void Move(vec3 local_direction)
Definition: controller.cpp:45
void SetRunSpeed(float run_speed)
Definition: controller.h:50
Component< TriggerComponent > walk_collision
Definition: controller.h:60
float collision_width
Definition: controller.h:75
id_t standing_on
Definition: controller.h:91
float collision_height
Definition: controller.h:76
float friction
Definition: controller.h:86
void SetCollisionSize(float width, float height, float crouch_height)
Definition: controller.h:34
Component< TriggerComponent > crouch_collision
Definition: controller.h:61
void ApplyDynamics()
Definition: controller.cpp:73
vec3 standing_pos
Definition: controller.h:93
void Run()
Definition: controller.cpp:49
vec3 move_direction
Definition: controller.h:70
id_t standing_on_prev
Definition: controller.h:92
float run_speed
Definition: controller.h:83
float walk_speed
Definition: controller.h:82
void SetStepHeight(float height, float crouch_height)
Definition: controller.h:40
bool crouching
Definition: controller.h:88
uint32_t collision_group
Definition: controller.h:95
void Push(vec3 direction)
Definition: controller.cpp:41
float step_height_crouch
Definition: controller.h:80
void SetLookDirection(quat direction)
Definition: controller.h:31
void SetWallCollisionCallback(void(*callback)(ControllerComponent *, Physics::Collision))
Definition: controller.h:45
void EventHandler(Event &event)
Definition: controller.h:19
quat GetLookDirection() const
Definition: controller.h:32
bool is_in_air
Definition: controller.h:73
~ControllerComponent()=default
void Start()
Definition: controller.cpp:15
float step_height
Definition: controller.h:79
void ResetMove()
Definition: controller.cpp:255
float collision_height_crouch
Definition: controller.h:77
quat look_direction
Definition: controller.h:71
void SetCrouchSpeed(float crouch_speed)
Definition: controller.h:51
void Crouch()
Definition: controller.cpp:53
static void Update()
Updates the ControllerComponents.
Definition: controller.cpp:265
ControllerComponent()=default
Component< PhysicsComponent > physics_body
Definition: controller.h:63
void SetCollisionGroup(uint32_t group)
Definition: controller.h:53
float crouch_speed
Definition: controller.h:84
void RecoverFromCollisions()
Definition: controller.cpp:114
Definition: entitycomponent.h:18
@ COLL_PLAYER
Definition: physics.h:30
uint32_t id_t
Definition: core.h:11
glm::vec3 vec3
Definition: math.h:12
glm::quat quat
Definition: math.h:13