# US 12,005,360 B2 · Virtual object control method and apparatus, computer device, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,005,360 B2
- Document ID: US12005360B2
- Status: Granted
- Kind: B2
- Application number: 17/507,965
- Filed: 2021-10-22
- Published: 2022-02-10
- Granted: 2024-06-11
- Earliest claimed: 2020-06-05
- Assignees: Tencent Technology (Shenzhen) Company Limited
- Applicants: Tencent Technology (Shenzhen) Company Ltd
- Inventors: Xun Hu; Yu Lin Wan; Jianmiao Weng; Shan Dong Su
- Web page: https://patentgrep.com/patent/US12005360B2

## CPC

- A63F 13/426: involving on-screen location information, e.g. screen coordinates of an area at which the player is aiming with a light gun
- A63F 13/56: Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
- A63F 13/2145: the surface being also a display device, e.g. touch screens
- A63F 13/5375: for graphically or textually suggesting an action, e.g. by displaying an arrow indicating a turn in a driving game
- A63F 13/822: Strategy games; Role-playing games (A63F13/825, A63F13/828 take precedence)
- G06F 3/04847: Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
- G06F 3/04883: for inputting data by handwriting, e.g. gesture or text
- G06F 3/04886: by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
- G06F 2203/04808: Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen
- A63F: CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## 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.

## Claims

### Claim 1

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.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the determining the target touch position comprises:
determining weights of the at least two touch positions according to the input order of the at least two touch positions; and
obtaining coordinates of the target touch position based on a combination of coordinates of the at least two touch positions according to the weights of the at least two touch positions.

### Claim 3 (depends on 2)

The method according to claim 2, wherein the obtaining the coordinates of the target touch position comprises:
performing weighted summation on horizontal coordinates of the at least two touch positions according to the weights of the at least two touch positions, to obtain a horizontal coordinate of the target touch position; and
performing weighted summation on vertical coordinates of the at least two touch positions according to the weights of the at least two touch positions, to obtain a vertical coordinate of the target touch position.

### Claim 4 (depends on 1)

The method according to claim 1, wherein the determining the at least two touch positions comprises:
determining, in response to a press operation corresponding to a first touch point in the touch region, at least one intermediate touch position during a sliding operation from the first touch point in the touch region;
determining, in response to a lifting operation corresponding to a second touch point in the touch region, an end touch position corresponding to the lifting operation; and
determining a preset quantity of touch positions from the at least one intermediate touch position and the end touch position.

### Claim 5 (depends on 4)

The method according to claim 4, further comprising:
assigning a touch identifier to the first touch point in response to the press operation corresponding to the first touch point in the touch region; and
the determining the at least one intermediate touch position comprises:
determining the at least one intermediate touch position that is detected in the touch region and match the touch identifier.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the controlling the first virtual object comprises:
determining a second virtual object that has a shortest distance from the first virtual object in the first aiming direction; and
controlling the first virtual object to perform the skill casting operation on the second virtual object.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the controlling the first virtual object comprises:
determining an aiming position in the first aiming direction according to the first aiming direction and a first preset distance, a distance between the aiming position and the first virtual object being the first preset distance; and
controlling the first virtual object to perform the skill casting operation on the aiming position.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the touch region comprises a first touch subregion and a second touch subregion, the second touch subregion being outside the first touch subregion; and the determining the target touch position comprises:
determining the target touch position of the touch operation according to the at least two touch positions based on an end touch position of the touch operation being within the second touch subregion.

### Claim 9 (depends on 8)

The method according to claim 8, further comprising:
determining a second aiming direction according to a preset rule based on the at least two touch positions being within the first touch subregion; and
controlling, according to the second aiming direction, the first virtual object to perform the skill casting operation.

### Claim 10 (depends on 9)

The method according to claim 9, wherein the determining the second aiming direction comprises:
determining a position of a third virtual object that has a distance from the first virtual object less than a second preset distance; and
determining the second aiming direction according to a position of the first virtual object and the position of the third virtual object.

### Claim 11 (depends on 1)

The method according to claim 1, further comprising, prior to the determining the at least two touch positions:
displaying a skill casting button of the first virtual object through a virtual scene interface corresponding to the first virtual object; and
displaying the touch region through the virtual scene interface in response to a trigger operation on the skill casting button.

### Claim 12

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.

### Claim 13 (depends on 12)

The apparatus according to claim 12, wherein the target position determining code comprises:
weight determining sub-code configured to cause the at least one processor to determine weights of the at least two touch positions according to the input order of the at least two touch positions; and
coordinate determining sub-code configured to cause the at least one processor to obtain coordinates of the target touch position based on a combination of coordinates of the at least two touch positions according to the weights of the at least two touch positions.

### Claim 14 (depends on 13)

The apparatus according to claim 13, wherein the coordinate determining sub-code is configured to cause the at least one processor to:
perform weighted summation on horizontal coordinates of the at least two touch positions according to the weights of the at least two touch positions, to obtain a horizontal coordinate of the target touch position; and
perform weighted summation on vertical coordinates of the at least two touch positions according to the weights of the at least two touch positions, to obtain a vertical coordinate of the target touch position.

### Claim 15 (depends on 12)

The apparatus according to claim 12, wherein the touch position determining code comprises:
first position determining sub-code configured to cause the at least one processor to determine, in response to a press operation corresponding to a first touch point in the touch region, an initial touch position corresponding to the press operation;
second position determining sub-code configured to cause the at least one processor to determine at least one touch position during a sliding operation from the first touch point in the touch region; and
third position determining sub-code configured to cause the at least one processor to determine, in response to a lifting operation corresponding to a second touch point in the touch region, an end touch position corresponding to the lifting operation.

### Claim 16 (depends on 12)

The apparatus according to claim 12, wherein the first control code comprises:
object determining sub-code configured to cause the at least one processor to determine a second virtual object that has a shortest distance from the first virtual object in the first aiming direction; and
first control sub-code configured to cause the at least one processor to control the first virtual object to perform the skill casting operation on the second virtual object.

### Claim 17 (depends on 12)

The apparatus according to claim 12, wherein the first control code comprises:
an aiming position determining unit, configured to determine an aiming position in the first aiming direction according to the first aiming direction and a first preset distance, a distance between the aiming position and the first virtual object being the first preset distance; and
a second control unit, configured to control the first virtual object to perform the skill casting operation on the aiming position.

### Claim 18 (depends on 12)

The apparatus according to claim 12, wherein the touch region comprises a first touch subregion and a second touch subregion, the second touch subregion being outside the first touch subregion; and
the target position determining code is configured to cause the at least one processor to determine the target touch position of the touch operation according to the at least two touch positions based on an end touch position of the touch operation being within the second touch subregion.

### Claim 19 (depends on 1)

A computer device, comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to perform operations in the method according to claim 1.

### Claim 20

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.
