Virtual object control method and apparatus, computer device, and storage medium
AssigneeTencent Technology (Shenzhen) Company Limited
InventorsXun Hu, Yu Lin Wan, Jianmiao Weng, Shan Dong Su
Life of this patent
Estimating the term…
Abstract
Embodiments of the disclosure disclose a virtual object control method and apparatus, a computer device, and a storage medium. At least two touch positions through which a touch operation passes are determined, and a target touch position determined according to the at least two touch positions is comprehensively considered, thereby avoiding a case in which an aiming direction is determined based on an inaccurate last touch position generated due to an erroneous operation of a user.
Claims20
A method of controlling a virtual object in an application, performed by a terminal device, the method comprising:
- determining, in response to a touch operation by a user on a touch region, at least two touch positions through which the touch operation passes,
- wherein the touch region and a region where a skill is cast by the virtual object are different regions on the terminal device;
- determining a target touch position of the user on the touch region based on the at least two touch positions according to a preset policy and an input order of the at least two touch positions;
- determining a first aiming direction indicated by the target touch position;
- and
- controlling, according to the first aiming direction, a first virtual object to perform a skill casting operation.
A virtual object control apparatus, comprising:
- at least one memory configured to store computer code;
- and
- at least one processor configured to read the computer code and operate as instructed by the computer code, the computer code comprising:
- touch position determining code configured to cause the at least one processor to determine, in response to a touch operation by a user on a touch region, at least two touch positions through which the touch operation passes,
- wherein the touch region and a region where a skill is cast by the virtual object are different regions on the terminal device;
- target position determining code configured to cause the at least one processor to determine a target touch position of the touch operation based on the at least two touch positions according to a preset policy and an input order of the at least two touch positions;
- first direction determining code configured to cause the at least one processor to determine a first aiming direction indicated by the target touch position;
- and
- first control code configured to cause the at least one processor to control, according to the first aiming direction, a first virtual object to perform a skill casting operation.
A non-transitory computer-readable storage medium, storing at least one instruction executable by at least one processor to perform:
- determining, in response to a touch operation by a user on a touch region, at least two touch positions through which the touch operation passes,
- wherein the touch region and a region where a skill is cast by the virtual object are different regions on the terminal device;
- determining a target touch position of the user on the touch region based on the at least two touch positions according to a preset policy and an input order of the at least two touch positions;
- determining a first aiming direction indicated by the target touch position;
- and
- controlling, according to the first aiming direction, a first virtual object to perform a skill casting operation.
Dependencies are inferred from the claim text.