2
$\begingroup$

I want to make two rigid bodies attract one another. But I don't want them to attract the other rigid bodies.

In other terms I want in my scene :

  • Rigid Bodies A and B attract one another and get closer and closer.
  • Rigid Bodies C and D attract one another and get closer and closer.
  • But A has no influence at all on C and D.
  • B has no influence at all on C and D.
  • C has no influence at all on A and B.
  • D has no influence at all on A and B.

How coud I achieve this ?

Chears

$\endgroup$
  • $\begingroup$ If you don't have a problem with multiple layers you can put them onto separate layers and then just composite them together. $\endgroup$ – Striar Jul 7 '17 at 19:10
1
$\begingroup$

Forces only have an effect on rigid bodies on the same Layer - so use separate layers for each set of independent objects and forces.

Essentially you need to do the following :

On one layer, create objects A and B. Create a 'Force' force field at the origin of object A (select object A, press Shift-S and select 'Cursor to Selected', then Add/Force Field/Force) and parent it to object A. Create a 'Force' force field at the origin of object B and parent it to object B. Set each of the force fields to a negative strength (eg, -50). You should now find that A and B are drawn towards each other.

Swap to the next layer and repeat for C and D.

Running the animation (with both layers selected) should now result in two pairs of objects attracted to each other but not the other pair.

result

| improve this answer | |
$\endgroup$
  • $\begingroup$ It just works ! Thank you ! Unfortunately 20 layers will not be enough for what I had in mind, but I learnt something new about force fields being limited to their layer only. $\endgroup$ – Maxx Jul 7 '17 at 23:23
  • $\begingroup$ I hope this limitation will disappear with Blender 2.8's new layer system. $\endgroup$ – Maxx Nov 8 '17 at 16:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.