2
$\begingroup$

How can I activate Dynamic option for rigid body objects based on their distance from a certain object?

I know that there is a deactivated start thing that turns on physics by proximity with a collider, but when there are lots of objects close to each other, there is chain reaction and all of them get simultaneously activated. I want to activate only those that are close to a particular object.

I've tryed drivers and animation nodes but I get stuck with the same problem. When the collision object comes to the rigid bodies and the distance variable reaches 0, dynamic option activates, but then rigid body, lets say, falls and distance grows up and dynamic option turns off.

How can I preserve this state of activation? The problem with animation nodes is that loop iterations are not cumulative and start all over again with each frame.

If it's possible with drivers, its also a nice option. But I found scripted expressions somewhat limited with only if else statement. enter image description here

EDIT Thanks everyone for answers. I also found this useful tutorial that does pretty much what HariSreedhar proposed. Using splines + falloffs solve the problem. https://www.youtube.com/watch?v=pEd0NuiMG3E&ab_channel=BlueFoxCreation

$\endgroup$
1
2
$\begingroup$

As Chris mentioned you can just use Y distance in your case.

You can also try spline falloff for bit more control:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thank you. It works. $\endgroup$
    – Graaa3
    Aug 9 at 17:31
1
$\begingroup$

instead of using distance, just subtract the y locations. Then compare this to a fix value e.g. 2.

$\endgroup$

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.