first commit
This commit is contained in:
10
src/game/ecs/component/physics/component_physics.c
Normal file
10
src/game/ecs/component/physics/component_physics.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "component_physics.h"
|
||||
|
||||
void
|
||||
component_physics_tick(ComponentPhysics* self, ECS* ecs)
|
||||
{
|
||||
glm_vec3_add(self->velocity, self->position, self->position);
|
||||
|
||||
if (keyboard_held(&ecs->input->keyboard, KEYBOARD_KEY_D))
|
||||
self->position[0] += 1.0f;
|
||||
}
|
Reference in New Issue
Block a user