Because the group forms a circular arrangement, we specify D as the distance between the user and the group center minus the group radius, i.e. the distance between the user and the outside of the circle. We start in the Idle state. If D is smaller than the Gaze Distance, the group changes to the Gazing state.
Because the group forms a circular arrangement, we specify D as the distance between the user and the group center minus the group radius, i.e. the distance between the user and the perimeter of the circle. We start in the Idle state. If D is smaller than the Gaze Distance, the group changes to the gazing state.
### Gazing
The two Agents closest to the user add the user to their gazing pattern. If the distance increases again to D > _GazeDistance_ + R/3, we go back to the Idle state. To not jump around sates R/3 was added (R = Group Radius). If the Distance decreases further to D < _JoinDistance_ and if the user is oriented towards the group center, a join is detected and the state changes to In Group.
The two Agents closest to the user add the user to their gazing pattern. If the distance increases again to D > _GazeDistance_ + R/3, we go back to the Idle state. To not jump around sates, R/3 was added (R = Group Radius). If the Distance decreases further to D < _JoinDistance_ and if the user is oriented towards the group center, a join is detected and the state changes to In Group.
### In Group
If the user is in the group, he is added to the agents gazing pattern. If the distance to the group center increases to D > _JoinDistance_+ _StillStandingVariance_ and if the user is not oriented to the group center anymore, a leave is detected and the state is changed accordingly.
...
...
@@ -70,6 +70,11 @@ The Leaving states, ensures, that the user needs to increase his distance to D >
## Useful Functions
*``AddAgent()``
*``RemoveAgent()``
*``StartDialogue()``
The VHSocialGroups component introduces the following functions:
*``JoinGroup(ASocialGroup SG)`` Makes the agent walk towards the given Social Group. If close enough, the agent will join the group.
*``LeaveGroup()`` Removes the agent from its current Social Group. After this call a movement call should follow, otherwise, the agent will not move away from the group.
The Social Group actor introduces the following functions:
*``StartDialogue()`` If the dialogue did not start with begin play, because bStartDialogue was turned of, use this function to start the dialogue, at a later point in time.
*``JoinGroup(AVirtualHuman* VH)`` Makes the given agent walk towards the Social Group. If close enough, the agetn will join the group.
*``LeaveGroup(AVirtualHuman* VH)`` Removes the given agent from the Social Group. After this call a movement call should follow, otherwise, the agent will not move away from the group.