Character locking method and apparatus in three-dimensional virtual environment, device, medium, and product

By providing an intelligent lock-on mode in a 3D virtual environment, which automatically switches the lock-on target based on combat interaction, the problem of cumbersome manual lock-on operation in 3D action games is solved, improving human-computer interaction efficiency and the utilization efficiency of operation response resources.

WO2026118903A1PCT designated stage Publication Date: 2026-06-11TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2025-11-21
Publication Date
2026-06-11

AI Technical Summary

Technical Problem

In 3D action games, users need to perform a lot of manual lock-on operations to continuously attack specific enemy characters. The operation requirements are high and not intelligent enough, which affects the efficiency of human-computer interaction.

Method used

Three locking modes are provided: Free Mode, Smart Mode, and Lock Mode. Smart Mode automatically switches the lock target based on the main character's combat interaction, reducing manual operation by the user.

🎯Benefits of technology

By automatically switching and locking onto targets in intelligent mode, the amount of user operation is reduced, the efficiency of human-computer interaction is improved, the utilization efficiency of operation response resources is enhanced, and the user's combat intentions are aligned.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025136605_11062026_PF_FP_ABST
    Figure CN2025136605_11062026_PF_FP_ABST
Patent Text Reader

Abstract

The present application discloses a character locking method and apparatus in a three-dimensional virtual environment, a device, and a storage medium. The method is applied to the field of three-dimensional interaction. The method comprises: displaying a playable character and at least one enemy character located in a three-dimensional virtual environment; when a first enemy character satisfies a locking condition, locking the first enemy character as a primary attack target of the playable character; and during locking of the first enemy character, on the basis of a combat interaction status of the playable character, switching to lock a second enemy character as a primary attack target of the playable character. The present application can provide an interaction solution for adaptively selecting a locked enemy, thereby reducing manual enemy locking operations of users and improving enemy locking efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, devices, media, and products for role locking in 3D virtual environments

[0001] This application claims priority to Chinese Patent Application No. 202411771526X, filed on December 3, 2024, entitled “Interaction Method, Apparatus, Device and Storage Medium for Virtual Characters”, the entire contents of which are incorporated herein by reference.

[0002] This application claims priority to Chinese Patent Application No. 2024118051317, filed on December 9, 2024, entitled “Method, Apparatus, Device and Storage Medium for Locking Characters in a Three-Dimensional Virtual Environment”, the entire contents of which are incorporated herein by reference. Technical Field

[0003] This application relates to the field of 3D interaction, and in particular to role locking in 3D virtual environments. Background Technology

[0004] In 3D action games, players control a game character (also called the main character) to fight. For example, they use button commands to make the main character fight against enemy characters.

[0005] In a 3D action game, the attack direction of the player-controlled character is related to the direction the character is facing. When the character is facing direction A, the attack direction is also direction A. If there are multiple enemy characters and the player wants to continuously attack a particular enemy, the player can hold down a button to maintain lock-on with that enemy. This hold-down button to lock onto an enemy can be considered a manual enemy-locking operation.

[0006] The aforementioned target-locking process relies on the user's manual target-locking operation, which demands a high level of skill from the user. In intense battles, a significant amount of manual target-locking is required to meet the combat demands. Summary of the Invention

[0007] This application provides a method, apparatus, device, and storage medium for character locking in a three-dimensional virtual environment, which can reduce the number of manual enemy locking operations performed by the user and improve the efficiency of human-computer interaction. The technical solution is as follows:

[0008] According to one aspect of this application, a method for character locking in a three-dimensional virtual environment is provided, the method comprising:

[0009] Display the main character and at least one enemy character located in a three-dimensional virtual environment;

[0010] If the first enemy character meets the locking conditions, the first enemy character is locked as the primary attack target of the main control character;

[0011] During the process of locking onto the first enemy character, the main control character may switch to locking onto the second enemy character as the main control character's priority attack target, based on the combat interaction situation.

[0012] According to another aspect of this application, a method for character locking in a three-dimensional virtual environment is provided, the method comprising:

[0013] Displays a main character and at least one enemy character in a three-dimensional virtual environment, with the main character in a first enemy-locking mode;

[0014] Receive switching commands for target lock mode;

[0015] Switch the target-locking mode of the main control character from the first target-locking mode to the second target-locking mode;

[0016] Among them, the first enemy-locking mode and the second enemy-locking mode are two different enemy-locking modes among free mode, smart mode and locked mode. The free mode is an enemy-locking mode that does not lock the enemy character. The smart enemy-locking mode is an enemy-locking mode that automatically switches the locked enemy character according to the combat interaction of the main character. The locked mode is an enemy-locking mode that keeps the locked enemy character unchanged.

[0017] According to another aspect of this application, a character locking device in a three-dimensional virtual environment is provided, the device comprising:

[0018] The display module is used to display the main character and at least one enemy character located in the three-dimensional virtual environment;

[0019] The intelligent mode module is used to lock the first enemy character as the primary attack target of the main control character when the first enemy character meets the locking conditions.

[0020] The intelligent mode module is used to switch the lock on a second enemy character as the primary attack target of the main control character, based on the combat interaction of the main control character, while the first enemy character is locked on.

[0021] According to another aspect of this application, a character locking device in a three-dimensional virtual environment is provided, the device comprising:

[0022] The display module is used to display the main control character and at least one enemy character located in a three-dimensional virtual environment, wherein the main control character is in a first enemy-locking mode;

[0023] The mode switching module is used to receive switching operations for the enemy lock mode;

[0024] The mode switching module is used to switch the enemy-locking mode of the main control character from the first enemy-locking mode to the second enemy-locking mode in response to the switching operation;

[0025] Among them, the first enemy-locking mode and the second enemy-locking mode are two different enemy-locking modes among free mode, smart mode and locked mode. The free mode is an enemy-locking mode that does not lock the enemy character. The smart enemy-locking mode is an enemy-locking mode that automatically switches the locked enemy character according to the combat interaction of the main character. The locked mode is an enemy-locking mode that keeps the locked enemy character unchanged.

[0026] According to another aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the character locking method in a three-dimensional virtual environment as described above.

[0027] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one computer program is stored therein, the at least one computer program being loaded and executed by a processor to implement the character locking method in a three-dimensional virtual environment as described above.

[0028] According to another aspect of this application, a computer program product is provided, comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the role-locking method in a three-dimensional virtual environment provided in various alternative implementations of the above aspects.

[0029] The beneficial effects of the technical solution provided in this application include at least the following:

[0030] This application provides an intelligent enemy-locking mode. While a first enemy character is being locked, the system automatically switches to locking onto a second enemy character as the primary target based on the main character's combat interactions. Since this switching is performed automatically by the client based on the main character's combat interactions, no manual locking operation from the user is required, reducing the number of user operations, improving human-computer interaction efficiency, and enhancing the utilization efficiency of operational response resources. Furthermore, automatic switching based on combat interactions aligns with the user's combat intentions, achieving an intelligent enemy-locking effect. Attached Figure Description

[0031] Figure 1 is a structural block diagram of a computer system provided in an exemplary embodiment of this application;

[0032] Figure 2 is a schematic diagram of the interface of a character locking method in a three-dimensional virtual environment provided in an exemplary embodiment of this application;

[0033] Figure 3 is a flowchart illustrating a character locking method in a three-dimensional virtual environment provided in an exemplary embodiment of this application;

[0034] Figure 4 is a schematic diagram of the operation of a camera model provided in an exemplary embodiment of this application;

[0035] Figure 5 is a flowchart illustrating a role locking method in intelligent mode provided by an exemplary embodiment of this application;

[0036] Figure 6 is a schematic diagram of the interface of the role locking method in intelligent mode provided by an exemplary embodiment of this application;

[0037] Figure 7 is a flowchart illustrating a role locking method under a locking mode provided in an exemplary embodiment of this application;

[0038] Figure 8 is a schematic diagram of the interface of a role locking method in a locking mode provided by an exemplary embodiment of this application;

[0039] Figure 9 is a flowchart illustrating a free-mode role locking method provided in an exemplary embodiment of this application;

[0040] Figure 10 is a schematic diagram of lens-assisted steering provided in an exemplary embodiment of this application;

[0041] Figure 11 is a schematic diagram of the detection orientation shift relative to the orientation of the master role provided in an exemplary embodiment of this application;

[0042] Figure 12 is a diagram showing the correspondence between lens rotation speed and screen swiping speed provided in an exemplary embodiment of this application;

[0043] Figure 13 is a schematic diagram of a pre-locking process provided in an exemplary embodiment of this application;

[0044] Figure 14 is a schematic diagram of at least two search ranges provided in an exemplary embodiment of this application;

[0045] Figure 15 is a schematic diagram of a triangular game mechanism provided in an exemplary embodiment of this application;

[0046] Figure 16 is a schematic diagram of the control interface of a virtual character provided in an exemplary embodiment of this application;

[0047] Figure 17 is a schematic diagram of the control interface of a virtual character provided in an exemplary embodiment of this application;

[0048] Figure 18 is a schematic diagram of the control interface of a virtual character provided in an exemplary embodiment of this application;

[0049] Figure 19 is a schematic diagram of the structure of a character locking device in a three-dimensional virtual environment provided in an exemplary embodiment of this application;

[0050] Figure 20 is a schematic diagram of the structure of a character locking device in a three-dimensional virtual environment provided in an exemplary embodiment of this application;

[0051] Figure 21 is a schematic diagram of the structure of a terminal device provided in an exemplary embodiment of this application.

[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0054] First, let me introduce the terms used in this application:

[0055] Virtual environment: This refers to the virtual environment displayed (or provided) by an application when it runs on a terminal. This virtual environment can be a simulation of the real world, a semi-simulated / semi-fictional environment, or a purely fictional environment. The virtual environment can be any of a two-dimensional, 2.5-dimensional, or three-dimensional virtual environment; this application does not limit this. The following embodiments illustrate a three-dimensional virtual environment. For example, the virtual environment includes the sky, land, and ocean, with the land including environmental elements such as plants and houses. Users can control virtual characters to move within this virtual environment. Of course, the virtual environment also includes virtual objects. These virtual objects can be interactive, such as virtual beds, virtual chairs, virtual lamps, and virtual bathtubs, allowing users to control their virtual characters to lie on the virtual bed or sit on the virtual chair. They can also be non-interactive, such as virtual trees, virtual stones, and virtual house structures (including roofs, floors, pillars, doors, and windows). This virtual environment can also simulate real-world environments under different weather conditions, such as sunny days, rainy days, foggy days, or nighttime. A variety of scene elements enhance the diversity and realism of the virtual environment.

[0056] Virtual Character: A virtual character refers to an active object in a virtual environment. This active object can be a virtual person, virtual animal, anime character, etc., such as a person displayed in a three-dimensional virtual environment. Optionally, a virtual character is a three-dimensional model created based on animation skeletal technology, which achieves different appearances by wearing different skins. Each virtual character has its own shape and volume in the three-dimensional virtual environment, occupying a portion of the space within the three-dimensional virtual environment. In some implementations, virtual characters can also be implemented using 2.5D or 2D models; this application does not limit this. Optionally, a virtual character is developed by a user from an initial virtual character according to the developer's design; or, the virtual character is designed by the developer, and users can acquire different virtual characters through purchase, completing tasks, lotteries, etc., and selectively control one of the virtual characters to enter a game.

