IP Library › Granted Patent US 12,102,916
Granted Patent B2
US 12,102,916 · App. 17/511,396 · Granted Oct 1, 2024

Ability aiming method and apparatus in three-dimensional virtual environment, device, and storage medium

Inventors: Xun Hu (Shenzhen, CN); Yulin Wan (Shenzhen, CN); Shandong Su (Shenzhen, CN); Yu Chen (Shenzhen, CN); Le Wang (Shenzhen, CN)
Assignee: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
A63F13/533A63F13/2145A63F13/5372
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,102,916
App. No.
17/511,396
Granted
Oct 1, 2024
Kind
B2
Abstract

This application discloses an ability aiming method in a three-dimensional virtual environment performed at a computer device. The method includes: displaying a user interface (UI) of an application program, the UI including a virtual environment picture obtained by observing the three-dimensional virtual environment from the perspective of a third-person point of view; receiving a drag operation on an ability aiming control in the UI, the drag operation from a first operating point and a second operating point that are located on the ability aiming control, the first operating point being an initial operating point and the second operating point being a current operating point of the drag operation; and displaying a three-dimensional ability aiming indicator in the virtual environment picture in response to the drag operation, an ability aiming direction of the three-dimensional ability aiming indicator being parallel to a drag direction of the drag operation in the UI.

Claims (80)

1. An ability aiming method in a three-dimensional virtual environment performed by a computer device, the method comprising:

displaying a user interface (UI) of an application program, the UI comprising a virtual environment picture and an ability aiming control, the virtual environment picture being a picture obtained by observing the three-dimensional virtual environment from the perspective of a third-person point of view, the ability aiming control being a two-dimensional control configured to cast an ability, and the ability aiming control being located on an upper layer of the virtual environment picture;

receiving a drag operation on the ability aiming control, the drag operation comprising a first operating point and a second operating point that are located on the ability aiming control, the first operating point being an initial operating point of the drag operation, and the second operating point being a current operating point of the drag operation; and

in response to receiving the drag operation on the ability aiming control:

displaying a three-dimensional ability aiming indicator in the virtual environment picture, the three-dimensional ability aiming indicator having an ability aiming direction that is parallel to a drag direction of the drag operation in the UI, the drag direction corresponding to an aiming vector on the ability aiming control and pointing from the first operating point to the second operating point;

determining an ability aiming vector in the three-dimensional virtual environment picture, corresponding to an aiming vector on the ability aiming control, according to an inverse transformation matrix; and

casting a first ability to a target position in the virtual environment picture according to the ability aiming vector.

2. The method according to claim 1 , further comprising:

displaying the three-dimensional ability aiming indicator in the three-dimensional virtual environment.

3. The method according to claim 1 , wherein determining the ability aiming vector further comprises:

determining the aiming vector pointing from the first operating point to the second operating point;

calculating, by using a center point on the UI as a first reference point, a pointed second reference point after the first reference point and the aiming vector are added;

converting the first reference point into a third reference point in the three-dimensional virtual environment by using the inverse transformation matrix, and converting the second reference point into a fourth reference point in the three-dimensional virtual environment by using the inverse transformation matrix; and

determining a vector pointing from the third reference point to the fourth reference point as the ability aiming vector.

4. The method according to claim 1 , wherein:

the ability aiming control comprises a maximum aiming distance, and there is a first ratio of a first distance between the first operating point and the second operating point to the maximum aiming distance; and

the ability comprises a maximum ability distance in the three-dimensional virtual environment, the three-dimensional ability aiming indicator comprises a first aiming point and a second aiming point that are in the three-dimensional virtual environment, the first aiming point is an initial point during ability aiming, the second aiming point is a target point during ability aiming, and there is a second ratio of a second distance between the first aiming point and the second aiming point to the maximum ability distance, the first ratio and the second ratio being the same.

5. The method according to claim 4 , wherein the three-dimensional virtual environment comprises a controlled virtual character, and displaying the three-dimensional ability aiming indicator comprises:

determining a position point of the virtual character in the three-dimensional virtual environment as the first aiming point;

determining the second aiming point of the three-dimensional ability aiming indicator during ability aiming according to the first aiming point and the ability aiming vector; and

displaying the three-dimensional ability aiming indicator according to the first aiming point and the second aiming point.

6. The method according to claim 5 , wherein the determining the second aiming point of the three-dimensional ability aiming indicator during ability aiming according to the first aiming point and the ability aiming vector comprises:

