async def broadcast_avatar_position(room_channel_name, channel_name, json_data):
    "\n    Sends the new avatar's position to the users of the room.\n    "
    type = json_data['type']
    payload = json_data['payload']
    position = payload['position']
    animate = payload['animate']
    participant = (await sync_to_async(get_participant)(room_channel_name, channel_name))
    participant_id = (await sync_to_async(get_participant_id)(participant))

    def set_participant_position():
        participant.x = position['x']
        participant.y = position['y']
        participant.direction_x = position['directionX']
        participant.save()
    (await sync_to_async(set_participant_position)())
    (await channel_layer.group_send(room_channel_name, {'type': type, 'payload': {'participant_id': participant_id, 'position': position, 'animate': animate}}))
Sends the new avatar's position to the users of the room.
async def broadcast_avatar_position(room_channel_name, channel_name, json_data):
    "\n    \n    "
    type = json_data['type']
    payload = json_data['payload']
    position = payload['position']
    animate = payload['animate']
    participant = (await sync_to_async(get_participant)(room_channel_name, channel_name))
    participant_id = (await sync_to_async(get_participant_id)(participant))

    def set_participant_position():
        participant.x = position['x']
        participant.y = position['y']
        participant.direction_x = position['directionX']
        participant.save()
    (await sync_to_async(set_participant_position)())
    (await channel_layer.group_send(room_channel_name, {'type': type, 'payload': {'participant_id': participant_id, 'position': position, 'animate': animate}}))