[0057] 3D action games (3DACT) or 3D spatial action games are combat games where users can control a main character to move freely in a 3D virtual environment from a third-person perspective. The game's virtual environment is viewed from the third-person perspective of the user-controlled character. In these games, users can control their main character to move freely within the 3D virtual environment and engage in various actions such as trading, fighting, and interacting with other characters.

[0058] User interface (UI) controls are any visual controls or elements that can be seen on the user interface of an application. Examples include images, input fields, text boxes, buttons, and labels; some of these UI controls support responding to user actions.

[0059] Player vs. Environment (PVE): This refers to interactions between interactive objects and computer-controlled virtual characters or environments within a game. This mode typically includes activities such as completing quests, exploring maps, solving puzzles, and leveling up by defeating monsters. The main purpose of PVE mode is to allow interactive objects to experience the game's storyline, improve character abilities, and acquire game resources.

[0060] Player vs. Player (PVP) mode: This mode involves interactive objects battling other interactive objects. It refers to interactive objects directly competing or cooperating with other interactive objects in the game. This mode typically includes battles between interactive objects, competitive matches, ranked matches, etc. The main purpose of PVP mode is to allow interactive objects to showcase their skills and strategies in competition with other interactive objects, gaining a sense of accomplishment and rewards.

[0061] Figure 1 is a structural block diagram of a computer system provided in an exemplary embodiment of this application. The computer system 100 includes: a first terminal 110, a second terminal 120, and a server cluster 130.

[0062] The first terminal 110 has an application 111 installed and running that supports a virtual environment. This application 111 can be a client that supports a virtual environment. When the first terminal 110 runs the application 111, the user interface of the application 111 is displayed on the screen of the first terminal 110. The application 111 can be any of the following: First Person Shooting (FPS) game, Third Person Shooting (TPS) game, Multiplayer Online Battle Arena (MOBA) game, Fight Technology Game (FTG), Action Game (ACT), Real-Time Strategy Game (RTS), Massive / Massively Multiplayer Online Game (MMOG), Arcade Game, Simulation Game (SLG), Competitive Game, Party Game, or Casual Game. The first terminal 110 is the terminal used by the first user 112, who uses the first terminal 110 to control the behavior of a first virtual character located in the virtual environment. The first user, 112, logs in to use application 111.

[0063] The second terminal 120 has an application 121 installed and running that supports a virtual environment. This application 121 can be a client that supports a virtual environment. When the second terminal 120 runs the application 121, the user interface of the application 121 is displayed on the screen of the second terminal 120. The application 121 can be any of the following: FPS game, TPS game, MOBA game, FTG, ACT, RTS, MMOG, arcade game, SLG, competitive game, party game, or casual game. Optionally, the application 121 can be exactly the same as the application 111, or the same application under different operating systems, or different versions of the same application. The application 111 can be the first client, and the application 121 can be the second client. The second terminal 120 is the terminal used by the second user 122. The second user 122 uses the second terminal 120 to control the behavior of virtual characters other than the first virtual character in the virtual environment, such as controlling the behavior of the second, third, or fourth virtual character. The second user 122 uses the application 121 by logging in. Optionally, the virtual characters other than the first virtual character belong to the same or different factions as the first virtual character. When both characters belong to the same faction, there can also be at least one enemy character from the opposing faction in the virtual environment. This enemy character is controlled by a user using a third-party terminal through a corresponding application, and belongs to the opposing faction of the first virtual character. Of course, in the case of a single-player game, the game can be completed by the first client alone.

[0064] The device types of the first terminal 110 and the second terminal 120 include at least one of the following: smartphone, tablet computer, e-book reader, MP3 player, MP4 player, laptop computer, and desktop computer.

[0065] Figure 1 shows only two terminals, but multiple other terminals 140 exist in different embodiments. In some embodiments, at least one other terminal 140 is the terminal corresponding to the developer. A development and editing platform for a client that supports a virtual environment is installed on the other terminal 140. The developer can edit and update the client on the other terminal 140 and transmit the updated client installation package to the server cluster 130 via wired or wireless network. The first terminal 110 and the second terminal 120 can download the client installation package from the server cluster 130 to update the client.

[0066] The first terminal 110, the second terminal 120, and other terminals 140 are connected to the server cluster 130 via a wireless network or a wired network.

[0067] Server cluster 130 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Server cluster 130 provides backend services to clients supporting the virtual environment. Optionally, server cluster 130 undertakes the primary computing task, and the terminals undertake secondary computing tasks; or, server cluster 130 undertakes secondary computing tasks, and the terminals undertake the primary computing tasks; or, server cluster 130 and terminals collaborate using a distributed computing architecture. Optionally, both the terminals and servers mentioned above are computer devices.

[0068] In an illustrative example, server cluster 130 includes servers 131 and 136. Server 131 includes a processor 132, a database 133, a game service module 134, and an input / output interface (I / O interface) 135. The processor 132 loads instructions stored in server 131 and processes data in database 133 and game service module 134. Database 133 stores user-related data for the first terminal 110, the second terminal 120, and other terminals 140, such as user avatars, nicknames, virtual characters, and server regions. Game service module 134 provides services for games between virtual characters from different factions. I / O interface 135 establishes communication and exchanges data with terminals via wireless or wired networks.

[0069] Based on the above description of the virtual environment, the method provided in the embodiments of this application will be described below.

[0070] Figure 2 shows an interface diagram of a character locking method in a three-dimensional virtual environment provided by an exemplary embodiment of this application. This embodiment provides three enemy-locking modes (or locking modes): free mode, locked mode, and intelligent mode.

[0071] Free Mode: A mode that does not lock onto enemy characters.

[0072] Lock-on mode: A mode that keeps one enemy character locked. Optional, except under exceptional conditions, a mode in which the client keeps one enemy character locked.

[0073] Intelligent Mode: Automatically switches the locked enemy character mode based on the combat interaction of the main character 10. Optionally, except under exceptional conditions, the client can lock onto one enemy character and automatically switch to locking onto another enemy character based on the combat interaction of the main character 10.

[0074] The exceptions include: the locked enemy character dies, the locked enemy character disappears, and the locked enemy character is changed by the player's manual locking action.

[0075] As shown in Figure 2, a mode switching button 20 is provided in the client's user interface. In response to clicking the mode switching button 20, the system switches between three target-locking modes in a preset order. Taking the preset order of Free Mode, Smart Mode, and Lock Mode as an example, assuming the main character 10 is currently in Free Mode, the first click of the mode switching button 20 switches Free Mode to Smart Mode; the second click switches Smart Mode to Lock Mode; and the third click switches Lock Mode back to Free Mode.

[0076] Optionally, pressing and holding the mode switch button 20 will display a mode list 21 of three enemy-locking modes. Mode list 21 shows candidates for the three enemy-locking modes. Clicking on a candidate for Free Mode switches the enemy-locking mode to Free Mode; clicking on a candidate for Lock Mode switches the enemy-locking mode to Lock Mode; and clicking on a candidate for Smart Mode switches the enemy-locking mode to Smart Mode.

[0077] Visual cues for target lock mode:

[0078] Different enemy-locking modes have different visual cues. For example, in Free Mode, no lock-on points are displayed on the bodies of any enemy characters; in Smart Mode, the locked enemy character 22 displays a first type of lock-on point 23, such as a white lock-on point; in Lock Mode, the locked enemy character 22 displays a second type of lock-on point 25, such as a red or black lock-on point.

[0079] It should be noted that the aforementioned lock-on point can also be displayed above or below the enemy character's head; the lock-on point can also be displayed as an icon, color, outline, or surrounding halo. This application does not limit the display location or display format of the lock-on point.

[0080] Another point to note is that the free mode, smart mode, and locked mode mentioned above are merely illustrative naming conventions. In different embodiments, the name of the locked mode can be other names or custom names without changing the meaning of the current locked mode.

[0081] Figure 3 illustrates a flowchart of a character locking method in a three-dimensional virtual environment provided in an exemplary embodiment of this application. This method can be executed by the aforementioned computer device, for example, by a client, a terminal device, or a terminal device running a client. The method includes:

[0082] Step 320: Display the main character and at least one enemy character in the three-dimensional virtual environment, with the main character in the first target lock mode;

[0083] The terminal running the client supports the display of the three-dimensional virtual environment. The display screen of the first terminal can display the main control field of view, which is the image of the three-dimensional virtual environment captured by the camera model. Users can control the main control character's activities in the three-dimensional virtual environment through interactive operations with the display screen (which is a touch-enabled display screen, also known as a touch screen) or external interactive devices (such as a mouse, keyboard, electronic stylus, game controller, etc.).

[0084] In this context, the main character, also known as the master character, is a virtual character controlled by the user or player. The enemy character, also known as the enemy virtual character, can be a virtual character controlled by other players, or a virtual character controlled by a state machine or artificial intelligence (AI).

[0085] The main character and the enemy characters belong to different factions. Factions can also use other equivalent terms, such as groups, teams, or organizations. Factions are used to temporarily or permanently categorize virtual characters into groups. For example, virtual characters in a virtual environment can be classified as belonging to at least one faction; or, virtual characters in a virtual environment can freely form temporary factions. Each faction includes at least one virtual character. Optionally, virtual characters from different factions can attack each other; or, virtual characters from different factions can attack each other under certain conditions.

[0086] For example, in action games, enemy characters can be NPCs (Non-player Characters), monsters, bosses, etc., within a virtual environment. The enemy character's action logic is pre-designed by the developers and manifests as different computer programs, such as when to release which skill to attack which virtual character. Alternatively, enemy characters can be AI-controlled virtual characters, where an AI model generates their action logic based on relevant information (such as their location, their own attributes, and the attributes of opposing virtual characters). Users can control their main character to defeat enemy characters and obtain corresponding rewards. Since some enemy characters are designed to be quite powerful, a single user may find it difficult to defeat them. In this case, users can team up with other users to defeat the enemy character (i.e., the main character and at least one teammate virtual character form the first faction). Optionally, enemy characters can belong to a different faction than any other virtual character.

[0087] It should be noted that the "factions" in this embodiment are used to categorize virtual characters in a virtual world into groups, primarily in scenarios where virtual characters need to engage in combat. Games in related technologies may have faction mechanisms, such as following certain rules to divide all settings within the game into positions and create conflict. This typically manifests as users' identification with and categorization of various identities, values, and group positions. For example, virtual characters in the game might be divided into good, neutral, and evil factions, and users can choose to join a faction based on their level of acceptance of each faction's ideology. However, the factions shown in this embodiment are not entirely the same as the aforementioned "good," "neutral," and "evil" factions. Regarding the faction to which the main character belongs, it is more of a temporary group division method that facilitates user communication and cooperation.

[0088] In one possible implementation, the terminal device displays a virtual environment in the virtual world through a master control view screen. The master control view screen is the view of the virtual environment observed from the perspective of the master character. Viewpoint refers to the angle of observation when observing the virtual environment from a first-person or third-person perspective. Optionally, in the embodiments of this application, the viewpoint is the angle from which the master character is observed in the virtual environment through a camera model. When using a first-person perspective, the camera model is located near or above the head of the master character; when using a third-person perspective, the camera model can be located behind the master character and bound to the master character, or it can be located at any position at a preset distance from the master character. The camera model allows observation of the master character in the virtual environment from different angles. Optionally, in addition to first-person and third-person perspectives, viewpoints also include other perspectives, such as a top-down perspective; when using a top-down perspective, the camera model can be located above the head of the master character. The top-down perspective is the perspective of observing the virtual environment from an aerial viewpoint. Optionally, the camera model will not be actually displayed in the virtual environment; that is, the camera model will not be displayed in the virtual environment shown on the main control screen or user interface. The camera model can also be referred to simply as a lens.

