Live manipulation of kangaroo rigid body simulations with Fologram

201016 Live Kangaroo (22.4 KB)

@mathias, here is a definition that manipulates kangaroo rigid bodies in mixed reality using press and drag gestures. I’ve tested on my mobile phone (you need to go to the Fologram for Mobile settings and enable cursor interaction and near interaction) but the same definition should also work on the HoloLens.

It works by dynamically assigning target point locations and weights to the kangaroo Anchor goal. By default the weights for all anchors are zero, effectively meaning there is no anchoring and points are free to move around. When you perform the press gesture, the nearest point in the current state of the kangaroo simulation is found, and the weight of this point in the anchor goal is set to 1000. Then while dragging, the location of the target point for the point that is being dragged is updated.

It seems to work OK with manipulating the three simple rigid bodies in your definition from the forum, but please give it a go and let me know if you have difficulty extending the logic to other definitions.

Thanks @Gwyll!
This is looking great and works through the anchor point constraint, which has the benefit of having the target input.

The definition that I am using now is based on Daniel’s idea. There is a strange display glitch that hides the link to the definition under the video on the forum.
This approach uses the beam constraint, which could also have a target added to it in order to make it work.

BlueWhale.3dm (2.1 MB) wobblywhale edit (113.0 KB)

Hey @mathias

Yeah I couldn’t find that hidden definition (I didn’t spend a long time looking though) thanks for sending this through. It is much more fun to play with the actual whale!

I’ve patched the Fologram interactivity into this new kangaroo definition. This is a really simple copy paste job so I have included a few notes for how to do this in case you want to try it out with other definitions:

201019 Live Kangaroo Beam (128.9 KB)

Would you mind if I post a little video to instagram?

Amazing, thanks! Will report back as soon as I get my license issue sorted.

Yes, please post and tag me… More coming on this account soon:

OK, I get it know, thanks for the clear explanation.

You are essentially adding Target Anchor constraints to all existing points in the simulation. As Kangaroo treats coincident points as linked this effectively adds a target function to every other constraint present.

Then the target point strenght parameter is used as a switch. We start with all points at strength 0. Once a point is pressed and dragged the strength is set to 1000 to make it active. On release every Target Anchor is back to strenght 0 allowing the simulation to continue as normal.


Yep you got it. It’s not the most elegant solution but it works!