Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanne Karhu <jhkarh@gmail.com>2011-03-29 16:50:43 +0400
committerJanne Karhu <jhkarh@gmail.com>2011-03-29 16:50:43 +0400
commit74e044065b35e5444871f8f5836b221144588082 (patch)
treecaf0265fc2c14dbc462782b9ea28fc6f7249bff7 /source/blender
parente4ef822ecdb1e642012c19fa82cf5a2f796ee0f3 (diff)
Fix for [#26665] Force field absorption does not work
* Old bug fix led to all kinds of wrong behavior with "plane" shaped effectors, now things are working properly again.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/effect.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index 216dffc1e4a..9cca5ae4982 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -687,13 +687,16 @@ int get_effector_data(EffectorCache *eff, EffectorData *efd, EffectedPoint *poin
/* use z-axis as normal*/
normalize_v3_v3(efd->nor, ob->obmat[2]);
- /* for vortex the shape chooses between old / new force */
if(eff->pd && eff->pd->shape == PFIELD_SHAPE_PLANE) {
- /* efd->loc is closes point on effector xy-plane */
float temp[3], translate[3];
sub_v3_v3v3(temp, point->loc, ob->obmat[3]);
project_v3_v3v3(translate, temp, efd->nor);
- add_v3_v3v3(efd->loc, ob->obmat[3], translate);
+
+ /* for vortex the shape chooses between old / new force */
+ if(eff->pd->forcefield == PFIELD_VORTEX)
+ add_v3_v3v3(efd->loc, ob->obmat[3], translate);
+ else /* normally efd->loc is closest point on effector xy-plane */
+ sub_v3_v3v3(efd->loc, point->loc, translate);
}
else {
VECCOPY(efd->loc, ob->obmat[3]);