[0089] Referring to Figure 4, a camera model 202 is set up in the 3D virtual environment 200. If a first-person perspective is used, the camera model 202 is typically positioned above the head of the main character; if a third-person perspective is used, the camera model 202 is typically positioned around the main character, placing the main character within the camera model's field of view. The client renders virtual objects within the field of view of the camera model 202, resulting in the main view frame 204. For example, the vertex P of a triangular pyramid in the 3D virtual environment 200 will be rendered as a pixel P' in the main view frame 204.

[0090] The client supports at least two of the following modes: Free Mode, Smart Mode, and Lock-on Mode. The first Lock-on Mode is one of the three lock-on modes: Free Mode, Smart Mode, and Lock-on Mode.

[0091] Free mode is a lock-on mode that does not lock onto enemy characters.

[0092] The Smart Enemy Lock Mode is an enemy lock mode that automatically switches between locked and locked enemy characters based on combat interactions. For example, under exceptional circumstances, Smart Enemy Lock Mode means that when one enemy character is locked, the lock will automatically switch to another enemy character based on combat interactions. Combat interactions include at least one of the following: the main character's attack hits an enemy character, or an enemy character's attack hits the main character.

[0093] Lock-on mode is an enemy-locking mode that keeps the locked enemy character unchanged. For example, lock-on mode means that, except under exceptional conditions, the client will continuously lock onto a single enemy character. Even if, during the lock-on process, the main character's attack hits another enemy character, or an attack from another enemy character hits the main character, the locked enemy character will not switch.

[0094] The exceptions include at least one of the following: the locked enemy character dies, the locked enemy character disappears, the distance between the locked enemy character and the main character exceeds a threshold, or the locked enemy character is changed by the user's manual locking operation.

[0095] In some embodiments, after the client is started, the controlling role is in one of three modes by default: free mode, smart mode, or locked mode. The default locked mode is either a system preset or a user-defined mode.

[0096] Step 340: Receive the switching operation for the enemy lock mode;

[0097] The switching operation is triggered by a mode switching control on the user interface, or by a physical button on the terminal device.

[0098] In some embodiments, a mode switching control is displayed on the client's user interface (or the main control view screen). The switching operation is at least one of the following: clicking, double-clicking, multiple clicking, long-pressing, swiping, and dragging operations on the mode switching control.

[0099] In some embodiments, the switching operation is a click operation on the mode switching control. Assuming the mode switching control is implemented as a button, in response to a click on the mode switching button, it switches between three enemy-locking modes in a preset order. Taking the preset order as: Free Mode, Smart Mode, and Locked Mode, assuming the main character is currently in Free Mode, in response to the first click, Free Mode is switched to Smart Mode; in response to the second click, Smart Mode is switched to Locked Mode; in response to the third click, Locked Mode is switched back to Free Mode, and so on, in a loop.

[0100] In some embodiments, the switching operation is a swipe operation on the mode switching control. Assuming the mode switching control is implemented as a scroll wheel, in response to a swipe operation on the mode switching wheel, the user switches between three enemy-locking modes in a preset order. Taking the preset order as: Free Mode, Smart Mode, and Lock Mode, assuming the main character is currently in Free Mode, in response to the first swipe down, Free Mode switches to Smart Mode; in response to the second swipe down, Smart Mode switches to Lock Mode; in response to the third swipe down, Lock Mode switches back to Free Mode, and so on. Of course, the user can also perform an upward swipe operation to switch between different enemy-locking modes in the reverse order described above.

[0101] In some embodiments, the switching operation is a combination of multiple operations performed on the mode switching control. Assuming the mode switching control is implemented as a drop-down menu, in response to a click or long-press operation on the mode switching drop-down menu, three candidate modes for locking enemies appear: Free Mode, Smart Mode, and Locked Mode. In response to a click on the Free Mode candidate, Locked Mode is switched to Free Mode; in response to a click on the Locked Mode candidate, Locked Mode is switched to Locked Mode; and in response to a click on the Smart Mode candidate, Locked Mode is switched to Smart Mode.

[0102] In some embodiments, the switching operation is a click operation on a physical button used to implement the mode switching function. In response to a click on the mode switching button, the system switches between three target-locking modes in a preset order. For example, assuming the preset order is: Free Mode, Smart Mode, and Lock Mode, and the main character is currently in Free Mode, the first click switches Free Mode to Smart Mode; the second click switches Smart Mode to Lock Mode; and the third click switches Lock Mode back to Free Mode, and so on. In one embodiment, the physical button is a key on a computer keyboard or a button on a mouse, such as the middle mouse button.

[0103] Step 360: Switch the main character's target lock mode from the first target lock mode to the second target lock mode;

[0104] The second target-locking mode is a different target-locking mode from the first target-locking mode among the free mode, smart mode, and locked mode. That is, the first target-locking mode and the second target-locking mode are any two different target-locking modes among the free mode, smart mode, and locked mode.

[0105] In some embodiments, in response to a first switching operation for the target-locking mode, the target-locking mode is switched to a locked mode; in response to a second switching operation for the target-locking mode, the target-locking mode is switched to a free mode; and in response to a third switching operation for the target-locking mode, the target-locking mode is switched to a smart mode.

[0106] In summary, the method provided in this embodiment offers two or three different enemy-locking modes, allowing users to choose the mode that best suits their combat style or preferences. If a user prefers a relatively free combat style, they can choose the free mode to not lock onto enemies; if a user prefers to continuously fight a specific enemy character, they can choose the lock-on mode; and if a user prefers a flexible and varied combat style, they can choose the intelligent mode to lock onto enemies. Furthermore, users can select the most suitable enemy-locking mode for different combat scenarios. In mobile 3D action games, this method balances flexibility and precision in enemy selection while minimizing the user's operational workload.

[0107] Based on the embodiment shown in Figure 3, the three modes described above will be explained below:

[0108] Smart Mode:

[0109] Figure 5 illustrates a flowchart of a role-locking method in intelligent mode provided by an exemplary embodiment of this application. The method can be executed by a client, a terminal, or a terminal running a client. The method includes:

[0110] Step 402: If the first enemy character meets the lock-on conditions, lock the first enemy character as the primary target of the main character's attack;

[0111] The first locking condition is the condition for locking onto the first enemy character. In some embodiments, the first locking condition includes at least one of the following:

[0112] • The first enemy character is the enemy character with the highest priority within the first search range;

[0113] • The first enemy character is the one indicated by the manual lock-on control.

[0114] • The first enemy character is the enemy character who most recently had a combat interaction with the main character.

[0115] The first search range is determined by the client based on the orientation of the main character. Manual lock-on is performed by the user or player through human-computer interaction.

[0116] If the first enemy character meets the lock-on conditions, locking onto that first enemy character becomes the primary target of the main character's attack. A primary target means that if there is at least one enemy character within a preset range centered on the main character, and that at least one enemy character includes the first enemy character, the main character will prioritize attacking that first enemy character. However, if the first enemy character is not within this preset range, the main character can attack other enemy characters instead of the first enemy character.

[0117] During the process of locking onto the first enemy character, a first-style locking point will be displayed on the body model of the first enemy character, either on its head or at its feet. This first-style locking point has at least one of a first pattern and a first color. For example, the first-style locking point is a white circular locking point. As shown in Figure 6, white circular locking points are displayed on the body of the first enemy character 22.

[0118] Step 404: While the first enemy character is locked, switch the lock on the second enemy character as the main character's priority attack target based on the main character's combat interaction.

[0119] The combat interaction of the main character refers to the combat interaction between the main character and enemy characters. Here, "enemy characters" includes neutral characters. In some embodiments, the combat interaction of the main character includes: the main character's attack hitting an enemy character, and / or, an enemy character's attack hitting the main character.

[0120] In some embodiments, if the main character's attack hits the second enemy character while the first enemy character is being locked, the locked second enemy character becomes the main character's priority target.

[0121] In some embodiments, if the main character is hit by an attack from a second enemy character while the first enemy character is being locked, locking the second enemy character becomes the main character's priority target.

[0122] Regarding the situation where the main character's attack hits a second enemy character:

[0123] During the process of locking onto the first enemy character, the first enemy character is the primary target of the main character's attack. Normally, the main character's attack will hit the first enemy character. In some embodiments, during the process of locking onto the first enemy character, if the main character's attack hits a second enemy character, locking onto the second enemy character as the main character's primary target includes the following three steps:

[0124] Step 1: While the first enemy character 22 is locked on, receive the attack initiation command for controlling the main character 10;

[0125] Referring to Figure 6, as shown in the upper part of Figure 6, the first enemy character 22 is in a locked-on state. A first-type lock-on point 23 is displayed on the first enemy character 22. The user controls the main character 10 to launch an attack. For example, the user clicks the basic attack button or skill button located in the lower right corner of the user interface to control the main character 10 to launch an attack.

[0126] Step 2: When the distance between the first enemy character 22 and the main control character 10 is greater than the first threshold and the distance between the second enemy character 26 and the main control character 10 is less than the second threshold, control the main control character 10 to launch an attack on the second enemy character 26.

[0127] The first threshold is greater than or equal to the second threshold. For example, the second threshold is the effective attack radius of the main character 10, and the first threshold is a radius that is slightly larger than the second threshold.

[0128] Step 3: If the main character 10's attack hits the second enemy character 26, lock the second enemy character 26 as the main character 10's priority target.

[0129] As shown in the lower part of Figure 6, when the attack of the master character 10 hits the second enemy character 26, the client will switch the locked first enemy character 22 to the second enemy character 26. That is, switching and locking the second enemy character 26 is the master character's priority attack target.

[0130] In this situation, since the attack of the main control character 10 is initiated by the user, and the user launches an attack on the surrounding side while being able to observe the first enemy character 22, it indicates that the user's attack intention is the second enemy character. Switching to lock onto the second enemy character 26 can achieve intelligent switching in accordance with the user's attack intention.

[0131] Regarding the situation where the main character is hit by an attack from a second enemy character:

[0132] Because the main character and the first enemy character change positions in the 3D virtual environment during combat, if the main character is fighting multiple enemy characters simultaneously, they are very likely to be hit by attacks from the second enemy character. In some embodiments, if the main character is hit by an attack from the second enemy character while the first enemy character is being locked on, locking onto the second enemy character becomes the main character's priority target, including the following steps:

[0133] Step 1: While the first enemy character is locked on, control the main character to move around in the three-dimensional virtual environment. The activities include at least one of moving, launching an attack, and observing.

[0134] Step 2: If the main character is hit by an attack from a second enemy character during the event, lock the second enemy character as the main character's priority target.

[0135] When a second enemy character attacks the main character, the main character may need to use defensive skills or counter the second enemy character's attack skills. Therefore, switching to lock onto the second enemy character can achieve intelligent switching in accordance with the user's defensive or counterattack intentions.

[0136] Therefore, the above-mentioned technical solution for automatically switching locked enemy characters can adapt to the combat interaction of the main character, intelligently predict the combat intentions of the main character, and thus reasonably switch locked targets.

