v3_muladds( player->rb.co, player->rb.to_world[1], 1.0f, s->state.cog );
v3_copy( init_velocity, s->state.cog_v );
v3_copy( init_velocity, player->rb.v );
- v3_copy( init_velocity, player->cam_velocity_smooth );
+ v3_copy( init_velocity, player->cam_control.cam_velocity_smooth );
v3_copy( (v3f){1.0f,0.0f,0.0f}, s->state.trick_euler );
}
if( ray_world( world, pos, ray_dir, ray ) )
{
vg_line( pos, ray->pos, VG__RED );
- vg_line_pt3( ray->pos, 0.025f, VG__BLACK );
+ vg_line_point( ray->pos, 0.025f, VG__BLACK );
sample_count ++;
}
if( ray_world( world, va, v0, &ray ) )
{
vg_line( va, vb, VG__RED );
- vg_line_pt3( ray.pos, 0.1f, VG__RED );
+ vg_line_point( ray.pos, 0.1f, VG__RED );
vg_error( "invalidated\n" );
return 0;
}
if( ray_world( world, vb, v0, &ray ) )
{
vg_line( va, vb, VG__RED );
- vg_line_pt3( ray.pos, 0.1f, VG__RED );
+ vg_line_point( ray.pos, 0.1f, VG__RED );
vg_error( "invalidated\n" );
return 0;
}
m3x3_copy( player->rb.to_world, mtx );
v3_add( player->rb.co, player->basis[1], mtx[3] );
- debug_capsule( mtx, w->collider.radius, w->collider.height, VG__WHITE );
+ vg_line_capsule( mtx, w->collider.radius, w->collider.height, VG__WHITE );
rb_ct manifold[64];
int len;
v3_normalize( surface_avg );
v3f tx, ty;
- rb_tangent_basis( surface_avg, tx, ty );
+ v3_tangent_basis( surface_avg, tx, ty );
if( v2_length2(steer) > 0.001f ){
/* clip movement to the surface */
v3_muladds( player->rb.co, player->rb.v, k_rb_delta, player->rb.co );
v3_add( player->rb.co, player->basis[1], mtx[3] );
- debug_capsule( mtx, w->collider.radius, w->collider.height, VG__GREEN );
+ vg_line_capsule( mtx, w->collider.radius, w->collider.height, VG__GREEN );
/*
* CCD routine
rb_update_transform( &player->rb );
v3_add( player->rb.co, player->basis[1], mtx[3] );
- debug_capsule( mtx, w->collider.radius, w->collider.height, VG__RED );
+ vg_line_capsule( mtx, w->collider.radius, w->collider.height, VG__RED );
}
}
float substep = vg.time_fixed_extrapolate;
v3_muladds( mtx[3], player->rb.v, k_rb_delta*substep, mtx[3] );
- debug_capsule( mtx, w->collider.radius, w->collider.height, VG__YELOW );
+ vg_line_capsule( mtx, w->collider.radius, w->collider.height, VG__YELOW );
/* Calculate header */
q_normalize( player->rb.q );
}
- vg_line_pt3( w->state.drop_in_target, 0.1f, VG__GREEN );
+ vg_line_point( w->state.drop_in_target, 0.1f, VG__GREEN );
v3f p1;
v3_muladds( w->state.drop_in_target, w->state.drop_in_normal, 0.3f, p1 );
vg_line( w->state.drop_in_target, p1, VG__GREEN );
vg_line( w->state.drop_in_target, p1, VG__GREEN );
vg_line( w->state.drop_in_target, w->state.drop_in_foot_anchor, VG__WHITE );
- vg_line_pt3( w->state.drop_in_foot_anchor, 0.08f, VG__PINK );
+ vg_line_point( w->state.drop_in_foot_anchor, 0.08f, VG__PINK );
float a = player_get_heading_yaw( player );