From 5f5d02725031cad23f1cab3290b8a9d661c89728 Mon Sep 17 00:00:00 2001 From: hgn Date: Tue, 28 Nov 2023 11:17:57 +0000 Subject: [PATCH] scale route markers correctly on custom meshes --- world_routes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/world_routes.c b/world_routes.c index fbd335e..2fe52a6 100644 --- a/world_routes.c +++ b/world_routes.c @@ -904,7 +904,10 @@ static void render_gate_markers( m4x3f world_mmdl, int run_id, ent_gate *gate ){ for( u32 j=0; j<4; j++ ){ if( gate->routes[j] == run_id ){ m4x3f mmdl; - ent_gate_get_mdl_mtx( gate, mmdl ); + m4x3_copy( gate->to_world, mmdl ); + m3x3_scale( mmdl, (v3f){ gate->dimensions[0], + gate->dimensions[1], 1.0f } ); + m4x3_mul( world_mmdl, mmdl, mmdl ); shader_model_gate_uMdl( mmdl ); mdl_draw_submesh( &world_gates.sm_marker[j] ); -- 2.25.1