v3_copy( average_normal, inf->n );
v3_copy( average_direction, inf->dir );
- vg_line_pt3( inf->co, 0.02f, VG__GREEN );
+ vg_line_point( inf->co, 0.02f, VG__GREEN );
vg_line_arrow( inf->co, average_direction, 0.3f, VG__GREEN );
vg_line_arrow( inf->co, inf->n, 0.2f, VG__CYAN );
rate = 35.0f;
top = 1.5f;
}
+
+ if( grab < 0.5f ){
+ top *= 1.0f+v3_length( s->state.throw_v )*k_mmthrow_steer;
+ }
}
float current = v3_dot( player->rb.to_world[1], player->rb.w ),
s->state.jump_time = vg.time;
audio_lock();
- audio_oneshot_3d( &audio_jumps[vg_randu32()%2], player->rb.co, 40.0f, 1.0f );
+ audio_oneshot_3d( &audio_jumps[vg_randu32()%2], player->rb.co,40.0f,1.0f);
audio_unlock();
}
}
v3_add( jump->log[jump->log_length-1], jump->n, p1 );
vg_line( jump->log[jump->log_length-1], p1, 0xffffffff );
- vg_line_pt3( jump->apex, 0.02f, 0xffffffff );
+ vg_line_point( jump->apex, 0.02f, 0xffffffff );
}
audio_lock();
s->substep -= s->substep_delta;
rb_ct manifold[128];
- int manifold_len = 0;
-
+ int manifold_len = 0;
/*
* Phase -1: head detection
* --------------------------------------------------------------------------
manifold_len += l;
if( vg_lines.draw )
- debug_capsule( mtx, capsule.radius, capsule.height, VG__WHITE );
+ vg_line_capsule( mtx, capsule.radius, capsule.height, VG__WHITE );
/* add limits */
if( s->state.activity >= k_skate_activity_grind_any ){
v3f world_cog;
m4x3_mulv( player->rb.to_world, s->weight_distribution, world_cog );
- vg_line_pt3( world_cog, 0.02f, VG__BLACK );
+ vg_line_point( world_cog, 0.02f, VG__BLACK );
for( int i=0; i<manifold_len; i ++ ){
rb_prepare_contact( &manifold[i], s->substep_delta );
m4x3f mtx;
m3x3_copy( player->rb.to_world, mtx );
m4x3_mulv( player->rb.to_world, wheels[i].pos, mtx[3] );
- debug_sphere( mtx, wheels[i].radius,
- (u32[]){ VG__WHITE, VG__BLACK,
+ vg_line_sphere( mtx, wheels[i].radius,
+ (u32[]){ VG__WHITE, VG__BLACK,
wheels[i].colour }[ wheels[i].state ]);
}
skate_integrate( player );
- vg_line_pt3( s->state.cog, 0.02f, VG__WHITE );
+ vg_line_point( s->state.cog, 0.02f, VG__WHITE );
ent_gate *gate =
world_intersect_gates(world, player->rb.co, s->state.prev_pos );
}
}
-VG_STATIC void player__skate_im_gui( player_instance *player )
-{
+VG_STATIC void player__skate_im_gui( player_instance *player ){
struct player_skate *s = &player->_skate;
player__debugtext( 1, "V: %5.2f %5.2f %5.2f",player->rb.v[0],
player->rb.v[1],
m4x3_mulv( av->sk.final_mtx[ av->id_head ], head, s->state.head_position );
m4x3_mulv( player->rb.to_local, s->state.head_position,
s->state.head_position );
-
- /* TODO: Extrapolate to_local matrix? */
}
VG_STATIC void player__skate_reset_animator( player_instance *player )