Add render system

This commit is contained in:
Hugo Mårdbrink 2025-08-24 22:51:30 +02:00 committed by Hugo Mårdbrink
parent af76df6a81
commit 29e7b5e499
8 changed files with 395 additions and 330 deletions

View file

@ -1,27 +1,9 @@
package ecs
Vec3 :: distinct [3]f32
Gravity :: struct {
force: Vec3
}
RigidBody :: struct {
velocity: Vec3,
acceleration: Vec3,
}
Transform :: struct {
position: Vec3,
rotation: Vec3,
scale: Vec3,
}
PhysicsSystem :: struct {
using base: SystemBase,
}
physics_system_update :: proc(physics_system: ^PhysicsSystem, coordinator: ^Coordinator, dt: f32) {
for entity in physics_system.entities {
rigid_body := coordinator_get_component(RigidBody, coordinator, entity)