diff --git a/core/entity.jai b/core/entity.jai index 5b9f20f..63a2e6c 100644 --- a/core/entity.jai +++ b/core/entity.jai @@ -76,6 +76,8 @@ MAX_CHILDREN :: 16; dynamic_friction: float; restitution: float; + collider_color: Color; + lock: Physics_Lock; offset: Vector3; diff --git a/core/mesh_entity.jai b/core/mesh_entity.jai index 9048314..36f2c13 100644 --- a/core/mesh_entity.jai +++ b/core/mesh_entity.jai @@ -7,13 +7,11 @@ Mesh_Entity :: struct { } init_entity :: (e: *Mesh_Entity) { - log_error("Missing collision on Mesh Entities\n"); - assert(false); if e.model_path.count > 0 { load_model_into_entity(e, get_or_load_model(e.model_path)); - //e.flags |= .COLLISION | .STATIC; - //e.collider.type = .MESH; - //e.collider.bake_mode = .FULL_MESH; + e.flags |= .PHYSICS; + e.physics.type = .BOX; + e.physics.box.half_extent = .{0.5,0.5,0.5}; } } @@ -37,7 +35,7 @@ mesh_entity_visitor :: (info : *File_Visit_Info, files: *[..] Mesh_Entity_Info) } find_all_mesh_entities :: () { - path := "../assets/models/level_design/"; + path := "../assets/models/level_design"; visit_files(path, true, *mesh_entity_files, mesh_entity_visitor); }