[0137] Lens control in smart mode:

[0138] Camera Rule 1: To make it easier for users to observe enemy characters, the above method also includes: during the process of locking onto the first enemy character, if no control operation is received for the main control character, keeping the first enemy character always in the main control's field of view;

[0139] The main control view is the view presented from the first / third-person perspective of the main control character. That is, it is the main control view captured by a camera model based on the first / third-person perspective. The main control character's perspective can include first-person, third-person, etc., and the specific perspective used is related to user settings or the game settings used to display the 3D virtual environment; this application does not limit this.

[0140] During the process of locking onto the first enemy character, the camera model will be controlled to rotate around the main character, so that the camera model's lens is facing the first enemy character (for example, the center axis of the lens points to the first enemy character), so that the user can observe the character model and behavior of the first enemy character in the main control's field of view.

[0141] In other words, in this application, by controlling the lens orientation of the camera model, the camera model can follow a specific object (such as the first enemy character, the second enemy character, the third enemy character, etc.) as much as possible in the three-dimensional virtual environment, so that the specific object can always be displayed in the main control view screen.

[0142] Camera Rule 2: To make it easier for users to observe enemy characters, the above methods also include:

[0143] While the first enemy character is locked on, upon receiving a movement command for the main character, control the main character to move within the three-dimensional virtual environment.

[0144] During the movement of the main character, the first enemy character must always remain in the main character's field of view;

[0145] The main control view is presented from the first / third-person perspective of the main control character. This means it uses a camera model captured from a first / third-person viewpoint. While the main control character is locked onto, even if the main control character is moving, the client will control the camera model to rotate around the main control character, ensuring the camera lens is pointed towards the first enemy character. This allows the user to observe the enemy character's model and behavior as the main control character moves.

[0146] Camera Rule 3: To make it easier for users to observe enemy characters, the above methods also include:

[0147] If a third enemy character attacks the main character while the first enemy character is locked on, switch the third enemy character to the main character's field of view.

[0148] If the third enemy character's attack misses the main character, switch back to the first enemy character in the main character's field of view;

[0149] The main control view is presented from the first / third-person perspective of the main control character. This means it uses a camera model captured from a first / third-person viewpoint. If a third enemy character attacks the main control character while the first enemy character is locked on (but misses), the client will control the camera model to rotate around the main control character, directing the camera lens towards the third enemy character so the user can observe them. Since the third enemy character missed, the client will then control the camera model to rotate around the main control character again, directing the camera lens back towards the locked first enemy character, thus ensuring the main control character still has sufficient combat information while the first enemy character is locked on.

[0150] In summary, the locking rules and / or lens rules related to intelligent mode include, but are not limited to, at least one of the following:

[0151] In Smart Mode, the system continuously searches for a target based on a fan-shaped priority range. Before a target is found, the character and camera rules remain the same as in Free Mode. Once a target is found, the system automatically locks onto the single enemy that meets the criteria and has the highest priority, making it the player's target.

[0152] When a target is locked on, the camera will continuously point towards it to ensure that both the player character and the target are simultaneously in the player's field of view. As the player character moves, the camera will also follow the character and look towards the target.

[0153] When a player character initiates an attack, the character will prioritize attacking the locked target. Only if the locked target is too far away will the character attack other nearby enemies.

[0154] When an enemy other than the player's locked target attacks, the camera will temporarily pan to the attacking non-locked target. After a short while, the camera will return to normal and continue to face the locked target.

[0155] When a player attacks an enemy that is not the target of the lock-on attack, the lock-on target will switch to the attacked enemy. When a player is attacked by an enemy that is not the target of the lock-on attack, the lock-on target will switch to the enemy that initiated the attack.

[0156] Locked mode:

[0157] Figure 7 illustrates a flowchart of a role locking method under a locking mode provided in an exemplary embodiment of this application. This method can be executed by a client, a terminal, or a terminal running a client. The method includes:

[0158] Step 502: In response to the manual lock-on operation for the fourth enemy character, the fourth enemy character is locked as the primary attack target of the main character;

[0159] The manual lock-on operation can be performed by pressing a button to switch between different enemy characters, by swiping the screen, or by scrolling the middle mouse button. Optionally, the different enemy characters mentioned above can be different enemy characters in the main control view.

[0160] The user indicates the locked enemy character through a manual lock-on operation; the specific form of the manual lock-on operation is not limited in this embodiment. If a fourth enemy character is locked by the manual lock-on operation, the client locks the fourth enemy character as the primary attack target of the controlling character.

[0161] Step 504: If the exception conditions are not met, keep the fourth enemy character locked as the primary target of the main character's attack;

[0162] The exceptions include at least one of the following: the fourth enemy character dies, the fourth enemy character disappears, or a manual lock-on action is received against the fifth enemy character. The disappearance of the fourth enemy character includes situations such as the fourth enemy character being teleported to another location or the fourth enemy character being in stealth mode.

[0163] Referring to Figure 8, the first enemy character 22 is in a locked-on state. A second type of lock-on point 25 is displayed on the first enemy character 22. The user controls the main character 10 to launch an attack. For example, the user clicks the attack button located in the lower right corner of the user interface to control the main character 10 to launch an attack.

[0164] Since the distance between the first enemy character 22 and the main control character 10 is greater than the first threshold and the distance between the second enemy character 26 and the main control character is less than the second threshold, the main control character 10 is controlled to launch an attack on the second enemy character 26.

[0165] The first threshold is greater than or equal to the second threshold. For example, the second threshold is the effective attack radius of the main character 10, and the first threshold is a radius that is slightly larger than the second threshold.

[0166] If the main character 10's attack hits the second enemy character 26, the main character will continue to lock onto the first enemy character 22 as its primary target. Similarly, if the second enemy character 26's attack hits the main character 10, the main character will also continue to lock onto the first enemy character 22 as its primary target.

[0167] In lock-on mode, for certain monsters or bosses that need to be prioritized in certain scenarios, the main character can continuously lock onto the monster or boss, ignoring other monsters and concentrating firepower to deal with the highest priority enemy first.

[0168] In summary, the locking rules and / or camera rules related to the locking mode include, but are not limited to, at least one of the following:

[0169] • In lock-on mode, players can only switch target manually and cannot switch target through the various methods in smart mode;

[0170] • In lock-on mode, when the player character initiates an attack, the main character will prioritize attacking the locked target. Only when the locked target is too far away will the main character attack other nearby enemies.

[0171] When a player attacks an enemy that is not locked onto, the camera will temporarily turn to the non-locked target. After a short while, the camera will return to normal and continue to face the locked target.

[0172] When the player attacks an enemy that is not locked onto the target, the camera will temporarily turn to the attacked enemy. When the player is attacked by an enemy that is not locked onto the target, the camera will temporarily turn to the attacking enemy. After a short time, the camera will return to normal and continue to be aimed at the locked target. This short period of time can be a preset value, experience points, or a custom value.

[0173] Free Mode:

[0174] Figure 9 illustrates a flowchart of a role-locking method in free mode provided by an exemplary embodiment of this application. This method can be executed by a client, a terminal, or a terminal running a client. The method includes:

[0175] Step 602: Receive the attack initiation command for controlling the master role;

[0176] The attack can be initiated by pressing a physical button, a virtual button, or by combining directional controls with skill / basic attack buttons.

[0177] The main character typically possesses at least one of the following abilities: normal attack, normal skill, special move, and defensive skill. Pressing the normal attack button triggers a normal attack; pressing the normal skill button triggers a normal skill; and pressing the special move button triggers a special move.

[0178] Step 604: In response to the attack operation and the enemy character with the highest priority within the first search range, control the main character to launch an attack on the enemy character with the highest priority;

[0179] The first search area is a fan-shaped or circular area determined by the location of the main character. The client will automatically search within this first search area for the presence of an enemy character with the highest priority. If such an enemy character is found, the client will control the main character to attack that enemy character.

[0180] It should be noted that since the highest priority enemy character is determined in real time, it is not a locked enemy character.

[0181] Step 606: In response to an attack operation and the absence of an enemy character with the highest priority within the first search range, control the main character to launch an attack in the direction being faced.

[0182] If no enemy character with the highest priority is found within the first search range, the main character initiates an attack in the direction they are facing. In some embodiments, the main character's facing direction refers to the actual facing direction at the time of initiating the attack. In other embodiments, the main character's facing direction refers to the facing direction indicated by the direction control at the time of initiating the attack. Since it takes a certain amount of time for the main character's facing direction to change to the facing direction indicated by the direction control, the actual facing direction at the time of initiating the attack and the facing direction indicated by the direction control may be different. The direction control can be a physical direction joystick or a virtual direction joystick.

[0183] In some embodiments, in free mode, the method further includes:

[0184] In Free Mode, if the main character's attack hits a second enemy character or is hit by an attack from a second enemy character, the second enemy character will be identified as the main character's target within the first time frame.

[0185] The first duration is a relatively short preset value, which achieves an effect similar to a brief enemy lock-on.

[0186] Camera rules in free mode:

[0187] Camera Rule 1: To facilitate the user's observation of enemy characters, the method further includes:

[0188] If the second enemy character is determined to be the main character's target, keep the second enemy character in the main character's field of view;

[0189] The main control view is presented from the first / third-person perspective of the main control character. This means it's the main control view captured by a camera model based on a first / third-person perspective. When a second enemy character is selected as the attack target, the client will also control the camera model to rotate around the main control character, directing the camera lens towards the second enemy character. This allows the user to observe the second enemy character's model and behavior as the main control character moves.

[0190] Camera Rule 2: To facilitate the user's observation of enemy characters, the method further includes:

[0191] In response to a view rotation operation targeting the main control view, the content of the main control view is rotated and updated. During the view content rotation and update process, a potential attacking character is selected in the main control view based on the orientation of the main control character. In response to the end of the view rotation operation, the potential attacking character remains in the main control view for a second duration. A potential attacking character is a character that may be attacked by the main control character.

[0192] The second duration is a relatively short preset value, achieving a effect similar to a brief enemy lock-on. The main control view is presented from the first / third-person perspective of the main control character. That is, it is the main control view captured by a camera model based on a first / third-person perspective. During the process of a potential attacker being selected as the target, the client will also control the camera model to rotate around the main control character, so that the camera model's lens is facing the potential attacker, allowing the user to observe the potential attacker's character model and behavior.

[0193] Referring to Figure 10, in response to the user's view rotation operation, the client controls the camera model to rotate around the main control character 10. The white camera model represents the position before rotation, and the black camera model represents the position after rotation. During the rotation, a potential attacker character 27 is selected based on the orientation of the main control character. However, if the potential attacker character 27 is not in the orientation of the main control character 10 at the end of the view rotation operation, the client assists in controlling the camera model to rotate slightly, so that the camera lens faces the potential attacker character 27, allowing the user to observe the character model and behavior of the potential attacker character 27.

[0194] Camera Rule 3: To facilitate the user's observation of enemy characters, the method further includes:

[0195] In response to movement commands directed at the main character, control the movement of the main character within the three-dimensional virtual environment;

[0196] During the movement of the main character, the horizontal viewing direction of the main control screen is adjusted to align with the direction of movement of the main control character, and the vertical viewing direction of the main control screen is adjusted to align with the preset direction.

[0197] The main control view is the view presented from the first / third person perspective of the main control character.

