projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
YEAH
[carveJwlIkooP6JGAAIwe30JlM.git]
/
rigidbody.h
diff --git
a/rigidbody.h
b/rigidbody.h
index fe8197569e689f87d316905f2ce4244b5b351e69..dfacf36c63a3f02ee1b52e543651410988039b2d 100644
(file)
--- a/
rigidbody.h
+++ b/
rigidbody.h
@@
-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 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 );
v3f axis;
v3_cross( rt, ra, axis );