* Depenetrate
*/
v3f dt;
- v3_zero( dt );
- for( int j=0; j<8; j++ )
- {
- for( int i=0; i<len; i++ )
- {
- struct contact *ct = &manifold[i];
-
- float resolved_amt = v3_dot( ct->n, dt ),
- remaining = (ct->p-k_penetration_slop) - resolved_amt,
- apply = vg_maxf( remaining, 0.0f ) * 0.3f;
-
- v3_muladds( dt, ct->n, apply, dt );
- }
- }
+ rb_depenetrate( manifold, len, dt );
v3_add( dt, player->rb.co, player->rb.co );
/* TODO: Stepping......