scale route markers correctly on custom meshes
authorhgn <hgodden00@gmail.com>
Tue, 28 Nov 2023 11:17:57 +0000 (11:17 +0000)
committerhgn <hgodden00@gmail.com>
Tue, 28 Nov 2023 11:17:57 +0000 (11:17 +0000)
world_routes.c

index fbd335ef5d88b622cee6cd0b49fd5d771429577a..2fe52a66367e61c76441c31b01295f64ada2610b 100644 (file)
@@ -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] );