[0198] That is, the horizontal lens direction of the camera model is controlled to align with the movement direction of the main character, and the vertical lens direction of the camera model is controlled to align with the preset direction.

[0199] In Free Mode, the enemy characters being attacked are dynamically selected based on the orientation of the main character. Since no enemy characters are locked on, it allows for the flexibility to engage in guerrilla warfare with multiple enemies as soon as they are encountered, making it suitable for guerrilla combat.

[0200] In summary, the locking rules and / or camera rules related to Free Mode include, but are not limited to, at least one of the following:

[0201] • In Free Mode, players do not have a fixed target to lock onto.

[0202] When a player initiates an attack, the system filters targets using a pre-configured fan-shaped priority (as shown in the image below) based on the player's joystick orientation, selecting the highest-priority target. The player character will then attack that target. If no target is found, the character will attack in the direction of the joystick.

[0203] • When a player character engages in "combat interaction," the camera briefly locks onto the interacting character as a target before panning to keep that target in view. After the "combat interaction" ends, the camera no longer pans to any target. Combat interaction refers to any action-based interaction between the player character and another enemy character, such as the player character attacking or being hit by another character.

[0204] When a player swipes, the camera searches for potential targets within a certain angle and range. When the player stops swiping, the camera temporarily turns towards that target, stopping after a fixed time. This feature helps players quickly aim the camera at a valid target after swiping, avoiding pointing the camera at an empty scene without targets.

[0205] When the player initiates movement, the horizontal camera will slowly turn towards the direction the main character is moving, and the vertical camera will slowly return to a preset fixed value.

[0206] Pre-lock mechanism during manual enemy locking:

[0207] The manual enemy-locking operation applies to both smart mode and lock-on mode. As shown in Figure 11, before the manual enemy-locking operation, the above method also includes:

[0208] Step 1: In response to the view rotation operation for the main view screen, rotate and update the screen content in the main view screen;

[0209] Optionally, the main control view screen has a joystick for rotating the view. The user's dragging action on this joystick is recognized by the client as a view rotation operation on the main control view screen. The rotation of the view on the main control view screen is achieved by controlling the camera model to rotate around the main control character. Due to the rotation of the camera model, the field of view of the corresponding lens changes, thereby updating the content of the image in the main control view screen.

[0210] Step 2: During the rotation and update of the screen content, select the pre-locked enemy character in the main control field of view based on the orientation of the main control character.

[0211] In some embodiments, a first search range is determined based on the orientation of the master character, and a pre-locked enemy character is selected within the first search range.

[0212] In some embodiments, during the rotation and update of the screen content, the enemy character with the smallest angle between itself and the orientation of the main control character in the main control view is selected as the pre-locked enemy character.

[0213] In some embodiments, during the rotation and updating of screen content, selecting a pre-locked enemy character in the main control character's field of view based on the main control character's orientation includes:

[0214] During the rotation and update of the screen content, the enemy character with the smallest angle between the main control view and the detection direction is selected as the pre-locked enemy character;

[0215] Specifically, the detected orientation is located on the first side of the main character's orientation, and there is a target angle between the detected orientation and the main character's orientation. The first side is determined based on the rotation direction, and the target angle is related to the rotation speed of the view rotation operation indicator. For example, the first side is the side indicated by the rotation direction.

[0216] In some embodiments, when the rotation speed does not exceed a threshold, the detected orientation is the orientation of the main control role, as shown in part a of Figure 11; when the rotation speed exceeds the threshold, the detected orientation shifts along the rotation direction, and the shift angle is positively correlated with the rotation speed, as shown in part b of Figure 11.

[0217] In some embodiments, the rotation update speed of the screen content and the rotation speed of the view rotation operation indicator have a non-linear positive correlation. For example, the rotation update speed of the screen content and the rotation speed of the view rotation operation indicator have an exponential relationship, as shown in Figure 12. Here, the rotation update speed of the screen content can be understood as the rotation speed of the camera model around the main character, that is, the rotation speed when rotating the lens with the main character's position as the origin. The rotations shown in Figures 11 and 12 refer to rotations on the horizontal plane; for example, Figure 11 shows the change in lens position in the 3D virtual environment from a top-down perspective.

[0218] During the pre-locking process, the main character's orientation will be corrected to the direction of the pre-locked enemy. For example, if the player's camera movement is paused but not finished, the camera will turn towards the pre-locked enemy at a certain speed until the pre-locked enemy is in the center of the field of view.

[0219] In some embodiments, the manual locking operation includes the end of the view rotation operation. That is, at the end of the view rotation operation, the pre-locked enemy character is determined as the locked enemy character, as shown in Figure 13.

[0220] It should be noted that the search process for pre-locked enemy characters is similar to that for potential attacker characters. The difference is that, at the end of the view rotation operation, the pre-locked enemy character will be confirmed as the locked enemy character. However, the potential attacker character will only be confirmed as the attack target for a short period of time after the view rotation operation ends.

[0221] Automatic search range:

[0222] In some embodiments, at least one of the locked enemy character, pre-locked enemy character, and potential attack character is determined based on at least two search ranges. The first search range is the first search range containing an enemy character, determined in priority order from the at least two search ranges.

[0223] As shown in Figure 14, at least two search ranges include: at least two of the following: a first sector region 71, a second sector region 72, a first circular region 73, a third sector region 74, and a second circular region 75;

[0224] The first sector area 71 is a sector area with the orientation of the main character as the central axis, having a first included angle and a first radius; the second sector area 72 is a sector area with the orientation of the main character as the central axis, having a second included angle and a second radius; the first circular area 73 is a circular area with the orientation of the main character as the central axis, having a third radius; the third sector area 74 is a sector area with the orientation of the main character as the central axis, having a third included angle and a fourth radius; the second circular area 75 is a circular area with the orientation of the main character as the central axis, having a fifth radius.

[0225] Among them, the first radius is greater than the fourth radius, the fourth radius is greater than the second radius, the fifth radius is greater than the third radius, the third included angle is greater than the second included angle, and the second included angle is greater than the first included angle.

[0226] Among them, the priority of the first sector region 71 is greater than that of the second sector region 72, the priority of the second sector region 72 is greater than that of the first circular region 73, the priority of the first circular region 73 is greater than that of the third sector region 74, and the priority of the third sector region 74 is greater than that of the second circular region 75.

[0227] The reason for this design is that the first fan-shaped area 71 is a narrow fan-shaped area directly facing the main character, and enemy characters located in this area are the most important enemies to attack by default. When there are no enemy characters in the first fan-shaped area 71, the second fan-shaped area 72 becomes the next priority search area. The second fan-shaped area 72 has a larger fan angle but a smaller radius, therefore it is the main character's close-range combat area (usually related to the main character's normal attack range and / or melee attack skill range). When there are no enemy characters in the second fan-shaped area 72, the first circular area 73 becomes the next priority search area. The radius of the first circular area 73 is equal to or approximately the radius of the second fan-shaped area 72, but it adds search areas to the left, right, and behind the main character, allowing for the search of nearby enemies even if the main character cannot turn around in time. If there are no enemy characters in the first circular area 73, then the third fan-shaped area 74 becomes the next priority search area. The third fan-shaped area 74 has a larger angle and radius, making it the main character's mid-to-long-range combat zone (usually related to the range of the main character's mid-to-long-range attack skills). If there are no enemy characters in the third fan-shaped area 74, then the second circular area 75 becomes the next priority search area. The radius of the second circular area 75 is the same as the third fan-shaped area 74, but it adds search areas to the left, right, and behind the main character, allowing for the search of mid-to-long-range enemies even if the main character cannot turn around in time.

[0228] In some embodiments, the enemy roles with the highest priority include:

[0229] • The enemy character with the smallest angle to the main character's orientation within the first search range;

[0230] When multiple enemies are nearby, the system determines which enemy to lock onto by defining an auto-locking fan-shaped selection range. The central axis of the priority fan is the camera's orientation, while the angle and radius can be manually defined. When an enemy is present in a high-priority area, the system will prioritize locking onto the enemy within that high-priority area that has the smallest angle with the camera's orientation.

[0231] • The enemy character with the highest preset priority within the first search range. The preset priority is the priority that is pre-configured for the enemy character.

[0232] When certain enemy characters hold special significance in a level (such as monsters that players need to prioritize eliminating), thus requiring players to lock onto them first, the level script configuration provides an option to "set enemy character lock-on priority." This configuration is an integer. Within the same priority area, enemy characters with lock-on priority are locked onto by the player first, regardless of factors such as distance and angle (e.g., a monster with lock-on priority of 2 will be locked onto before a monster with priority of 1).

[0233] It should be noted that the order of the method steps provided in the embodiments of this application can be appropriately adjusted, and the steps can also be added or removed as appropriate. Any method variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be elaborated further.

[0234] This application provides a 3D action game that supports PVP (Player vs. Player) and PVE (Player vs. Environment) modes. In the game, each player controls a chosen virtual object within a virtual environment. Within this virtual environment, virtual objects controlled by different players engage in combat. The combat actions that virtual objects can perform include basic attacks, standard skills, and defense, and there is a cyclical restraint relationship between these three combat actions. This cyclical restraint relationship between the three combat actions can be termed a triangular game.

[0235] Taking a battle between a first virtual object and a second virtual object as an example, the following explains the triangular game theory. When the second virtual object is using a standard skill, controlling the first virtual object to defend can prevent the second virtual object from using a standard skill; that is, defense counters standard skills. Optionally, defense can significantly reduce the damage caused by the standard skill, for example, reducing it by 90%. When the second virtual object is using a normal attack, controlling the first virtual object to use a standard skill against it interrupts the second virtual object's normal attack; that is, standard skills counter normal attacks. When the second virtual object is defending, controlling the first virtual object to use a normal attack against it transforms the normal attack into a throw attack, which interrupts the second virtual object's defensive behavior; that is, normal attacks counter defense. The triangular game theory in this embodiment is a cyclical counter-relationship where defense counters standard skills, standard skills counter normal attacks, and normal attacks counter defense. Therefore, players can respond to their opponent's combat behavior, flexibly formulate and change their battle strategies, which increases the challenge of the operation, promotes the interaction between virtual objects, and enhances the player's gaming experience.

[0236] Based on the aforementioned triangular game, skills in the game include regular skills and special skills. Regular skills are bound by the cyclical restraint relationships in the triangular game; they are restrained by defense, and defense can prevent regular skills, thus significantly reducing the damage received. Special skills are not bound by the cyclical restraint relationships in the triangular game; they are not restrained by defense, and defense cannot interrupt special skills. Optionally, the color of the skill effect when a regular skill is released is different from the color of the skill effect when a special skill is released. For example, when a regular skill is released, the first skill effect is displayed, and this first skill effect is blue; this regular skill can be called a "blue light skill." When a special skill is released, the second skill effect is displayed, and this second skill effect is red; this special skill can be called a "red light skill." Different skills display different effects, allowing players to judge the type of skill used by the enemy through the visual appearance of the enemy's skills during combat, thereby increasing the strategic depth and fun of the combat game and improving the user experience.

