q_mulv( player->gate_waiting->q[1], (v3f){0.0f,0.0f,1.0f}, plane );
plane[3] = v3_dot( plane, player->gate_waiting->co[1] );
+ f32 pol = v3_dot( player->cam.pos, plane ) - plane[3];
+
/* check camera polarity */
- if( v3_dot( player->cam.pos, plane ) < plane[3] ) {
+ if( (pol < 0.0f) || (pol > 5.0f) ) {
vg_success( "Plane cleared\n" );
player_apply_transport_to_cam( player->gate_waiting->transport );
player->gate_waiting = NULL;
v3_muladds( tpv_offset, cc->cam_velocity_smooth, -0.025f, tpv_offset );
v3_add( tpv_origin, tpv_offset, tpv_pos );
+#if 0
f32 t; v3f n;
if( spherecast_world( world_current_instance(), tpv_origin, tpv_pos,
0.2f, &t, n ) != -1 ){
v3_lerp( tpv_origin, tpv_pos, t, tpv_pos );
}
+#endif
/*
* Blend cameras