+ int len_f = 0,
+ len_b = 0;
+
+ len_f = rb_sphere_scene( rbf, &world.rb_geo, manifold );
+ rb_manifold_filter_coplanar( manifold, len_f, 0.05f );
+ if( len_f > 1 )
+ {
+ rb_manifold_filter_backface( manifold, len_f );
+ 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 );
+
+ rb_ct *man_b = &manifold[len_f];
+ len_b = rb_sphere_scene( rbb, &world.rb_geo, man_b );
+ rb_manifold_filter_coplanar( man_b, len_b, 0.05f );
+ if( len_b > 1 )
+ {
+ rb_manifold_filter_backface( man_b, len_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 len = len_f+len_b;
+
+ player_grind();
+
+ boxf bax;
+ v3_sub( phys->rb.co, (v3f){2.0f,2.0f,2.0f}, bax[0] );
+ v3_add( phys->rb.co, (v3f){2.0f,2.0f,2.0f}, bax[1] );
+
+ /*
+ * Preprocess collision points, and create a surface picture.
+ * we want contacts that are within our 'capsule's internal line to be
+ * clamped so that they face the line and do not oppose, to stop the
+ * player hanging up on stuff
+ */
+ for( int i=0; i<len; i++ )
+ {
+ v3f dfront, dback;
+ v3_sub( manifold[i].co, rbf->co, dfront );
+ v3_sub( manifold[i].co, rbb->co, dback );