[0237] In one embodiment, as shown in Figure 15, when the first virtual object attacks the defense 702 of the second virtual object with a normal attack 701, the normal attack 701 of the first virtual object is transformed into a throw attack. This can be understood as the throw attack being automatically released after the normal attack 701 successfully hits the defense 702. According to the constraints of the triangular game theory, the throw attack automatically released after the normal attack 701 attacks the defense 702 can interrupt the defense of the second virtual object, thereby causing damage to the second virtual object through the throw. That is, when the defense 702 of the second virtual object is attacked by the normal attack 701 of the first virtual object, the first virtual object releases the throw attack transformed from the normal attack 701 against the second virtual object, and even if the second virtual object defends, the first virtual object still releases this throw attack.

[0238] In one embodiment, as shown in Figure 15, when the first virtual object defends against the second virtual object's release of a regular skill 703 using defense 702, a defensive counterattack period, or "counterattack window," is provided for the first virtual object. Different regular skills correspond to different defensive counterattack periods. For example, if the regular skill is a single-stage action, a certain period during the action can be configured as the defensive counterattack period; if the regular skill is a multi-stage action, a defensive counterattack period can be configured after each stage. During the defensive counterattack period, if the first virtual object performs a normal attack on the second virtual object, this normal attack will be converted into a counterattack attack. Optionally, this counterattack attack is considered a regular skill, and according to the aforementioned triangular game's cyclical restraint relationship, the counterattack attack can be defended by the second virtual object. That is, if the regular skill 703 released by the second virtual object is successfully defended by the first virtual object's defense 702, during the defensive counterattack period after the regular skill 703 is defended, if the first virtual object performs a normal attack on the second virtual object, this normal attack will be converted into a counterattack attack. Since this counterattack is considered a standard skill, when the first virtual object launches a counterattack, if the second virtual object defends, according to the cyclical restraint relationship of the aforementioned triangular game, the second virtual object can defend against the first virtual object's counterattack. This also provides the second virtual object with a window of opportunity for defense and counterattack, allowing it to launch a counterattack itself. Thus, players can respond accordingly based on observation and prediction of the enemy's actions, enhancing the strategic depth and user experience of the action game.

[0239] The above describes an example where the first virtual object performs a normal attack 701 during the defensive counterattack period, thus converting the normal attack 701 into a counterattack attack. Optionally, if the first virtual object fails to perform a normal attack precisely during the defensive counterattack period, but instead performs a normal attack outside of that period, this normal attack will neutralize the opponent's attack and push the opponent away. In one embodiment, the virtual objects in the game also have a first attribute value. Optionally, this first attribute value is an energy value. Optionally, the first attribute value is restored when hitting or being hit by any virtual object. In this embodiment, releasing a regular skill does not consume the first attribute value, while releasing a special skill does consume the first attribute value.

[0240] In one embodiment, the virtual object in the game also has a second attribute value. Optionally, this second attribute value is a stamina value. Optionally, the second attribute value can be automatically restored every preset time interval, restored by using specific virtual items, or restored by releasing specific skills. In this embodiment, the combat behavior of the virtual object also includes a fast movement operation, a hit-and-escape operation, and a behavior termination operation. The virtual object can perform the above-mentioned fast movement operation, hit-and-escape operation, or behavior termination operation by consuming a certain amount of second attribute value. Among them, the fast movement operation can be called "stepping," which refers to moving a preset distance in any direction by consuming a certain amount of second attribute value. This can be used to escape the opponent's normal attacks or skills. The movement speed of the fast movement operation is greater than the movement speed of the normal movement operation. Among them, the hit-and-escape operation can be called "escape dash," which refers to escaping the hit state by consuming a certain amount of second attribute value. The hit state refers to the state of being continuously attacked. By escaping the hit state, one can escape the opponent's continuous attacks. Among them, the behavior termination operation can be called "forced cancellation", which means terminating the current behavior by consuming a certain amount of secondary attribute value. For example, terminating a normal attack or terminating the release of a skill. By terminating the current behavior, you can change your combat moves and flexibly respond to the ever-changing situation in the game.

[0241] The first and second attribute values ​​of the aforementioned virtual objects are key resources in the game. The first attribute value is used to unleash special skills, while the second attribute value is used for quick movement, escape from hit, or action termination. There is also a certain game-theoretic relationship between these two attribute values. For example, the first virtual object consumes its first attribute value to unleash a special skill. If the second virtual object is within the skill's effective range after the skill is unleashed and at the skill's activation time, it will be hit by the skill. Then, during the period between the skill's release and its activation time, the second virtual object can use its second attribute value to move quickly, potentially escaping the skill's effective range and avoiding the special skill. Therefore, although special skills are not bound by the cyclical restraint relationships in the triangular game and are at the top of the strength chain, their hit rate is related to the opponent's second attribute value. If the opponent's second attribute value is sufficient to execute a quick movement, the chance of the special skill missing is high. If the opponent's second attribute value is insufficient to execute a quick movement, the opponent cannot quickly escape the skill's effective range, and the chance of the special skill missing is low. This can be understood as special skills being restrained by the second attribute value to a certain extent. Thus, based on the cyclical restraint relationship in the aforementioned triangular game, a higher-level game relationship is derived, namely, the game relationship between resources.

[0242] In one embodiment, when the first virtual object hits any other virtual object, the first attribute value of the first virtual object is increased by a first amount. Hitting any other virtual object includes hitting the virtual object through any of the following attack methods: normal attack, throw attack, counterattack attack, regular skill, or special skill. Optionally, the first amount increased after hitting a virtual object by different attack methods may be equal or unequal.

[0243] In another embodiment, if the first virtual object is hit by any other virtual object, a second quantity is added to the first attribute value of the first virtual object. The first virtual object being hit includes being hit by any of the following attack methods: normal attack, throw attack, counterattack attack, regular skill, or special skill. Optionally, the second quantity added after being hit by different attack methods may be equal or unequal. Optionally, if the first virtual object is hit by a second virtual object, the second quantity of the first attribute value of the second virtual object is transferred to the first virtual object.

[0244] For example, each first virtual object can have a maximum of the target number of first attribute values. Releasing a special skill requires consuming the target number of first attribute values; that is, releasing a special skill requires consuming all of the first virtual object's first attribute values.

[0245] For example, in response to the start of a game, the first virtual object has a first attribute value equal to the initial quantity, such as one-quarter of the target quantity. Optionally, the game consists of multiple rounds, and at the start of the first round, the first virtual object has a first attribute value equal to the initial quantity. For each round after the first round, the first attribute value from the previous round is inherited.

[0246] In one embodiment, if the second attribute value has not reached its maximum value, the second attribute value is increased by a third value every preset time interval. Optionally, if the second attribute value of the virtual object is less than a fourth value, a prompt effect is displayed on the virtual object. For example, if the second attribute value is stamina, with a maximum value of 5, and the third and fourth values ​​are both 1, meaning the virtual object can have a maximum of 5 stamina points, and 1 stamina point is restored every preset time interval. When the virtual object's stamina value is less than 1 point, a prompt effect, such as a flashing red effect, is displayed on the virtual object.

[0247] For example, performing a fast movement operation consumes 1 stamina point, performing an action termination operation consumes 2 stamina points, and performing a hit-and-run operation consumes 3 stamina points. For example, the hit-and-run operation has a cooldown period, while the fast movement and action termination operations do not.

[0248] For example, if a virtual object achieves a perfect dodge by performing a quick movement, the virtual object's second attribute value will be increased by a fifth amount. A perfect dodge means successfully avoiding an attack within a preset timeframe before being hit by a fast movement. For instance, if an attack is successfully avoided within 0.5 seconds before being hit by a fast movement, the virtual object's stamina will increase by 1 unit.

[0249] Based on the above implementation methods, as shown in Figure 15, in the three-dimensional action game provided by this application embodiment, in the triangular game, normal attack 701 counters defense 702. After normal attack 701 hits defense 702, normal attack 701 is converted into a throw attack, which can interrupt defense 702. Defense 702 counters regular skill 703. After successfully defending against regular skill 703 with defense 702, a counterattack is triggered, releasing a counterattack attack. Regular skill 703 counters normal attack 701. Special skill 705 is not bound by the cyclical counter relationship in the triangular game. Special skill 705 can counter normal attack 701, defense 702, and regular skill 703 in the triangular game. However, special skill 705 is countered by the second attribute value. By consuming the second attribute value to perform a quick movement operation 704, one can escape the effective range of special skill 705. In triangular game combat, virtual objects consume secondary attribute values ​​to increase the success rate of a single move. However, when these secondary attribute values ​​are depleted, they face the risk of being suppressed by the special skill 705. Players can adopt different behavioral strategies depending on the game situation. For example, players can continuously reduce the opponent's health through frequent triangular games. Players can also gain a game advantage by consuming secondary attribute values ​​in continuous offensive and defensive transitions. Furthermore, players can increase the hit rate of special skills by continuously suppressing the opponent's secondary attribute values.

[0250] For example, the aforementioned defense can also be called blocking, or in other words, a virtual object can completely or partially eliminate the attack of an enemy virtual object through a defensive operation. This defensive operation can be called defense or blocking. Throwing attacks can be called throwing techniques, regular skills can be called "blue light skills," special skills can be called "red light skills," or special skills can also be called "ultimate techniques." For example, the first attribute value required to release an ultimate technique can be called "Qi."

[0251] For example, a rapid movement operation can be called a "stepping step". A hit-and-run operation refers to escaping the attacked state, or in other words, a virtual object can be released from the attacked state through a hit-and-run operation. This hit-and-run operation is also known as the interactive behavior that controls a virtual object to escape the attacked state, and can also be called an "escape flash". The aforementioned behavior termination operation refers to a virtual object being able to terminate its current behavior through a behavior termination operation. This behavior termination operation is also known as the interactive behavior that controls a virtual object to terminate the attacked state, and can also be called a "forced cancellation".

[0252] Figure 16 shows a diagram of a game interface provided in an exemplary embodiment of this application. The game interface allows for actions such as normal attacks, defense, skill activation, rapid movement, being hit and disengaging, and action termination.

[0253] As shown in Figure 16, the game interface provides a normal attack button 40, a defense button 41, a first skill release button 42, a second skill release button 43, a third skill release button 44, a fast movement button 45, a control button 46, a fourth skill release button 47, and a mode switch button 48.

[0254] The standard attack button 40 is used to perform a standard attack, the defense button 41 is used to perform a defense, and the quick movement button 45 is used to perform a quick movement. The mode switch button 48 is used to switch between enemy lock modes, which include free mode, smart mode, and lock-on mode.

[0255] The four skill release buttons 42, 43, 44, and 47 are used to release different skills. Specifically, buttons 42 and 43 release regular skills, while button 44 releases special skills. For example, the skills released by buttons 42, 43, and 44 are inherent skills of the virtual object itself. Button 47 releases a skill configured before the game starts; players can freely configure which skills to use. The skill released by button 47 can be either a regular or a special skill. Control button 46 is used to perform a hit-and-run or action termination operation. When the virtual object is under attack, clicking control button 46 controls the virtual object to break free from attack. When the virtual object is in an attack state, clicking control button 46 controls the virtual object to terminate its current attack.

[0256] The game interface also displays the aforementioned first, second, and third attribute values. For example, the first attribute is energy, the second is stamina, and the third is health. As shown in Figure 16, the game interface displays the energy value of the player's virtual character (49) and the energy value of the enemy's virtual character (30). The player's energy value (49) is displayed on the border of the player's virtual character's portrait, and the enemy's energy value (30) is displayed on the border of the enemy's virtual character's portrait. Both energy values ​​(49 and 30) are displayed as energy bars. The game interface also displays the health value of the player's virtual character (31) and the enemy's virtual character (32), displayed as health bars. Finally, the game interface displays the stamina value of the player's virtual character (33) and the enemy's virtual character (34), displayed as squares.

