rb_manifold_filter_joint_edges( manifold, len_f, 0.05f );
rb_manifold_filter_pairs( manifold, len_f, 0.05f );
}
- len_f = rb_manifold_apply_filtered( manifold, len_f );
+ int new_len_f = rb_manifold_apply_filtered( manifold, len_f );
+ if( len_f && !new_len_f )
+ len_f = 1;
+ else
+ len_f = new_len_f;
rb_ct *man_b = &manifold[len_f];
len_b = rb_sphere_scene( rbb, &world.rb_geo, man_b );
rb_manifold_filter_joint_edges( man_b, len_b, 0.05f );
rb_manifold_filter_pairs( man_b, len_b, 0.05f );
}
- len_b = rb_manifold_apply_filtered( man_b, len_b );
-
+ int new_len_b = rb_manifold_apply_filtered( man_b, len_b );
+ if( len_b && !new_len_b )
+ len_b = 1;
+ else
+ len_b = new_len_b;
#if 0
/*
* Preprocess collision points, and create a surface picture.
* components.
*/
- float wy = v3_dot( phys->rb.up, impulse ),
- wx = v3_dot( phys->rb.right, impulse )*1.8f;
+ float wy = v3_dot( phys->rb.up, impulse ) * 0.8f,
+ wx = v3_dot( phys->rb.right, impulse )*1.0f;
v3_muladds( phys->rb.w, phys->rb.up, wy, phys->rb.w );
v3_muladds( phys->rb.w, phys->rb.right, wx, phys->rb.w );
/* Real angular velocity integration */
- v3_lerp( phys->rb.w, (v3f){0.0f,0.0f,0.0f}, 0.125f, phys->rb.w );
+ v3_lerp( phys->rb.w, (v3f){0.0f,0.0f,0.0f}, 0.125f*0.5f, phys->rb.w );
if( v3_length2( phys->rb.w ) > 0.0f )
{
v4f rotation;