From 9e7012995249281b041d55607e7e7408857aa8c4 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Fri, 12 Jun 2020 21:33:38 +0300 Subject: Cloth: allow forces to act parallel to cloth. Currently all force effectors can only act on cloth when the force is perpendicular to the surface. This makes sense for wind, but not for other forces; and the user may want even wind to have some friction. This changes effector code to output two force vectors - although you of course can pass the same pointer for both. The force is split between the two outputs based on a new per-effector setting. Differential Revision: https://developer.blender.org/D8017 --- source/blender/blenkernel/intern/dynamicpaint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/dynamicpaint.c') diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index dae8a59fe43..2e1fa519284 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -5112,7 +5112,7 @@ static void dynamic_paint_prepare_effect_cb(void *__restrict userdata, EffectedPoint epoint; pd_point_from_loc(scene, realCoord[bData->s_pos[index]].v, vel, index, &epoint); epoint.vel_to_sec = 1.0f; - BKE_effectors_apply(effectors, NULL, surface->effector_weights, &epoint, forc, NULL); + BKE_effectors_apply(effectors, NULL, surface->effector_weights, &epoint, forc, NULL, NULL); } /* if global gravity is enabled, add it too */ -- cgit v1.2.3