[0257] In Figure 16, the player's virtual object's health value of 33 is displayed in the lower right corner of the player's virtual object's health bar. In another implementation, as shown in Figure 17, the player's virtual object's health value of 33 can also be displayed in the lower center of the game interface. The display position of the player's virtual object's health value of 33 can be customized by performing user actions.

[0258] As shown in Figure 16, the game interface displays the nine function buttons mentioned above during normal gameplay. In the practice arena, in addition to these nine function buttons, as shown in Figure 18, the game interface also displays a configuration button 35 and a reset button 36. The configuration button 35 is used to configure resource data in the practice arena, such as the virtual objects used in practice and whether to enable the unlimited firepower function. The reset button 36 is used to reset the resource data configured in the practice arena to its initial values.

[0259] Figure 19 is a schematic diagram of a character locking device in a three-dimensional virtual environment provided in an exemplary embodiment of this application. As shown in Figure 19, the device includes:

[0260] Display module 1520 is used to display the main character and at least one enemy character located in a three-dimensional virtual environment;

[0261] The intelligent mode module 1540 is used to lock the first enemy character as the primary attack target of the main control character when the first enemy character meets the locking conditions.

[0262] The intelligent mode module 1540 is used to switch the lock on a second enemy character as the primary attack target of the main control character, based on the combat interaction of the main control character, during the process of locking onto the first enemy character.

[0263] In some embodiments, the intelligent mode module 1540 is configured to, during the process of locking the first enemy character, lock the second enemy character as the priority attack target of the main control character if the attack of the main control character hits the second enemy character; or, during the process of locking the first enemy character, lock the second enemy character as the priority attack target of the main control character if the attack of the second enemy character hits the main control character.

[0264] In some embodiments, the intelligent mode module 1540 is configured to receive an attack initiation operation for controlling the master control character during the process of locking the first enemy character; control the master control character to launch an attack on the second enemy character when the distance between the first enemy character and the master control character is greater than a first threshold and the distance between the second enemy character and the master control character is less than a second threshold; and lock the second enemy character as the master control character's priority attack target when the master control character's attack hits the second enemy character.

[0265] In some embodiments, the intelligent mode module 1540 is used to control the main control character to move in the three-dimensional virtual environment during the process of locking the first enemy character, the activity including at least one of moving, launching an attack, and observing; and if the main control character is hit by an attack from the second enemy character during the activity, the second enemy character is locked as the main control character's priority attack target.

[0266] In some embodiments, the intelligent mode module 1540 is configured to control the first enemy character to always remain in the main control view screen when the first enemy character is locked and no control operation is received for the main control character; wherein the main control view screen is a view screen presented from the third-person perspective of the main control character.

[0267] In some embodiments, the intelligent mode module 1540 is configured to control the main control character to move in the three-dimensional virtual environment when a movement operation is received for the main control character during the process of the first enemy character being locked; and to control the first enemy character to always remain in the main control's field of view during the movement of the main control character.

[0268] The main control view is a view presented from the third-person perspective of the main control character.

[0269] In some embodiments, the intelligent mode module 1540 is configured to, during the process of locking the first enemy character, if a third enemy character launches an attack on the main control character, switch the third enemy character to be in the main control's field of view; and if the attack of the third enemy character fails to hit the main control character, switch the first enemy character back to be in the main control's field of view.

[0270] The main control view is a view presented from the third-person perspective of the main control character.

[0271] In some embodiments, the locking condition includes at least one of the following:

[0272] The first enemy character is the enemy character with the highest priority within the first search range;

[0273] The first enemy character is the enemy character indicated by the manual lock-on operation;

[0274] The first enemy character is the enemy character who most recently had a combat interaction with the main character.

[0275] In some embodiments, the device further includes: a mode switching module 1530, configured to switch the enemy-locking mode to a locked mode in response to a first switching operation for the enemy-locking mode, wherein the locked mode is an enemy-locking mode that keeps the locked enemy character unchanged; to switch the enemy-locking mode to a free mode in response to a second switching operation for the enemy-locking mode, wherein the free mode is an enemy-locking mode that does not lock enemy characters; and to switch the enemy-locking mode to an intelligent mode in response to a third switching operation for the enemy-locking mode.

[0276] In some embodiments, the apparatus further includes a lock-on mode module 1560. The lock-on mode module 1560 is configured to, in the lock-on mode, in response to a manual lock-on operation targeting a fourth enemy character, lock the fourth enemy character as the primary attack target of the controlling character; and, unless exceptional conditions are met, maintain the lock that the fourth enemy character is the primary attack target of the controlling character.

[0277] The exception conditions include at least one of the following: the fourth enemy character dies, the fourth enemy character disappears, or a manual lock-on operation is received for the fifth enemy character.

[0278] In some embodiments, the pre-lock enemy module 1550 is used to rotate and update the screen content in the main control view screen in response to a view rotation operation for the main control view screen; during the rotation and update of the screen content, a pre-lock enemy character is selected in the main control view screen based on the orientation of the main control character.

[0279] In some embodiments, the pre-lock enemy module 1550 is used to select the enemy character with the smallest angle between the main control view screen and the orientation of the main control character as the pre-lock enemy character during the rotation update process of the screen content.

[0280] In some embodiments, the pre-lock enemy module 1550 is used to select the enemy character with the smallest angle between the main control field of view and the detection direction as the pre-lock enemy character during the rotation update process of the screen content.

[0281] The detection orientation is located on the first side of the orientation of the main control character, and there is a target angle between the first side and the orientation of the main control character. The first side is determined based on the rotation direction, and the target angle is related to the rotation speed of the field of view rotation operation instruction.

[0282] In some embodiments, the pre-lock enemy module 1550 is used to correct the orientation of the main control character to the direction where the pre-lock enemy character is located.

[0283] In some embodiments, the rotation update speed of the screen content is positively correlated with the rotation speed of the field of view rotation operation indicator in a non-linear manner.

[0284] In some embodiments, the apparatus further includes a free mode module 1580. The free mode module 1580 is configured to, in the free mode, receive an attack initiation operation to control the master character; in response to the attack initiation operation and an enemy character with the highest priority within a first search range, control the master character to launch an attack against the enemy character with the highest priority; and in response to the attack initiation operation and no enemy character with the highest priority within the first search range, control the master character to launch an attack in a facing direction.

[0285] In some embodiments, the free mode module 1580 is configured to determine, within a first duration, that the second enemy character is the attack target of the main control character when the main control character's attack hits the second enemy character or is hit by the attack of the second enemy character in the free mode.

[0286] In some embodiments, the free mode module 1580 is used to keep the second enemy character in the main control view when it is determined that the second enemy character is the attack target of the main control character; wherein the main control view is a view presented from the third-person perspective of the main control character.

[0287] In some embodiments, the free mode module 1580 is configured to rotate and update the content of the main control view in response to a view rotation operation on the main control view; during the rotation and update of the content, a potential attacking character is selected in the main control view based on the orientation of the main control character; and in response to the end of the view rotation operation, the potential attacking character is kept in the main control view for a second duration.

[0288] The main control view is a view presented from the third-person perspective of the main control character.

[0289] In some embodiments, the free mode module 1580 is configured to control the main control character to move in the three-dimensional virtual environment in response to a movement operation on the main control character; during the movement of the main control character, the horizontal viewing direction of the main control view screen is controlled to move towards the direction of movement of the main control character, and the vertical viewing direction of the main control view screen is controlled to move towards a preset direction; wherein, the main control view screen is a view screen presented from the third-person perspective of the main control character.

[0290] In some embodiments, the first search range is the first search range containing an enemy character, determined in priority order among at least two search ranges.

[0291] The at least two search ranges include at least two of the following: a first sector area, a second sector area, a first circular area, a third sector area, and a second circular area;

[0292] The first sector-shaped region is a sector-shaped region with the orientation of the main control character as the central axis, having a first included angle and a first radius;

[0293] The second sector-shaped region is a sector-shaped region with the orientation of the main control character as the central axis, and has a second included angle and a second radius;

[0294] The first circular region is a circular region with a third radius centered on the orientation of the main control character;

[0295] The third sector area is a sector area with a third included angle and a fourth radius, with the orientation of the main control character as the central axis;

[0296] The second circular region is a circular region with a fifth radius, centered on the orientation of the main control character.

[0297] Wherein, the first radius is greater than the fourth radius, the fourth radius is greater than the second radius, the fifth radius is greater than the third radius, the third included angle is greater than the second included angle, and the second included angle is greater than the first included angle.

[0298] In some embodiments, the priority of the first sector region is greater than the priority of the second sector region, the priority of the second sector region is greater than the priority of the first circular region, the priority of the first circular region is greater than the priority of the third sector region, and the priority of the third sector region is greater than the priority of the second circular region.

[0299] In some embodiments, the enemy character with the highest priority includes:

[0300] The enemy character with the smallest facing angle to the main character within the first search range;

[0301] The enemy character with the highest preset priority within the first search range, where the preset priority is a priority pre-configured for the enemy character.

[0302] It should be noted that the above-mentioned intelligent mode module is used to implement the functions, logic or steps related to intelligent mode in the above method embodiments; the above-mentioned locked mode module is used to implement the functions, logic or steps related to locked mode in the above method embodiments; and the above-mentioned free mode module is used to implement the functions, logic or steps related to free mode in the above method embodiments.

[0303] Figure 20 is a schematic diagram of a character locking device in a three-dimensional virtual environment provided in an exemplary embodiment of this application. As shown in Figure 20, the device includes:

[0304] Display module 1520 is used to display the main control character and at least one enemy character located in a three-dimensional virtual environment, wherein the main control character is in a first enemy-locking mode;

[0305] The mode switching module 1530 is used to receive switching operations for the enemy lock mode;

[0306] The mode switching module 1530 is used to switch the enemy-locking mode of the main control character from the first enemy-locking mode to the second enemy-locking mode in response to the switching operation.

[0307] Among them, the first enemy-locking mode and the second enemy-locking mode are two different enemy-locking modes among free mode, smart mode and locked mode. The free mode is an enemy-locking mode that does not lock the enemy character. The smart enemy-locking mode is an enemy-locking mode that automatically switches the locked enemy character according to the combat interaction of the main character. The locked mode is an enemy-locking mode that keeps the locked enemy character unchanged.

[0308] Referring to Figure 19, the device further includes at least two of the following: an intelligent mode module, a locked mode module, and a free mode module. The intelligent mode module is used to implement functions, logic, or steps related to the intelligent mode in the above method embodiments; the locked mode module is used to implement functions, logic, or steps related to the locked mode in the above method embodiments; and the free mode module is used to implement functions, logic, or steps related to the free mode in the above method embodiments.

[0309] It should be noted that the character locking device in the three-dimensional virtual environment provided in the above embodiments is only an example of the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the character locking device in the three-dimensional virtual environment provided in the above embodiments and the character locking method embodiments in the three-dimensional virtual environment belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0310] Embodiments of this application also provide a computer device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, code set, or instruction set. The at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the role locking method in the three-dimensional virtual environment provided in the above-described method embodiments.

