projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
physics adjustments
[carveJwlIkooP6JGAAIwe30JlM.git]
/
rigidbody.h
diff --git
a/rigidbody.h
b/rigidbody.h
index 04d5a9c9830c824d466b7c3fb7cff82364556726..480e43fb5d086752fb42d9ec559681d6f1d97442 100644
(file)
--- a/
rigidbody.h
+++ b/
rigidbody.h
@@
-1427,12
+1427,13
@@
next_vert:;
vg_line( tri[1],tri[2],0x10ffffff );
vg_line( tri[2],tri[0],0x10ffffff );
vg_line( tri[1],tri[2],0x10ffffff );
vg_line( tri[2],tri[0],0x10ffffff );
- int hits = rb_sphere_triangle( rba, rbb, tri, buf+count );
+ int contact = rb_sphere_triangle( rba, rbb, tri, buf+count );
+
#ifdef RIGIDBODY_DYNAMIC_MESH_EDGES
#ifdef RIGIDBODY_DYNAMIC_MESH_EDGES
- if(
hits
)
+ if(
contact
)
inf->collided = 1;
#endif
inf->collided = 1;
#endif
- count +=
hits
;
+ count +=
contact
;
if( count == 12 )
{
if( count == 12 )
{
@@
-1475,7
+1476,7
@@
next_vert:;
continue;
rb_ct *ct = buf+count;
continue;
rb_ct *ct = buf+count;
-
+
v3_muls( inf_i->normal, c0, ct->n );
v3_muladds( ct->n, inf_j->normal, c1, ct->n );
v3_normalize( ct->n );
v3_muls( inf_i->normal, c0, ct->n );
v3_muladds( ct->n, inf_j->normal, c1, ct->n );
v3_normalize( ct->n );