mesh entity fix

This commit is contained in:
2025-07-23 23:35:35 +02:00
parent 99827fce44
commit 9f9189e60e
2 changed files with 6 additions and 6 deletions

View File

@@ -76,6 +76,8 @@ MAX_CHILDREN :: 16;
dynamic_friction: float; dynamic_friction: float;
restitution: float; restitution: float;
collider_color: Color;
lock: Physics_Lock; lock: Physics_Lock;
offset: Vector3; offset: Vector3;

View File

@@ -7,13 +7,11 @@ Mesh_Entity :: struct {
} }
init_entity :: (e: *Mesh_Entity) { init_entity :: (e: *Mesh_Entity) {
log_error("Missing collision on Mesh Entities\n");
assert(false);
if e.model_path.count > 0 { if e.model_path.count > 0 {
load_model_into_entity(e, get_or_load_model(e.model_path)); load_model_into_entity(e, get_or_load_model(e.model_path));
//e.flags |= .COLLISION | .STATIC; e.flags |= .PHYSICS;
//e.collider.type = .MESH; e.physics.type = .BOX;
//e.collider.bake_mode = .FULL_MESH; 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 :: () { find_all_mesh_entities :: () {
path := "../assets/models/level_design/"; path := "../assets/models/level_design";
visit_files(path, true, *mesh_entity_files, mesh_entity_visitor); visit_files(path, true, *mesh_entity_files, mesh_entity_visitor);
} }