Physics improvements

This commit is contained in:
2025-03-29 00:18:27 +01:00
parent b6b1371af5
commit 7428ee7fed
3 changed files with 53 additions and 22 deletions

View File

@@ -9,6 +9,9 @@ Mesh_Entity :: struct {
init_entity :: (e: *Mesh_Entity) {
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;
}
}
@@ -19,8 +22,8 @@ Mesh_Entity_Info :: struct {
}
mesh_entity_visitor :: (info : *File_Visit_Info, files: *[..] Mesh_Entity_Info) {
if info.is_directory
return;
if info.is_directory return;
path, basename, ext := path_decomp (info.full_name);
// Entity text files
@@ -35,8 +38,4 @@ find_all_mesh_entities :: () {
path := "../assets/models/level_design/";
visit_files(path, true, *mesh_entity_files, mesh_entity_visitor);
for mesh_entity_files {
print(it.full_path);
}
}