Removed crash, when fbx has no material. Added rotation + offset to physx boxes

This commit is contained in:
2025-07-18 16:55:31 +02:00
parent 602dd870df
commit 1b339f087b
4 changed files with 59 additions and 33 deletions

View File

@@ -162,6 +162,11 @@ get_node_world_position :: (e: *Entity, node_name: string) -> Vector3 {
}
load_model_into_entity :: (e: *Entity, handle: Model_Handle) {
if handle == 0 {
log_error("MODEL: Attempted to load model into entity of type %, but the model handle is zero. This probably means that the model has not been loaded properly.\n", e.type);
return;
}
model := get_model_by_handle(handle);
e.renderable.type = .MODEL;