obtaining the maximum aiming distance of the ability aiming control;

calculating the first ratio of the first distance between the first operating point and the second operating point to the maximum aiming distance;

obtaining the maximum ability distance of the ability in the three-dimensional virtual environment; calculating a product of the first ratio and the maximum ability distance as a cast distance; and

adding, in a direction pointed by the aiming vector, the first aiming point to the cast distance, to obtain the second aiming point of the three-dimensional ability aiming indicator during ability aiming.

7. The method according to claim 1 , wherein displaying the three-dimensional ability aiming indicator in the virtual environment picture comprises:

displaying the three-dimensional ability aiming indicator in the virtual environment picture in response to a determination that a distance between the first operating point and the second operating point is greater than a dead region threshold.

8. A computer device, comprising a processor and a memory, the memory storing at least one program, the at least one program being loaded and executed by the processor to perform a plurality of operations including:

displaying a user interface (UI) of an application program, the UI comprising a virtual environment picture and an ability aiming control, the virtual environment picture being a picture obtained by observing a three-dimensional virtual environment from the perspective of a third-person point of view, the ability aiming control being a two-dimensional control configured to cast an ability, and the ability aiming control being located on an upper layer of the virtual environment picture;

receiving a drag operation on the ability aiming control, the drag operation comprising a first operating point and a second operating point that are located on the ability aiming control, the first operating point being an initial operating point of the drag operation, and the second operating point being a current operating point of the drag operation; and

in response to receiving the drag operation on the ability aiming control:

displaying a three-dimensional ability aiming indicator in the virtual environment picture, the three-dimensional ability aiming indicator having an ability aiming direction that is parallel to a drag direction of the drag operation in the UI, the drag direction corresponding to an aiming vector on the ability aiming control and pointing from the first operating point to the second operating point;

determining an ability aiming vector in the three-dimensional virtual environment picture, corresponding to an aiming vector on the ability aiming control, according to an inverse transformation matrix; and

casting a first ability to a target position in the virtual environment picture according to the ability aiming vector.

9. The computer device according to claim 8 , the plurality of operations further including:

displaying the three-dimensional ability aiming indicator in the three-dimensional virtual environment.

10. The computer device according to claim 8 , wherein the ability aiming vector further comprises:

determining the aiming vector pointing from the first operating point to the second operating point;

calculating, by using a center point on the UI as a first reference point, a pointed second reference point after the first reference point and the aiming vector are added;

converting the first reference point into a third reference point in the three-dimensional virtual environment by using the inverse transformation matrix, and converting the second reference point into a fourth reference point in the three-dimensional virtual environment by using the inverse transformation matrix; and

determining a vector pointing from the third reference point to the fourth reference point as the ability aiming vector.

11. The computer device according to claim 8 , wherein:

the ability aiming control comprises a maximum aiming distance, and there is a first ratio of a first distance between the first operating point and the second operating point to the maximum aiming distance; and

the ability comprises a maximum ability distance in the three-dimensional virtual environment, the three-dimensional ability aiming indicator comprises a first aiming point and a second aiming point that are in the three-dimensional virtual environment, the first aiming point is an initial point during ability aiming, the second aiming point is a target point during ability aiming, and there is a second ratio of a second distance between the first aiming point and the second aiming point to the maximum ability distance,

the first ratio and the second ratio being the same.

12. The computer device according to claim 11 , wherein the three-dimensional virtual environment comprises a controlled virtual character, and displaying the three-dimensional ability aiming indicator comprises:

determining a position point of the virtual character in the three-dimensional virtual environment as the first aiming point;

determining the second aiming point of the three-dimensional ability aiming indicator during ability aiming according to the first aiming point and the ability aiming vector; and

displaying the three-dimensional ability aiming indicator according to the first aiming point and the second aiming point.

13. The computer device according to claim 12 , wherein the determining the second aiming point of the three-dimensional ability aiming indicator during ability aiming according to the first aiming point and the ability aiming vector comprises:

obtaining the maximum aiming distance of the ability aiming control; calculating the first ratio of the first distance between the first operating point and the second operating point to the maximum aiming distance;

obtaining the maximum ability distance of the ability in the three-dimensional virtual environment; calculating a product of the first ratio and the maximum ability distance as a cast distance; and

adding, in a direction pointed by the aiming vector, the first aiming point to the cast distance, to obtain the second aiming point of the three-dimensional ability aiming indicator during ability aiming.

