Miarmy Crowd Simulation Documentation (English)

Collide Check Channels

Using collide channels, we can detect the bone collision status of agents. The collide channel including:

  • collide
  • collideBy:<Bone Name>
  • collideAt:<Bone Name>
  • riCollide
  • riCollideBy:<Bone Name>
  • riCollideAt:<Bone Name>

Note: The bone will not check collide with terrain, only interactive with them. And the bone also can check collide with kinematic primitive objects, which will be explained in Part 7: Physical Simulation – Kinematic Primitives

Using collide channel we can check the collision status for the bones which marked "feel collide" from the current agent.
If the bones which marked "feel collide" are colliding/overlapping the others RBD, the channel will return 1, otherwise, return 0. Just like the picture below, the "head", "chest", "stomach" and "arms" bones have been marked "feel collide" flag,



Head, chest, stomach, arms have been marked "feel collide" flag


Let's take a look at an example below, for the agent 1, the "collide" channel will return 1 because the "chest" is colliding with the hand of agent 2, whereas,
For the agent 2, the "collide" channel will also return 1 because the bones marked "feel collide" is also collide with the chest of agent 1.



"collide" channel will return 1 from both agent 1 and agent 2


Using "collideBy:<Bone Name>", we can check whether a bone which name is <Bone Name> collide with the bones marked "feel collide" of current agent, for example:
For the agent 1, collideBy:lowerArm will return 1 because the chest bone of current agent is colliding with a bone which name is "lowerArm"
For the agent 1, collideBy:head will return 0 because no matter "chest", "stomach" or "head" is not colliding with the bone which name is head
For the agent 2, collideBy:chest will return 1 because the lowerArm is colliding the chest of agent 1.



collideBy:lowerArm will return 1 for agent 1 and return 0 for agent 2

collideBy:head will return 0 for both agent 1 and agent 2

collidBy:chest will return 1 for agent 2 and return 0 for agent 1

 


Using "collideAt:<Bone Name>", we can check whether the bone name is <Bone Name> from current agent colliding with any else bone from others agents. No matter the bone <Bone Name> whether or not marked "feel collide" flag.
Look at the following example:
For the agent 1, the "collideAt:chest" will return 1 because the chest is colliding with a bone
For the agent 1, the "collideAt:head" will return 0 because the foot is colliding with a bone
For the agent 2, the "collideAt:lowerArm" will return 1 because the lower arm is not collide with a bone



Collide at channels for bones


The "ri" prefix is use to reserve information of collide. The information will contain the collision direction and velocity.

  • riCollide
  • riCollideBy:XXX
  • riCollideAt:XXX

The reserved information contain the approximated collision direction and the relative velocity



The collision info reserved when checking collide


We can apply a pulse force on to it when enable dynamics, with the channel "dynamics.active.force". The force direction will along with the reserved vector and the force strength will be the defuzzed value of the channel.

 

 

 

Basefount Technology