Implementation of a simple character controller.
More...
#include <components/controller.h>
|
| Component< TriggerComponent > | wall_collision |
| |
| vec3 | move_magnitude = {0.0f, 0.0f, 0.0f} |
| |
| vec3 | move_direction = {0.0f, 0.0f, 0.0f} |
| |
| vec3 | air_velocity = {0.0f, 0.0f, 0.0f} |
| |
| bool | enabled = false |
| |
| bool | is_in_air = false |
| |
| float | collision_width = 0.35f |
| |
| float | collision_height = 1.85f |
| |
| float | step_height = 0.35f |
| |
| float | walk_speed = 0.1f |
| |
| float | run_speed = 0.2f |
| |
| float | crouch_speed = 0.05f |
| |
| float | fly_speed = 0.2f |
| |
| bool | crouching = false |
| |
| bool | running = false |
| |
| bool | flying = false |
| |
| int | jump_frames = 0 |
| |
| id_t | standing_on = 0 |
| |
| id_t | standing_on_prev = 0 |
| |
| vec3 | standing_pos |
| |
| uint32_t | collision_group = Physics::COLL_PLAYER |
| |
| void(* | wallbonk_callback )(ControllerComponent *, Physics::Collision) = nullptr |
| |
| quat | look_direction = {1.0f, 0.0f, 0.0f, 0.0f} |
| |
| bool | collide = true |
| |
| size_t | resources_waiting = 0 |
| |
| bool | is_ready = false |
| |
| bool | is_init = false |
| |
| Entity * | parent = nullptr |
| |
Implementation of a simple character controller.
- See also
- ControllerComponent
◆ RaycastControllerComponent()
| tram::RaycastControllerComponent::RaycastControllerComponent |
( |
| ) |
|
|
protecteddefault |
◆ ~RaycastControllerComponent()
| tram::RaycastControllerComponent::~RaycastControllerComponent |
( |
| ) |
|
|
protecteddefault |
◆ ApplyDynamics()
| void tram::RaycastControllerComponent::ApplyDynamics |
( |
| ) |
|
|
protected |
◆ Crouch()
| void tram::RaycastControllerComponent::Crouch |
( |
| ) |
|
|
overridevirtual |
◆ EventHandler()
| void tram::RaycastControllerComponent::EventHandler |
( |
Event & |
event | ) |
|
|
inlineoverridevirtual |
◆ Fly()
| void tram::RaycastControllerComponent::Fly |
( |
| ) |
|
|
overridevirtual |
◆ Jump()
| void tram::RaycastControllerComponent::Jump |
( |
| ) |
|
|
overridevirtual |
◆ Move()
| void tram::RaycastControllerComponent::Move |
( |
vec3 |
local_direction | ) |
|
|
overridevirtual |
◆ Push()
| void tram::RaycastControllerComponent::Push |
( |
vec3 |
direction | ) |
|
|
overridevirtual |
◆ RecoverFromCollisions()
| void tram::RaycastControllerComponent::RecoverFromCollisions |
( |
| ) |
|
|
protected |
◆ ResetMove()
| void tram::RaycastControllerComponent::ResetMove |
( |
| ) |
|
|
protected |
◆ Run()
| void tram::RaycastControllerComponent::Run |
( |
| ) |
|
|
overridevirtual |
◆ SetCollisionGroup()
| void tram::RaycastControllerComponent::SetCollisionGroup |
( |
uint32_t |
group | ) |
|
|
inline |
◆ SetCollisionSize()
| void tram::RaycastControllerComponent::SetCollisionSize |
( |
float |
width, |
|
|
float |
height, |
|
|
float |
crouch_height |
|
) |
| |
|
inline |
◆ SetCrouchSpeed()
| void tram::RaycastControllerComponent::SetCrouchSpeed |
( |
float |
speed | ) |
|
|
inline |
◆ SetFlySpeed()
| void tram::RaycastControllerComponent::SetFlySpeed |
( |
float |
speed | ) |
|
|
inline |
◆ SetFriction()
| void tram::RaycastControllerComponent::SetFriction |
( |
float |
speed | ) |
|
|
inline |
◆ SetRunSpeed()
| void tram::RaycastControllerComponent::SetRunSpeed |
( |
float |
speed | ) |
|
|
inline |
◆ SetStepHeight()
| void tram::RaycastControllerComponent::SetStepHeight |
( |
float |
height, |
|
|
float |
crouch_height |
|
) |
| |
|
inline |
◆ SetWalkSpeed()
| void tram::RaycastControllerComponent::SetWalkSpeed |
( |
float |
speed | ) |
|
|
inline |
◆ SetWallCollisionCallback()
◆ Start()
| void tram::RaycastControllerComponent::Start |
( |
| ) |
|
|
overridevirtual |
◆ TurnLeft()
| void tram::RaycastControllerComponent::TurnLeft |
( |
| ) |
|
|
overridevirtual |
◆ TurnRight()
| void tram::RaycastControllerComponent::TurnRight |
( |
| ) |
|
|
overridevirtual |
◆ ControllerComponent
◆ Pool
◆ air_velocity
| vec3 tram::RaycastControllerComponent::air_velocity = {0.0f, 0.0f, 0.0f} |
|
protected |
◆ collision_group
◆ collision_height
| float tram::RaycastControllerComponent::collision_height = 1.85f |
|
protected |
◆ collision_width
| float tram::RaycastControllerComponent::collision_width = 0.35f |
|
protected |
◆ crouch_speed
| float tram::RaycastControllerComponent::crouch_speed = 0.05f |
|
protected |
◆ crouching
| bool tram::RaycastControllerComponent::crouching = false |
|
protected |
◆ enabled
| bool tram::RaycastControllerComponent::enabled = false |
|
protected |
◆ fly_speed
| float tram::RaycastControllerComponent::fly_speed = 0.2f |
|
protected |
◆ flying
| bool tram::RaycastControllerComponent::flying = false |
|
protected |
◆ is_in_air
| bool tram::RaycastControllerComponent::is_in_air = false |
|
protected |
◆ jump_frames
| int tram::RaycastControllerComponent::jump_frames = 0 |
|
protected |
◆ move_direction
| vec3 tram::RaycastControllerComponent::move_direction = {0.0f, 0.0f, 0.0f} |
|
protected |
◆ move_magnitude
| vec3 tram::RaycastControllerComponent::move_magnitude = {0.0f, 0.0f, 0.0f} |
|
protected |
◆ run_speed
| float tram::RaycastControllerComponent::run_speed = 0.2f |
|
protected |
◆ running
| bool tram::RaycastControllerComponent::running = false |
|
protected |
◆ standing_on
| id_t tram::RaycastControllerComponent::standing_on = 0 |
|
protected |
◆ standing_on_prev
| id_t tram::RaycastControllerComponent::standing_on_prev = 0 |
|
protected |
◆ standing_pos
| vec3 tram::RaycastControllerComponent::standing_pos |
|
protected |
◆ step_height
| float tram::RaycastControllerComponent::step_height = 0.35f |
|
protected |
◆ walk_speed
| float tram::RaycastControllerComponent::walk_speed = 0.1f |
|
protected |
◆ wall_collision
◆ wallbonk_callback
The documentation for this class was generated from the following files:
- C:/Users/Poga/Desktop/painis/tram-sdk/src/components/controller.h
- C:/Users/Poga/Desktop/painis/tram-sdk/src/components/controller.cpp