fuck you, you cant put your couch there
[carveJwlIkooP6JGAAIwe30JlM.git] / rigidbody.h
index fe8197569e689f87d316905f2ce4244b5b351e69..dfacf36c63a3f02ee1b52e543651410988039b2d 100644 (file)
@@ -2829,7 +2829,8 @@ VG_STATIC void rb_effect_spring_target_vector( rigidbody *rba, v3f ra, v3f rt,
                                                float spring, float dampening,
                                                float timestep )
 {
-   float a = acosf( vg_clampf( v3_dot( rt, ra ), -1.0f, 1.0f ) );
+   float d = v3_dot( rt, ra );
+   float a = vg_signf( d ) * acosf( vg_clampf( d, -1.0f, 1.0f ) );
 
    v3f axis;
    v3_cross( rt, ra, axis );