| CPC G06T 13/60 (2013.01) [A24F 40/50 (2020.01); A24F 40/60 (2020.01); G06T 13/40 (2013.01)] | 11 Claims |

|
1. A method of controlling an avatar, performed by an electronic device, the method comprising:
generating an avatar to be associated with a user of the electronic device;
receiving, from an additional device connected to the electronic device, sensing information generated based on one or more sensors in the additional device;
determining a target action of the avatar based on the sensing information; and
controlling the avatar to represent the target action,
wherein the determining of the target action of the avatar comprises:
determining the target action of the avatar to be an action of holding a cigarette in a hand, when the sensing information indicates the additional device is powered on;
determining the target action of the avatar to be an action of putting out or throwing out a cigarette, when the sensing information indicates the additional device is powered off;
determining an amount of inhalation based on inhalation information related to inhalation of the user through the additional device; and
determining the target action of the avatar to be an action of blowing smoke based on the amount of inhalation, when it is determined the user takes the additional device off from his or her mouth,
wherein the amount of inhalation is calculated based on an average flow velocity of an airflow according to an inhalation of the user, a cross-sectional area of a channel through which the airflow passes, and a duration of an inhalation resistance.
|