Sticky Parts

Sometimes you may need to have a controllable method of sticking one part to another. A couple of examples where this would be useful is for a gripper arm that needs to pick something up, or if you were simulating a gecko like sticky pad on the feet of an animal or robot. In the case of the gripper, if you try and build a regular gripper and just use force to try and hold the object you will quickly find out that no matter how high you set the friction the object you are trying to hold onto will slowly slip out of the arms grasp. In order to more realistically simulate this you really need some way to stick the parts together as needed, and then un-stick them later. Controllable stickiness! In the case of the gecko simulation you could then use this to allow your simulated organism walk on walls and upside down. When it makes the correct motion it detaches its sticky foot from the wall and can move it to its next position. 

Sticky parts gives you this type of controllable ability to stick different parts of the simulation together and then release them. Any contact sensor can be turned into a sticky part by setting its "Is Sticky Part" flag to true. That part then has two new target data types that control when the stickiness is turned on or off. You can use these data types in adapters so you can control the stickiness via neural activation. The first is StickyOn. When StickyOn is applied to a contact sensor that is also a sticky part , and its value is greater than 0.5, then it will turn on the stickiness. Any other items in the simulation it comes into contact with while sticky mode is on will stick to that part. Internally, this is done by dynamically adding a joint constraint between the two contacting bodies. This forces them to be linked. So if you had your sticky part on the pad of a gripper and it comes into contact with a small object while sticky on is set, then that ball will be picked up by the gripper and stay that way until sticky mode is turned off. Sticky mode is like a binary switch. Once it is enabled it will stay on until it is disabled. You can disable it using the other data type related to stickiness, StickyOff. When StickyOff is applied to a contact sensor that is also a sticky part , and its value is greater than 0.5, then it will turn off the stickiness. This is how the sticky mode is disabled.