diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-11-03 00:16:41 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-11-03 00:16:41 +0300 |
commit | 09435ec149b499fabb112114bcdd24a9b3dc6cda (patch) | |
tree | 78ca1268596d49c56479a77de91785cc834ee660 /source/blender/blenkernel/BKE_particle.h | |
parent | 130088300bec57aa0f11042bb09e48a67417a514 (diff) |
Oops, particle collisions didn't take simulation subframes into account at all.
* This caused nearly all particles to leak through the collision surface if simulation subframes were used and the collision object was moving.
* In addition to fixing this I also did some more cleanup of the collision code and refined some of the comments.
Diffstat (limited to 'source/blender/blenkernel/BKE_particle.h')
-rw-r--r-- | source/blender/blenkernel/BKE_particle.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index 1416e1280cf..5bcd69865fc 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -171,7 +171,9 @@ typedef struct ParticleCollision float co1[3], co2[3]; // ray start and end points float ve1[3], ve2[3]; // particle velocities float ray_len; // original length of co2-co1, needed for collision time evaluation - float t; // time of previous collision, needed for substracting face velocity + float f; // time factor of previous collision, needed for substracting face velocity + float cfra; // start of the timestep (during frame change, since previous integer frame) + float dfra; // duration of timestep in frames } ParticleCollision; typedef struct ParticleDrawData { |