201016 Live Kangaroo Manipulation.gh (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.