[0311] For example, Figure 21 is a schematic diagram of the structure of a terminal provided in an exemplary embodiment of this application.

[0312] Typically, terminal 1700 includes a processor 1701 and a memory 1702.

[0313] The processor 1701 may include one or more processing cores, such as a 4-core processor or an 8-core processor.

[0314] Memory 1702 may include one or more computer-readable storage media, which may be non-transitory. Memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in memory 1702 is used to store at least one instruction, which is executed by processor 1701 to implement the role locking method in a three-dimensional virtual environment provided in the method embodiments of this application.

[0315] In some embodiments, the terminal 1700 may also optionally include a peripheral device interface 1703 and at least one peripheral device. The processor 1701, memory 1702, and peripheral device interface 1703 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707, and a power supply 1708.

[0316] Peripheral interface 1703 can be used to connect at least one peripheral device associated with I / O (Input / Output) to processor 1701 and memory 1702.

[0317] The RF circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals.

[0318] Display screen 1705 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof.

[0319] The camera assembly 1706 is used to capture images or videos. Optionally, the camera assembly 1706 includes a front-facing camera and a rear-facing camera.

[0320] The audio circuit 1707 may include a microphone and a speaker.

[0321] Power supply 1708 is used to supply power to the various components in terminal 1700.

[0322] In some embodiments, the terminal 1700 further includes one or more sensors 1709. The one or more sensors 1709 include, but are not limited to: an accelerometer 1710, a gyroscope 1711, a pressure sensor 1712, an optical sensor 1713, and a proximity sensor 1717.

[0323] Those skilled in the art will understand that the structure shown in FIG17 does not constitute a limitation on the terminal 1700, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0324] This application also provides a computer-readable storage medium storing at least one computer program, which, when loaded and executed by the processor of a computer device, implements the role locking method in the three-dimensional virtual environment provided in the above-described method embodiments.

[0325] This application also provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of a computer device reads the computer program from the computer-readable storage medium and executes the computer program, causing the computer device to perform the role-locking method in a three-dimensional virtual environment provided in the above-described method embodiments.

[0326] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0327] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for locking a character in a three-dimensional virtual environment, the method being executed by a computer device, the method comprising: Display the main character and at least one enemy character located in a three-dimensional virtual environment; If the first enemy character meets the locking conditions, the first enemy character is locked as the primary attack target of the main control character; During the process of locking onto the first enemy character, the main control character may switch to locking onto the second enemy character as the main control character's priority attack target, based on the combat interaction situation.

2. The method according to claim 1, wherein during the process of locking onto the first enemy character, switching the lock onto the second enemy character as the primary attack target of the primary control character based on the combat interaction of the primary control character includes: During the process of locking onto the first enemy character, if the attack of the main control character hits the second enemy character, locking onto the second enemy character becomes the primary attack target of the main control character. or, If the main character is hit by an attack from the second enemy character while the first enemy character is being locked on, the second enemy character becomes the main character's priority target.

3. The method according to claim 2, wherein during the process of locking onto the first enemy character, if the attack of the main control character hits the second enemy character, locking onto the second enemy character as the primary attack target of the main control character includes: During the process of locking onto the first enemy character, an attack initiation operation is received to control the main control character; If the distance between the first enemy character and the main control character is greater than a first threshold and the distance between the second enemy character and the main control character is less than a second threshold, control the main control character to launch an attack on the second enemy character; If the main character's attack hits the second enemy character, the second enemy character is locked as the main character's priority target.

4. The method according to claim 2, wherein during the process of locking onto the first enemy character, if the main control character is hit by an attack from the second enemy character, locking onto the second enemy character as the primary attack target of the main control character includes: During the process of locking onto the first enemy character, the main character is controlled to move in the three-dimensional virtual environment, and the activity includes at least one of moving, launching an attack, and observing; If the main character is hit by an attack from the second enemy character during the activity, the second enemy character will be locked as the main character's priority target.

5. The method according to any one of claims 1 to 4, further comprising: During the process of locking onto the first enemy character, if no control operation is received for the main control character, the first enemy character is kept in the main control's field of view at all times; The main control view is a view presented from the third-person perspective of the main control character.

6. The method according to any one of claims 1 to 4, further comprising: During the process of locking onto the first enemy character, upon receiving a movement command for the main control character, the main control character is controlled to move within the three-dimensional virtual environment; During the movement of the main control character, the first enemy character is kept in the main control's field of view at all times; The main control view is a view presented from the third-person perspective of the main control character.

7. The method according to any one of claims 1 to 4, further comprising: If a third enemy character attacks the main control character while the first enemy character is locked on, the third enemy character will be switched to be in the main control's field of view. If the third enemy character's attack misses the main control character, the first enemy character is switched back into the main control character's field of view. The main control view is a view presented from the third-person perspective of the main control character.

8. The method according to any one of claims 1 to 7, wherein the locking condition includes at least one of the following: The first enemy character is the enemy character with the highest priority within the first search range; The first enemy character is the enemy character indicated by the manual lock-on operation; The first enemy character is the enemy character who most recently had a combat interaction with the main character.

9. The method according to any one of claims 1 to 8, wherein the method further comprises at least one of the following: In response to a first switching operation for the enemy lock mode, the enemy lock mode is switched to a lock mode, which is an enemy lock mode that keeps the locked enemy character unchanged; In response to a second switching operation for the enemy-locking mode, the enemy-locking mode is switched to a free mode, the free mode being an enemy-locking mode that does not lock onto enemy characters.

10. The method according to claim 9, further comprising: In the lock-on mode, in response to a manual lock-on operation targeting a fourth enemy character, the fourth enemy character is locked as the primary attack target of the main control character; Unless the exceptional conditions are met, the fourth enemy character remains the primary target of the controlling character's attack. The exception conditions include at least one of the following: the fourth enemy character dies, the fourth enemy character disappears, or a manual lock-on operation is received for the fifth enemy character.

11. The method according to claim 8 or 10, further comprising: In response to a view rotation operation on the main control view screen, the screen content in the main control view screen is rotated and updated. During the rotation and update of the screen content, a pre-locked enemy character is selected in the main control view based on the orientation of the main control character.

12. The method according to claim 11, wherein during the rotation update of the screen content, selecting a pre-locked enemy character in the main control view based on the orientation of the main control character includes: During the rotation and update of the screen content, the enemy character with the smallest angle between itself and the orientation of the main control character in the main control field of view is selected as the pre-locked enemy character.

13. The method according to claim 11, wherein during the rotation update of the screen content, selecting a pre-locked enemy character based on the orientation of the main control character in the main control field of view includes: During the rotation and update of the screen content, the enemy character with the smallest angle between the main control view and the detection direction is selected as the pre-locked enemy character. The detection orientation is located on the first side of the orientation of the main control character, and there is a target angle between the first side and the orientation of the main control character. The first side is determined based on the rotation direction, and the target angle is related to the rotation speed of the field of view rotation operation instruction.

14. The method according to claim 11, further comprising: The orientation of the main character is corrected to the direction of the pre-locked enemy character.

15. The method according to any one of claims 11 to 14, wherein the rotation update speed of the screen content is positively correlated with the rotation speed of the field of view rotation operation indication in a non-linear manner.

16. The method according to any one of claims 1 to 15, further comprising: In free mode, the system receives an attack command to control the main character. Free mode is a lock-on mode that does not lock onto enemy characters. In response to the attack initiation operation and the enemy character with the highest priority within the first search range, the main control character is controlled to launch an attack on the enemy character with the highest priority; In response to the attack initiation operation and the absence of an enemy character with the highest priority within the first search range, the main control character is controlled to launch an attack in the direction it is facing.

17. The method according to claim 16, further comprising: In the free mode, if the main character's attack hits the second enemy character or is hit by the second enemy character's attack, the second enemy character is determined to be the main character's attack target within a first time period.

18. The method according to claim 17, further comprising: If it is determined that the second enemy character is the target of the main control character's attack, keep the second enemy character in the main control's field of view; The main control view is a view presented from the third-person perspective of the main control character.

19. The method according to claim 8 or 16, wherein the first search range is the first search range containing an enemy character, determined in priority order from at least two search ranges; The at least two search ranges include at least two of the following: a first sector area, a second sector area, a first circular area, a third sector area, and a second circular area; The first sector-shaped region is a sector-shaped region with the orientation of the main control character as the central axis, having a first included angle and a first radius; The second sector-shaped region is a sector-shaped region with the orientation of the main control character as the central axis, and has a second included angle and a second radius; The first circular region is a circular region with a third radius centered on the orientation of the main control character; The third sector area is a sector area with a third included angle and a fourth radius, with the orientation of the main control character as the central axis; The second circular region is a circular region with a fifth radius, centered on the orientation of the main control character; Wherein, the first radius is greater than the fourth radius, the fourth radius is greater than the second radius, the fifth radius is greater than the third radius, the third included angle is greater than the second included angle, and the second included angle is greater than the first included angle.

20. A method for locking a character in a three-dimensional virtual environment, the method comprising: Displays a main character and at least one enemy character in a three-dimensional virtual environment, with the main character in a first enemy-locking mode; Receive switching commands for target lock mode; In response to the switching operation, the enemy-locking mode of the main control character is switched from the first enemy-locking mode to the second enemy-locking mode; Among them, the first enemy-locking mode and the second enemy-locking mode are two different enemy-locking modes among free mode, smart mode and locked mode. The free mode is an enemy-locking mode that does not lock the enemy character. The smart enemy-locking mode is an enemy-locking mode that automatically switches the locked enemy character according to the combat interaction of the main character. The locked mode is an enemy-locking mode that keeps the locked enemy character unchanged.

21. A character locking device in a three-dimensional virtual environment, the device comprising: The display module is used to display the main character and at least one enemy character located in the three-dimensional virtual environment; The intelligent mode module is used to lock the first enemy character as the primary attack target of the main control character when the first enemy character meets the locking conditions. The intelligent mode module is used to switch the lock on a second enemy character as the primary attack target of the main control character, based on the combat interaction of the main control character, while the first enemy character is locked on.

22. A character locking device in a three-dimensional virtual environment, the device comprising: The display module is used to display the main control character and at least one enemy character located in a three-dimensional virtual environment, wherein the main control character is in a first enemy-locking mode; The mode switching module is used to receive switching operations for the enemy lock mode; The mode switching module is used to switch the enemy-locking mode of the main control character from the first enemy-locking mode to the second enemy-locking mode in response to the switching operation; Among them, the first enemy-locking mode and the second enemy-locking mode are two different enemy-locking modes among free mode, smart mode and locked mode. The free mode is an enemy-locking mode that does not lock the enemy character. The smart enemy-locking mode is an enemy-locking mode that automatically switches the locked enemy character according to the combat interaction of the main character. The locked mode is an enemy-locking mode that keeps the locked enemy character unchanged.

23. A computer device comprising a processor and a memory, the memory storing at least one computer program, the at least one computer program being loaded and executed by the processor to implement the character locking method in a three-dimensional virtual environment as described in any one of claims 1 to 20.

24. A computer-readable storage medium storing at least one computer program, the at least one computer program being loaded and executed by a processor to implement the character locking method in a three-dimensional virtual environment as described in any one of claims 1 to 20.

25. A computer program product comprising a computer program stored in a computer-readable storage medium, wherein a processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program such that the computer device performs a character locking method in a three-dimensional virtual environment as described in any one of claims 1 to 20.