14. The computer device according to claim 8 , wherein [the] displaying the three-dimensional ability aiming indicator in the virtual environment picture comprises:

displaying the three-dimensional ability aiming indicator in the virtual environment picture in response to a determination that a distance between the first operating point and the second operating point is greater than a dead region threshold.

15. A non-transitory computer-readable storage medium, storing at least one program, the at least one program being loaded and executed by a processor of a computer device to perform a plurality of operations including:

displaying a user interface (UI) of an application program, the UI comprising a virtual environment picture and an ability aiming control, the virtual environment picture being a picture obtained by observing a three-dimensional virtual environment from the perspective of a third-person point of view, the ability aiming control being a two-dimensional control configured to cast an ability, and the ability aiming control being located on an upper layer of the virtual environment picture;

receiving a drag operation on the ability aiming control, the drag operation comprising a first operating point and a second operating point that are located on the ability aiming control, the first operating point being an initial operating point of the drag operation, and the second operating point being a current operating point of the drag operation; and

in response to receiving the drag operation on the ability aiming control:

displaying a three-dimensional ability aiming indicator in the virtual environment picture, the three-dimensional ability aiming indicator having an ability aiming direction that is parallel to a drag direction of the drag operation in the UI, the drag direction corresponding to an aiming vector on the ability aiming control and pointing from the first operating point to the second operating point;

determining an ability aiming vector in the three-dimensional virtual environment picture, corresponding to an aiming vector on the ability aiming control, according to an inverse transformation matrix; and

casting a first ability to a target position in the virtual environment picture according to the ability aiming vector.

16. The non-transitory computer-readable storage medium according to claim 15 , the plurality of operations further comprising:

displaying the three-dimensional ability aiming indicator in the three-dimensional virtual environment.

17. The non-transitory computer-readable storage medium according to claim 15 , wherein determining, the ability aiming vector further comprises:

determining the aiming vector pointing from the first operating point to the second operating point;

calculating, by using a center point on the UI as a first reference point, a pointed second reference point after the first reference point and the aiming vector are added;

converting the first reference point into a third reference point in the three-dimensional virtual environment by using the inverse transformation matrix, and converting the second reference point into a fourth reference point in the three-dimensional virtual environment by using the inverse transformation matrix; and

determining a vector pointing from the third reference point to the fourth reference point as the ability aiming vector.

18. The non-transitory computer-readable storage medium according to claim 15 , wherein;

the ability aiming control comprises a maximum aiming distance, and there is a first ratio of a first distance between the first operating point and the second operating point to the maximum aiming distance; and

the ability comprises a maximum ability distance in the three-dimensional virtual environment, the three-dimensional ability aiming indicator comprises a first aiming point and a second aiming point that are in the three-dimensional virtual environment, the first aiming point is an initial point during ability aiming, the second aiming point is a target point during ability aiming, and there is a second ratio of a second distance between the first aiming point and the second aiming point to the maximum ability distance,

the first ratio and the second ratio being the same.

19. The non-transitory computer-readable storage medium according to claim 18 , wherein the three-dimensional virtual environment comprises a controlled virtual character, and displaying the three-dimensional ability aiming indicator comprises:

determining a position point of the virtual character in the three-dimensional virtual environment as the first aiming point;

determining the second aiming point of the three-dimensional ability aiming indicator during ability aiming according to the first aiming point and the ability aiming vector; and

displaying the three-dimensional ability aiming indicator according to the first aiming point and the second aiming point.

20. The non-transitory computer-readable storage medium according to claim 15 , wherein displaying a three-dimensional ability aiming indicator in the virtual environment picture comprises:

displaying the three-dimensional ability aiming indicator in the virtual environment picture in response to a determination that a distance between the first operating point and the second operating point is greater than a dead region threshold.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 23, 2024
From: HU, XUN; WAN, YULIN; SU, SHANDONG; CHEN, YU; WANG, LE
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 068764/0295 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jun 3, 2022
From: HU, XUN; WAN, YULIN; SU, SHANDONG; CHEN, YU; WANG, LE
To: TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED
Reel/Frame 060271/0081 →
Priority Claims (1)
CN 202010093196.9 · Feb 14, 2020 · national
Continuity (2)
Continuation PCTCN2020128772 · Nov 13, 2020
Related Publication 20220047946A1 · Feb 17, 2022
Cited By (1)
US 12,569,758