world_instance *world = world_current_instance();
int len = 0;
- len = rb_sphere__scene( mtx, sphere, NULL, &world->rb_geo.inf.scene, man );
+ len = rb_sphere__scene( mtx, sphere, NULL, &world->rb_geo.inf.scene, man,
+ k_material_flag_walking );
- for( int i=0; i<len; i++ )
- {
+ for( int i=0; i<len; i++ ){
man[i].rba = &player->rb;
man[i].rbb = NULL;
}
rb_manifold_filter_coplanar( man, len, 0.03f );
- if( len > 1 )
- {
+ if( len > 1 ){
rb_manifold_filter_backface( man, len );
rb_manifold_filter_joint_edges( man, len, 0.03f );
rb_manifold_filter_pairs( man, len, 0.03f );
float scan_radius = k_board_radius;
scan_radius *= vg_clampf( t, 0.02f, 1.0f );
- int idx = spherecast_world(trace_world, co0, co1, scan_radius, &t1, n);
+ int idx = spherecast_world( trace_world, co0, co1, scan_radius, &t1, n,
+ k_material_flag_walking );
if( idx != -1 ){
v3f co;
v3_lerp( co0, co1, t1, co );
v3f n;
int idx = spherecast_world( world0, co0,co1,
- k_board_radius*0.1f, &t1, n);
+ k_board_radius*0.1f, &t1, n,
+ k_material_flag_walking );
if( idx != -1 ){
goto invalidated_grind;
}
v3_muladds( left, player->rb.to_world[1], k_board_radius, left );
ray_l.dist = 2.1f * k_board_radius;
- res_l = ray_world( world, left, dir, &ray_l );
+ res_l = ray_world( world, left, dir, &ray_l, k_material_flag_walking );
if( res_l )
break;
v3_muladds( right, player->rb.to_world[1], k_board_radius, right );
ray_r.dist = 2.1f * k_board_radius;
- res_r = ray_world( world, right, dir, &ray_r );
+ res_r = ray_world( world, right, dir, &ray_r, k_material_flag_walking );
if( res_r )
break;
v3_muls( dir, 1.0f/ray.dist, dir );
ray.dist -= 0.025f;
- if( ray_world( world_current_instance(), origin, dir, &ray ) )
+ if( ray_world( world_current_instance(), origin, dir, &ray,
+ k_material_flag_walking ) )
return 0;
return 1;
v3f n;
float cast_radius = wheels[i].radius - k_penetration_slop * 2.0f;
- if( spherecast_world( world, current, future, cast_radius, &t, n ) != -1)
+ if( spherecast_world( world, current, future, cast_radius, &t, n,
+ k_material_flag_walking ) != -1)
max_time = vg_minf( max_time, t * s->substep );
}
float t;
v3f n;
if( (v3_dist2( head_wp0, head_wp1 ) > 0.001f) &&
- (spherecast_world( world, head_wp0, head_wp1, 0.2f, &t, n ) != -1) )
+ (spherecast_world( world, head_wp0, head_wp1, 0.2f, &t, n,
+ k_material_flag_walking ) != -1) )
{
v3_lerp( start_co, player->rb.co, t, player->rb.co );
rb_update_transform( &player->rb );
rb_ct *cman = &manifold[manifold_len];
int l = rb_capsule__scene( mtx, &capsule, NULL, &world->rb_geo.inf.scene,
- cman );
+ cman, k_material_flag_walking );
/* weld joints */
for( int i=0; i<l; i ++ )