+ if( has_target )
+ {
+ float angle = v3_dot( phys->rb.up, target_normal );
+ v3f axis;
+ v3_cross( phys->rb.up, target_normal, axis );
+
+ limiter = vg_minf( 5.0f, time_to_impact )/5.0f;
+ limiter = 1.0f-limiter;
+ limiter *= limiter;
+ limiter = 1.0f-limiter;
+
+ if( fabsf(angle) < 0.99f )
+ {
+ v4f correction;
+ q_axis_angle( correction, axis,
+ acosf(angle)*(1.0f-limiter)*3.0f*VG_TIMESTEP_FIXED );
+ q_mul( correction, phys->rb.q, phys->rb.q );
+ }
+ }
+