The While Colliding behavior will trigger an event repeatedly while your object collides with another specified object. When used with tags, you can check if your object has collided with multiple objects. If you don't specify an Object B to check for a collision, then this behavior will trigger when Object A touches anything in your scene.
This behavior will Trigger an every frame while a collision between the two specified objects is occuring.
By default this is the current object selected. You can change this to any other object in your scene.
Another object in your scene to check the collision against. If Object B is left blank then the behavior will trigger when Object A touches anything else in your scene.
This is the specific location where the collision is happening on Object B along the X axis.
This is the specific location where the collision is happening on Object B along the Y axis.
This outputs the impulse of the force when Object A has collided with Object B.
|Object A ID||
This outputs the Object ID of Object A.
|Object B ID||
This outputs the Object ID of Object B.
This behavior can be used ff you want a health bar to increase while your character touches a health pack. To do this, you would add a While Colliding behavior to your character then set the health pack to be Object B. Finally connect a "Add to Health Bar" to the while colliding. If there are many health packs in your scene, then it probably makes more sense to tag the coins, and use the tag instead of the specific Object B.