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$
1
  • $\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
    Commented Jul 7, 2017 at 19:10

1 Answer 1

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

$\endgroup$
2
  • $\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
    Commented Jul 7, 2017 at 23:23
  • $\begingroup$ I hope this limitation will disappear with Blender 2.8's new layer system. $\endgroup$
    – Maxx
    Commented Nov 8, 2017 at 16:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .