Virtual role control method and device, storage medium and electronic device

CN117085316BActive Publication Date: 2026-09-22TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210504392.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-10
Publication Date
2026-09-22
Estimated Expiration
2042-05-10

AI Technical Summary

Technical Problem

[0005]本申请实施例提供了一种虚拟角色的控制方法和装置、存储介质及电子设备,以至少解决虚拟角色的射击效果不真实,射击轨迹单一的技术问题

Benefits of technology

[0020]在本申请实施例中,采用显示虚拟场景以及位于虚拟场景中的第一虚拟角色和第二虚拟角色,其中,第一虚拟角色是非玩家控制的虚拟角色,第二虚拟角色是与第一虚拟角色处于不同阵营的虚拟角色,在检测到第二虚拟角色的目标部位位于第一虚拟角色的视野内、且目标部位被确定为待执行射击操作的部位的情况下,控制第一虚拟角色对第二虚拟角色中的第一区域执行第一射击操作,其中,目标部位所在的区域被划分成多个区域,多个区域包括第一区域,在执行完第一射击操作之后检测到目标部位位于第一虚拟角色的视野内、且目标部位被确定为待执行射击操作的部位的情况下,控制第一虚拟角色对第二虚拟角色中的第二区域执行第二射击操作,其中,第二区域是根据预设的第一概率矩阵在多个区域中确定出的区域,第一概率矩阵包括从第一区域向第一组方向中的各个方向偏移的概率的方式,通过在第一虚拟角色向第二虚拟角色发起连续射击操作的过程中,每次射击的预期位置都只与前一次射击的实际位置相关,通过第一概率矩阵调整每次射击的预期位置,达到了使得虚拟角色的射击过程更加贴合玩家操作的目的,从而实现了使虚拟角色的射击效果更加真实,丰富了虚拟角色的射击轨迹的技术效果,进而解决了虚拟角色的射击效果不真实,射击轨迹单一的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117085316B_ABST
    Figure CN117085316B_ABST
Patent Text Reader

Abstract

The application discloses a virtual role control method and device, a storage medium and an electronic device. The method comprises the following steps: displaying a virtual scene and a first virtual role and a second virtual role in the virtual scene; in the case that a target part of the second virtual role is located in the visual field of the first virtual role and the target part is determined as a part to be executed by a shooting operation, controlling the first virtual role to execute a first shooting operation on a first region in the second virtual role; and in the case that the target part is located in the visual field of the first virtual role and the target part is determined as a part to be executed by a shooting operation after the first shooting operation is executed, controlling the first virtual role to execute a second shooting operation on a second region in the second virtual role. The application solves the technical problems of unrealistic shooting effect of a virtual role and single shooting track.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for controlling a virtual character, a storage medium, and an electronic device. Background Technology

[0002] In related technologies, when a virtual character controlled by a system performs a shooting operation, it typically detects the center of the target virtual character. When the center of the target virtual character is detected, it initiates continuous shooting operations towards the center of the target virtual character.

[0003] During the aforementioned continuous shooting operation, players can easily determine that the virtual character performing the shooting operation is a system-controlled virtual character. This results in the shooting effect of the system-controlled virtual character being unrealistic, leading to a low sense of presence for this type of virtual character and a poor player experience.

[0004] There is currently no effective solution to the above problems. Summary of the Invention

[0005] This application provides a method and apparatus for controlling virtual characters, a storage medium, and an electronic device to at least solve the technical problems of unrealistic shooting effects and monotonous shooting trajectories of virtual characters.

[0006] According to one aspect of the embodiments of this application, a method for controlling a virtual character is provided, comprising: displaying a virtual scene and a first virtual character and a second virtual character located in the virtual scene, wherein the first virtual character is a non-player-controlled virtual character, and the second virtual character is a virtual character belonging to a different faction than the first virtual character; when a target part of the second virtual character is detected to be within the field of view of the first virtual character and the target part is determined to be a part to be shot, controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, wherein the area where the target part is located is divided into multiple areas, the multiple areas including the first area; after performing the first shooting operation, when the target part is detected to be within the field of view of the first virtual character and the target part is determined to be a part to be shot, controlling the first virtual character to perform a second shooting operation on a second area of ​​the second virtual character, wherein the second area is an area determined from the multiple areas according to a preset first probability matrix, the first probability matrix including the probability of offset from the first area to each direction in a first group of directions.

[0007] According to another aspect of the embodiments of this application, a control device for a virtual character is also provided, comprising: a display module for displaying a virtual scene and a first virtual character and a second virtual character located in the virtual scene, wherein the first virtual character is a non-player-controlled virtual character, and the second virtual character is a virtual character belonging to a different faction than the first virtual character; a first control module for controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character when a target part of the second virtual character is detected to be within the field of vision of the first virtual character and the target part is determined to be a part to be shot, wherein the area where the target part is located is divided into multiple areas, the multiple areas including the first area; and a second control module for controlling the first virtual character to perform a second shooting operation on a second area of ​​the second virtual character after the first shooting operation is performed, wherein the second area is an area determined from the multiple areas according to a preset first probability matrix, the first probability matrix including the probability of offset from the first area to each direction in a first group of directions.

[0008] Optionally, the device is further configured to: before controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, detect whether multiple parts of the second virtual character are within the field of vision of the first virtual character, wherein the second virtual character is divided into the multiple parts, the multiple parts including the target part; if a part is detected within the field of vision of the first virtual character, determine the target part among the parts within the field of vision of the first virtual character as the part to be shot.

[0009] Optionally, the device is configured to detect whether multiple parts of the second virtual character are within the field of view of the first virtual character by: sequentially detecting whether the multiple parts are within the field of view of the first virtual character in a polling manner; the device is configured to determine the target part among the parts within the field of view of the first virtual character as the part to be shot when a part is detected within the field of view of the first virtual character by: during the polling process, determining the first detected part within the field of view of the first virtual character as the target part, and determining the target part as the part to be shot.

[0010] Optionally, the device is further configured to: before controlling the first virtual character to perform a first shooting operation on a first area in the second virtual character, if the target part is being determined for the first time as the part to be shot, randomly select one area from the plurality of areas as the first area; if the target part is not being determined for the first time as the part to be shot, determine the first area from the plurality of areas according to a preset second probability matrix, wherein the second probability matrix includes the probability of shifting from a third area to each direction in a second group of directions, and the third area is the area in the plurality of areas where a shooting operation was performed when the target part was previously determined to be the part to be shot.

[0011] Optionally, the device is further configured to: before controlling the first virtual character to perform a second shooting operation on a second region in the second virtual character, determine a candidate region offset from the first region to a first direction according to a preset first probability matrix, and determine the second region according to the candidate region, wherein the first set of directions includes the first direction; or, if the first probability matrix further includes the probability of keeping the first region unchanged, determine the candidate region according to the preset first probability matrix, wherein the candidate region is the first region, or is a region offset from the first region to the first direction; if the candidate region is the first region, determine the second region as the first region; if the candidate region is a region offset from the first region to the first direction, determine the second region according to the candidate region.

[0012] Optionally, the device is configured to determine the second region based on the candidate region in the following manner: if the candidate region is located outside the region where the second virtual character is located, the second region is determined as the first region.

[0013] Optionally, the device is configured to determine the second region based on the candidate region in the following manner: if the candidate region is located within the region where the target part is located, the second region is determined as the candidate region; if the candidate region is located outside the region where the target part is located but within the region where a part adjacent to the target part is located, it is determined whether the part adjacent to the target part is within the field of view of the first virtual character, wherein the second virtual character is divided into multiple parts, the multiple parts including the target part and the parts adjacent to the target part; if the part adjacent to the target part is within the field of view of the first virtual character, the second region is determined as the candidate region; if the part adjacent to the target part is not within the field of view of the first virtual character, the second region is determined as the first region.

[0014] Optionally, the device is configured to determine a candidate region offset from the first region to a first direction according to a preset first probability matrix in the following manner: determining the candidate region offset from the first region to the first direction according to the first probability matrix, wherein the first probability matrix includes a first subgroup probability corresponding to a first subgroup direction and a second subgroup probability corresponding to a second subgroup direction, the first subgroup direction includes the first subgroup direction and the second subgroup direction, the region offset from the first region to the first subgroup direction is the first subgroup region, the region offset from the first region to the second subgroup direction is the second subgroup region, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region, and the probability in the first subgroup probability is greater than the probability in the second subgroup probability.

[0015] Optionally, the device is configured to determine a candidate region according to a preset first probability matrix in the following manner, provided that the first probability matrix also includes a probability of keeping the first region unchanged: The candidate region is determined according to the first probability matrix, wherein the first probability matrix includes a first subgroup probability corresponding to a first subgroup direction and a second subgroup probability corresponding to a second subgroup direction, the first subgroup direction includes the first subgroup direction and the second subgroup direction, the region obtained by shifting from the first region to the first subgroup direction is the first subgroup region, the region obtained by shifting from the first region to the second subgroup direction is the second subgroup region, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region, the probability in the first subgroup probability is greater than the probability in the second subgroup probability, and the probability of keeping the first region unchanged is greater than the probability in the first subgroup probability.

[0016] Optionally, the device is further configured to: before controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, in the case that the virtual scene includes multiple virtual characters of different factions from the first virtual character and all of the multiple virtual characters are within the field of vision of the first virtual character, determine the virtual character closest to the first virtual character among the multiple virtual characters as the second virtual character; the device is further configured to: after controlling the first virtual character to perform a second shooting operation on a second area of ​​the second virtual character, in the case that the virtual character closest to the first virtual character among the multiple virtual characters changes from the second virtual character to the third virtual character, detect whether the target part of the third virtual character is within the field of vision of the first virtual character; if the target part of the third virtual character is within the field of vision of the first virtual character and is determined to be the part to be shot, control the first virtual character to perform a third shooting operation on the second area of ​​the third virtual character, or control the first virtual character to perform the third shooting operation on a fourth area of ​​the third virtual character, wherein the fourth area is an area determined in the multiple areas according to a preset third probability matrix, the third probability matrix including the probability of shifting from the second area to each direction in a third group of directions.

[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the control method of the virtual character at runtime.

[0018] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the virtual character control method described above.

[0019] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described virtual character control method through the computer program.

[0020] In this embodiment, a virtual scene is displayed, along with a first virtual character and a second virtual character located within the virtual scene. The first virtual character is a non-player-controlled virtual character, and the second virtual character is a virtual character belonging to a different faction than the first virtual character. When a target part of the second virtual character is detected to be within the field of view of the first virtual character, and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a first shooting operation on a first area within the second virtual character. The area containing the target part is divided into multiple areas, including the first area. After the first shooting operation is performed, if a target part is detected to be within the field of view of the first virtual character, and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a first shooting operation on a first area within the second virtual character. A virtual character performs a second shooting operation on a second region of a second virtual character. The second region is determined from multiple regions according to a preset first probability matrix. The first probability matrix includes the probability of offset from the first region to each direction in a first group of directions. By continuously shooting at the second virtual character from the first virtual character, the expected position of each shot is only related to the actual position of the previous shot. By adjusting the expected position of each shot through the first probability matrix, the shooting process of the virtual character is made more in line with the player's operation, thereby making the shooting effect of the virtual character more realistic, enriching the technical effect of the shooting trajectory of the virtual character, and thus solving the technical problems of unrealistic shooting effect and monotonous shooting trajectory of the virtual character.

[0021] Furthermore, by dividing the second virtual character to be shot into multiple parts, the system avoids shooting only at the center of the virtual character, thereby increasing the hit rate of shooting operations performed by the system-controlled virtual character and optimizing the player's gaming experience.

[0022] Meanwhile, different probability matrices are configured for different areas, making the system-controlled virtual characters more human-like. When the number of players is small, adding these system-controlled virtual characters allows for the faster creation of a game that meets the required number of players, without affecting the experience of the players participating in that game. Attached Figure Description

[0023] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0024] Figure 1 This is a schematic diagram of an application environment for an optional virtual character control method according to an embodiment of this application;

[0025] Figure 2 This is a flowchart illustrating an optional virtual character control method according to an embodiment of this application;

[0026] Figure 3 This is a schematic diagram of an optional virtual character control method according to an embodiment of this application;

[0027] Figure 4 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0028] Figure 5 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0029] Figure 6 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0030] Figure 7 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0031] Figure 8 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0032] Figure 9 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0033] Figure 10 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0034] Figure 11 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0035] Figure 12 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0036] Figure 13 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0037] Figure 14 This is a schematic diagram of another optional virtual character control method according to an embodiment of this application;

[0038] Figure 15 This is a schematic diagram of the structure of an optional virtual character control device according to an embodiment of this application;

[0039] Figure 16 This is a schematic diagram of the structure of an optional virtual character control product according to an embodiment of this application;

[0040] Figure 17 This is a schematic diagram of the structure of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0041] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0042] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0043] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0044] A Markov chain, also known as a discrete-time Markov chain (DTMC), is a stochastic process in a state space that transitions from one state to another. This process requires the property of "memorylessness": the probability distribution of the next state is determined solely by the current state, and events preceding it in the time series are irrelevant. This specific type of "memorylessness" is called the Markov property. Markov chains have many applications as statistical models of real-world processes.

[0045] Visibility determination: Starting from the AI's (Artificial Intelligence) eye position, a ray is emitted towards the target point. If the ray does not touch any object other than the AI ​​and the target, the AI ​​is considered to be directly visible to the target; otherwise, the AI ​​is considered to be invisible to the object.

[0046] The present application will be described below with reference to embodiments:

[0047] According to one aspect of the embodiments of this application, a method for controlling a virtual character is provided. Optionally, in this embodiment, the above-mentioned method for controlling a virtual character can be applied to, for example... Figure 1 The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1 As shown, server 101 is connected to terminal 103 via a network and can be used to provide services for terminal devices or applications installed on terminal devices. Applications can be video applications, instant messaging applications, browser applications, educational applications, game applications, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a game data storage server. The network can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). The wireless network includes Bluetooth, Wi-Fi, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with an application, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, PDAs, MIDs (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, and other computer devices. The server can be a single server, a server cluster consisting of multiple servers, or a cloud server. The application 107 using the virtual character control method described above is displayed through terminal device 103 or other connected display devices.

[0048] Combination Figure 1 As shown, the control method for the virtual character described above can be implemented in the terminal device 103 through the following steps:

[0049] S1, a virtual scene and a first virtual character and a second virtual character located in the virtual scene are displayed on the terminal device 103, wherein the first virtual character is a virtual character not controlled by the player, and the second virtual character is a virtual character belonging to a different faction from the first virtual character.

[0050] S2, when it is detected that the target part of the second virtual character is within the field of view of the first virtual character and the target part is determined to be the part to be shot, the terminal device 103 controls the first virtual character to perform a first shooting operation on the first area of ​​the second virtual character, wherein the area where the target part is located is divided into multiple areas, and the multiple areas include the first area.

[0051] S3, after the first shooting operation is completed, if the target part is detected to be within the field of view of the first virtual character and the target part is determined to be the part to be shot, the terminal device 103 controls the first virtual character to perform a second shooting operation on the second region of the second virtual character. The second region is a region determined in multiple regions according to a preset first probability matrix. The first probability matrix includes the probability of shifting from the first region to each direction in the first group of directions.

[0052] Optionally, in this embodiment, the above-mentioned method for controlling the virtual character can also be implemented through a server, for example, Figure 1 It is implemented in server 101 shown; or it is implemented jointly by the terminal device and the server.

[0053] The above is merely an example, and this embodiment does not impose any specific limitations.

[0054] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the control methods for the aforementioned virtual characters include:

[0055] S202, displaying a virtual scene and a first virtual character and a second virtual character located in the virtual scene, wherein the first virtual character is a virtual character not controlled by the player, and the second virtual character is a virtual character belonging to a different faction than the first virtual character;

[0056] S204, when it is detected that the target part of the second virtual character is within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a first shooting operation on the first area of ​​the second virtual character, wherein the area where the target part is located is divided into multiple areas, and the multiple areas include the first area;

[0057] S206, after the first shooting operation is completed, if the target part is detected to be within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a second shooting operation on the second region of the second virtual character. The second region is a region determined in multiple regions according to a preset first probability matrix. The first probability matrix includes the probability of shifting from the first region to each direction in the first group of directions.

[0058] Optionally, in the embodiments of this application, the virtual scene mentioned above may include, but is not limited to, the virtual scene of a game application. The game application mentioned above includes, but is not limited to, one or more types of game applications such as MOBA game applications and shooting applications. Among them, MOBA (English full name: Multiplayer Online Battle Arena, abbreviation: MOBA, Chinese translation: multiplayer online tactical competitive game), also known as Action Real-Time Strategy (abbreviation: Action RTS, ARTS) action real-time strategy game, can run on terminal devices (e.g., mobile terminal, PC).

[0059] Optionally, in this embodiment, the virtual scene may include, but is not limited to, MOBA game scenes, shooting game scenes, etc.

[0060] Taking shooting game scenarios as an example, this can include, but is not limited to, all games that use firearms for ranged attacks, such as first-person shooter games and third-person shooter games.

[0061] First-person shooter (FPS) games are a subgenre of action games (ACT). As the name suggests, FPS games are played from the player's subjective perspective.

[0062] Third-person shooter (TPS) games are a type of shooting game, differing from first-person shooters in that the virtual control object operated by the player is visible in the game's interface. The aforementioned games can include, but are not limited to, first-person shooters, third-person shooters, and shooters that can switch between first-person and third-person perspectives. Figure 3 This is a schematic diagram of a virtual character control method according to an embodiment of the present invention, such as... Figure 3As shown, the game display interface can be divided into a first-person view interface 301 and a third-person view interface 303, as well as a display interface that allows switching between first-person and third-person views using a view switching button. The first virtual character 305 is displayed through... Figure 3 The above firing operation is performed in the direction shown 307.

[0063] It should be noted that the commands that trigger the above shooting operation may include, but are not limited to, shooting commands sent by the AI ​​controller of the game application, rather than shooting commands sent by the player.

[0064] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0065] Optionally, in this embodiment, the first virtual character is a non-player-controlled character, which may include, but is not limited to, a virtual character (AIController) preset by the system and controlled by an AI controller. The second virtual character may include, but is not limited to, a virtual character controlled by a player in a game application, such as a virtual character controlled in a first-person or third-person perspective, which can be controlled by virtual buttons to move, shoot, etc., and the aiming direction of the virtual crosshair can be adjusted through interactive operations. It may also include, but is not limited to, other virtual characters other than the first virtual character controlled by the AI ​​controller.

[0066] For example, Figure 4 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 4 As shown, when the AI ​​controls the virtual character to perform shooting operations, it can, but is not limited to, manipulate the AIController through behavior tree logic. A node is added to the behavior tree logic, which is used to interact with the animation logic layer. Before controlling the character through the AIController, the operation that the virtual character is going to perform can be adaptively adjusted in the animation logic layer to execute the corresponding character logic, such as the behavior logic of the virtual character such as "movement", "jump", "single shot", "continuous shot" etc.

[0067] When executing the above-mentioned "continuous shooting" behavior logic, the first virtual character is controlled to continuously shoot at the second virtual character (including but not limited to the above-mentioned first shooting operation and the above-mentioned second shooting operation).

[0068] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0069] Optionally, in this embodiment of the application, the second virtual character may be divided into multiple parts, including but not limited to the left arm, right arm, left leg, right leg, head, chest and abdomen. In the specific division process, it can be configured according to the model type or model size of the second virtual character.

[0070] For example, Figure 5 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 5 As shown, during the firing process, due to the recoil and other factors of the virtual firing device, the crosshair of the virtual firing device will shift slightly with each shot. This shift causes a change in the trajectory of the virtual bullet, resulting in a continuous movement effect in the virtual bullet trajectory formed by continuous firing. Therefore, the hit position of the virtual bullet in this virtual shot is related to the crosshair position of the virtual device in the previous shot. Since the bullets are fired sequentially during the firing process, a discrete Markov chain is used to model the firing process.

[0071] The time it takes to fire a bullet is recorded as a discrete time, and the target position of each bullet is recorded as the bullet's state at that time. The process of shifting the bullet's target position to a new position is defined as a probability transition matrix. In order to achieve the effect of the first virtual character launching a shooting operation at a part visible to the second virtual character, the second virtual character is divided into 6 parts, namely the left arm 502, the right arm 504, the left leg 506, the right leg 508, the left face 510, and the right face 512, so as to facilitate the judgment process for executing subsequent shooting operations.

[0072] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0073] It should be noted that the target part mentioned above may include, but is not limited to, the part within the field of vision of the first virtual character. For example, if there is no obstruction between the first virtual character and the target part, a ray is emitted from the virtual eye position of the first virtual character to the multiple parts of the second virtual character. If the ray does not hit any object other than the first virtual character and the second virtual character, it is considered that the first virtual character is directly visible to the second virtual character; otherwise, it is considered that the first virtual character is not visible to the second virtual character.

[0074] For example, Figure 6 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 6As shown, when it is determined that the first virtual character needs to perform a shooting operation on the second virtual character, the detection ray may be emitted from the virtual eyeball of the first virtual character to the second virtual character, including but not limited to. In the above process, the detection ray may be emitted to each part of the second virtual character at the same time, or the detection ray may be emitted from one of the multiple parts randomly, or the detection ray may be emitted from the multiple parts one by one according to a preset order.

[0075] During the aforementioned detection process, the detection rays emitted from parts 602 and 604 can reach the second virtual character, meaning that parts 602 and 604 of the second virtual character are visible to the first virtual character. However, the detection rays emitted from parts 606 and 608 cannot reach the second virtual character, meaning that parts 606 and 608 of the second virtual character are invisible to the first virtual character.

[0076] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0077] For example, when the above detection process is configured to perform asynchronous detection on multiple parts, it can be configured to stop subsequent detection when the first visible part is detected. In this case, the detected part is an optional example of the target part.

[0078] Optionally, in this embodiment of the application, the above-mentioned target part being determined as the part to be shot can be understood as the target part being the part to be hit after the first virtual character performs the shooting operation. At this time, the shooting operation is performed on the first region of the multiple regions divided on the target part. The first region may include, but is not limited to, a region randomly selected after dividing the target part into multiple regions, or a region determined according to a preset probability matrix after dividing the target part into multiple regions.

[0079] For example, Figure 7 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 7 As shown, part 702 is divided into 9 regions, distributed in a 3x3 pattern. Figure 7 The first region is identified among the nine regions included in the process, so as to carry out the first firing operation towards the first region.

[0080] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0081] Optionally, in this embodiment of the application, the above-mentioned detection that the target part is within the field of view of the first virtual character after the first shooting operation is completed may include, but is not limited to, firing the above-mentioned detection ray at the target part again after the first shooting operation has been completed, in order to determine whether the target part is still within the field of view of the first virtual character.

[0082] For example, Figure 8 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 8 As shown, after the first shooting operation has fired at the first area, the detection ray is re-emitted from the virtual eyeball to determine whether part 804 is visible. Parts 802 and 804 are both target parts. At this time, since the second virtual character may have moved, although they are both target parts, their visibility may not be consistent at different times. It is necessary to re-detect and re-determine whether the target part is within the field of vision of the first virtual character.

[0083] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0084] Optionally, in this embodiment of the application, the target part being determined as the part to be shot may include, but is not limited to, when the first virtual character needs to shoot at the second virtual character and the target part is visible, controlling the first virtual character to perform a second shooting operation on the second area of ​​the second virtual character.

[0085] It should be noted that the second region mentioned above is a region determined from multiple regions based on a preset first probability matrix. The first probability matrix is ​​a probability matrix corresponding to the first region, used to determine the probability of shifting from the first region to each direction in the first group of directions.

[0086] For example, Figure 9 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 9 As shown, after the first shooting operation is completed, if it is detected that part 902 is within the field of view of the first virtual character and part 902 is determined to be the part to be shot, the first probability matrix 906 of the first region 904 is obtained. In the first probability matrix, each element represents the probability of shifting in each direction in the first group of directions. For example, 1 / 16 represents the probability of shifting to the lower left, upper left, lower right, and upper right; 1 / 8 represents the probability of shifting to the upper, lower, left, and right; and 1 / 4 represents the probability of staying in place. At this time, the second region is determined according to the first probability matrix 906 and the first region 904, so as to control the first virtual character to perform the second shooting operation on the second region of the second virtual character.

[0087] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0088] In this embodiment, a virtual scene is displayed, along with a first virtual character and a second virtual character located within the virtual scene. The first virtual character is a non-player-controlled virtual character, and the second virtual character is a virtual character belonging to a different faction than the first virtual character. When a target part of the second virtual character is detected to be within the field of view of the first virtual character, and the target part is determined to be the area to be shot, the first virtual character is controlled to perform a first shooting operation on a first area within the second virtual character. The area containing the target part is divided into multiple areas, including the first area. After the first shooting operation is performed, if the target part is detected to be within the field of view of the first virtual character, and the target part is determined to be the area to be shot, the first virtual character is controlled to perform a first shooting operation on a first area within the second virtual character. A virtual character performs a second shooting operation on a second region of a second virtual character. The second region is determined from multiple regions according to a preset first probability matrix. The first probability matrix includes the probability of offset from the first region to each direction in a first group of directions. By continuously shooting at the second virtual character from the first virtual character, the expected position of each shot is only related to the actual position of the previous shot. By adjusting the expected position of each shot through the first probability matrix, the shooting process of the virtual character is made more in line with the player's operation, thereby making the shooting effect of the virtual character more realistic, enriching the technical effect of the shooting trajectory of the virtual character, and thus solving the technical problems of unrealistic shooting effect and monotonous shooting trajectory of the virtual character.

[0089] As an optional approach, before controlling the first virtual character to perform the first shooting operation on the first area of ​​the second virtual character, the above method further includes:

[0090] Detect whether multiple parts of the second virtual character are within the field of view of the first virtual character, wherein the second virtual character is divided into multiple parts, including the target part;

[0091] If a part is detected within the field of view of the first virtual character, the target part within the field of view of the first virtual character is identified as the part to be shot.

[0092] Optionally, in the embodiments of this application, such as Figure 5 As shown, the second virtual character can be divided into multiple parts, and the size of these multiple parts can be the same or different, depending on the actual needs.

[0093] Optionally, in the embodiments of this application, such as Figure 6As shown, it can detect whether multiple parts such as part 602 and part 604 of the second virtual character can be hit by the detection ray emitted by the virtual eyeball of the first virtual character, so as to determine whether the above-mentioned multiple parts are stored in the field of vision of the first virtual character, and then determine the target part in the field of vision of the first virtual character as the part to be shot.

[0094] By dividing the second virtual character to be shot into multiple parts through the embodiments of this application, the aiming at the center of the virtual character is avoided, thereby increasing the hit probability of the shooting operation performed by the virtual character controlled by the system and optimizing the player's game participation experience.

[0095] As an alternative solution,

[0096] Detecting whether multiple parts of the second virtual character are within the field of view of the first virtual character includes: sequentially detecting whether multiple parts are within the field of view of the first virtual character in a polling manner;

[0097] When a part is detected within the field of view of the first virtual character, the target part within the field of view of the first virtual character is identified as the part to be shot, including: during the polling process, the first detected part within the field of view of the first virtual character is identified as the target part, and the target part is identified as the part to be shot.

[0098] Optionally, in the embodiments of this application, the above-mentioned polling method may include, but is not limited to, polling in the order of top left → top right → middle left → middle right → bottom left → bottom right → top left. Of course, it may also poll in the reverse order, or from bottom to top or any other custom order. During the polling process, the first detected part is determined as the target part, and the target part is determined as the part to be shot.

[0099] For example, Figure 10 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 10 As shown, the polling is performed in the following order: top left 1002 → top right 1004 → center left 1006 → center right 1008 → bottom left 1010 → bottom right 1012 → top left 1002. The first detected part within the field of view of the first virtual character is determined as the target part to be shot.

[0100] It should be noted that the above-mentioned detection of whether multiple parts of the second virtual character are within the field of view of the first virtual character also includes: detecting whether multiple parts are within the field of view of the first virtual character in a random selection manner, wherein, in the process of detecting whether multiple parts are within the field of view of the first virtual character, the parts that have been detected will be taken out from the set of multiple parts to be detected.

[0101] When a part is detected within the field of view of the first virtual character, the target part within the field of view of the first virtual character is identified as the part to be shot, including: during the random selection process of detection, the first detected part within the field of view of the first virtual character is identified as the target part, and the target part is identified as the part to be shot.

[0102] For example, with Figure 10 For example, a part can be randomly selected from the set of parts (top left 1002, top right 1004, middle left 1006, middle right 1008, bottom left 1010, bottom right 1012, top left 1002) for detection. Taking the bottom right 1012 as an example, it is checked whether the part corresponding to the bottom right 1012 is within the field of view of the first virtual character. When it is within the field of view of the first virtual character, the bottom right 1012 is the target part to be shot. When it is not within the field of view of the first virtual character, a part is randomly selected from the set of parts (top left 1002, top right 1004, middle left 1006, middle right 1008, bottom left 1010, top left 1002) for detection.

[0103] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0104] In this embodiment, multiple parts are detected by polling or randomly removing selected parts, which can quickly determine the target parts within the field of view of the first virtual character, so as to realize the shooting operation of the first virtual character on the second virtual character. This avoids the simultaneous detection of multiple parts and reduces the computational resource overhead.

[0105] As an optional approach, before controlling the first virtual character to perform the first shooting operation on the first area of ​​the second virtual character, the above method further includes:

[0106] If the target location is the first location identified as the location to be shot, one area is randomly selected from multiple areas and designated as the first area.

[0107] If the target location is not the first time it has been identified as the location to be shot, a first region is determined among multiple regions according to a preset second probability matrix. The second probability matrix includes the probability of shifting from the third region to each direction in the second group of directions. The third region is the region among the multiple regions where the shooting operation was performed when the target location was previously identified as the location to be shot.

[0108] Optionally, in this embodiment, whether the target part is the first time it has been identified as the part to be shot is determined based on historical detection records or historical shooting records. When the first virtual character identifies the target part as the part to be shot for the first time, a region is randomly selected from the multiple regions corresponding to that part and designated as the first region. Figure 7 As shown, when part 702 is the part to be shot for the first time, a region is randomly selected from (0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), (2,1) and (2,2) as the first region mentioned above.

[0109] Optionally, in this embodiment, if the target location is not the first time it has been identified as the location to be shot, the first region may be determined from multiple regions based on a preset second probability matrix, including but not limited to... Figure 9 The first probability matrix 906 shown may be the same as or different from the second probability matrix. The number of probability elements included in the second probability matrix can be preset, and the size is divided by... Figure 9 In addition to the 3x3 shown, it can also be configured as MxM, where M is a positive integer. Of course, it can also be configured as MxN according to actual needs, where N is a positive integer different from M.

[0110] For example, Figure 11 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 11As shown, M is preset to 5. In this case, the second probability matrix can be, but is not limited to, a 5x5 probability matrix. The probability of shifting from the third region 1104 to each direction in the second group of directions can be as shown in the second probability matrix 1106. When it is determined that the shift is from the third region to the direction corresponding to probability 1110 in the second group of directions, the third region 1104 shifts down by one region, from (0,1) to (0,0). That is, the first region is the (0,0) region of part 1102. When it is determined that the shift is from the third region to the direction corresponding to probability 1112 in the second group of directions, the third region 1104 shifts down by two regions, from (0,1) to the (0,2) region of part 1108. That is, the first region is the (0,2) region of part 1108.

[0111] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0112] It should be noted that all the judgment logic described below can also be applied to this embodiment, and the method of determining the first region can be achieved through the judgment logic described below.

[0113] Through the embodiments of this application, different probability matrices are configured to make the virtual characters controlled by the system more human-like. When the number of players is small, adding the aforementioned virtual characters controlled by the system allows for the faster creation of a game that meets the required number of players, without affecting the experience of the players participating in that game.

[0114] As an optional approach, before controlling the first virtual character to perform a second shooting operation on the second area of ​​the second virtual character, the above method further includes:

[0115] According to a preset first probability matrix, candidate regions are determined by shifting from the first region to the first direction, and a second region is determined based on the candidate regions, wherein the first set of directions includes the first direction; or,

[0116] If the first probability matrix also includes the probability of keeping the first region unchanged, a candidate region is determined according to the preset first probability matrix, wherein the candidate region is the first region, or is a region obtained by shifting from the first region to the first direction; if the candidate region is the first region, the second region is determined as the first region; if the candidate region is a region obtained by shifting from the first region to the first direction, the second region is determined according to the candidate region.

[0117] Optionally, in the embodiments of this application, the first probability matrix can be configured as a probability matrix that must be offset in a first direction, or it can be configured as a probability matrix that allows the first region to remain unchanged.

[0118] For example, Figure 12This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 12 As shown, the first probability matrix may include, but is not limited to, being configured as probability matrix 1202 or probability matrix 1204. The candidate region obtained by shifting from the first region to the first direction is determined according to probability matrix 1202, or, if the probability matrix also includes the probability (1 / 4) of keeping the first region unchanged, the candidate region is determined according to probability matrix 1204.

[0119] Optionally, in this embodiment of the application, the candidate region may include, but is not limited to, the region adjacent to the first region among the multiple regions, and may also include, but is not limited to, other regions outside the multiple regions, such as a region of an adjacent part or a region other than the second virtual character.

[0120] Optionally, in this embodiment of the application, when the candidate region is the first region, determining the second region as the first region can be understood as follows: Figure 12 As shown, the first region is offset based on the 1 / 4 probability corresponding to the middle position of probability matrix 1204. The region that is not actually offset, when the candidate region is obtained by offsetting from the first region in the first direction, determining the second region based on the candidate region can be understood as follows: Figure 12 As shown, the first region is offset according to the probability corresponding to any position in the probability matrix 1202 to obtain the second region.

[0121] For example, such as Figure 12 As shown, when the first region is shifted according to the 1 / 4 probability corresponding to the middle position of the probability matrix 1204, the second region 1208 is (0,1) among the multiple regions. When the first region is shifted according to the probability corresponding to the right 1 / 8 position in the probability matrix 1202, the second region 1206 is (1,1) among the multiple regions.

[0122] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0123] Through the embodiments of this application, the probability matrix can be determined according to different needs, such as the type of virtual props that perform shooting operations or the shooting interval of virtual props, to determine whether the first probability matrix includes the probability of keeping the first area unchanged. This can further enrich the gameplay, optimize the user experience, and make the first virtual character more closely resemble the player's operation, thereby achieving the technical effect of improving the shooting realism of the first virtual character.

[0124] As an alternative approach, the second region is determined based on the candidate regions, including:

[0125] If the candidate region is outside the region where the second virtual character is located, the second region will be designated as the first region.

[0126] Optionally, in this embodiment of the application, the area outside the location of the second virtual character may include, but is not limited to, the area outside the aforementioned multiple parts, that is, the area outside the edge area among the aforementioned multiple parts.

[0127] It should be noted that the area where the second virtual character is located may include, but is not limited to, the space where the second virtual character is located or the area corresponding to the space where the virtual detection box of the second virtual character is located.

[0128] For example, Figure 13 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 13 As shown, when the first region 1304 is the edge region (0,2) of part 1302, if the offset is made according to the probability of 1 / 8 of the first row in the probability matrix 1306, the first region (0,2) will be offset upward. Since there is no part of the second virtual character above part 1302, it is determined that the candidate region is outside the region where the second virtual character is located, so the second region is still (0,2).

[0129] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0130] Through the embodiments of this application, even when the candidate area is outside the second virtual character, the first area can remain unchanged, so that the shooting of the first virtual character will not deviate outside the second virtual character during the offset process, thereby improving the shooting hit rate of the first virtual character.

[0131] As an alternative approach, the second region is determined based on the candidate regions, including:

[0132] If the candidate region is located within the area where the target part is located, the second region is determined as the candidate region;

[0133] If a candidate region is located outside the region where the target region is located, but within the region where a region adjacent to the target region is located, it is determined whether the region adjacent to the target region is within the field of view of the first virtual character. The second virtual character is divided into multiple regions, including the target region and the regions adjacent to the target region. If the region adjacent to the target region is within the field of view of the first virtual character, the second region is determined as a candidate region. If the region adjacent to the target region is not within the field of view of the first virtual character, the second region is determined as the first region.

[0134] Optionally, in this embodiment of the application, the area where the target part is located may include, but is not limited to, the area within the multiple areas mentioned above. The area outside the area where the target part is located and the area where the part adjacent to the target part is located may include, but is not limited to, the area adjacent to the edge of the multiple areas mentioned above. The adjacent area is the area within the multiple areas divided by the adjacent parts of the target part.

[0135] At this point, it is necessary to repeat the process. Figure 8 As shown, it determines whether the parts adjacent to the target part are within the field of view of the first virtual character.

[0136] For example, Figure 14 This is a schematic diagram of another virtual character control method according to an embodiment of the present invention, such as... Figure 14 As shown, when the first region 1404 is the region (0,0) at the lower edge of part 1402, if the offset is made according to the probability of 1 / 8 in the third row of probability matrix 1406, the first region (0,0) will be offset downward. Since there is part 1408 of the second virtual character below part 1402, the candidate region is determined to be located in the candidate region (0,2) where part 1408 is adjacent to the target part.

[0137] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0138] Through the embodiments of this application, when the candidate region is located outside the region where the target part is located, but within the region where the adjacent part is located, the first region can be shifted to the region of the adjacent part. During the shifting process, it is also necessary to consider whether the adjacent part is visible, which further makes the shooting of the first virtual character more human-like. It allows the first virtual character to shift between the target part and the adjacent part, making it more realistic and less likely to be discovered that the first virtual character is a system-controlled virtual character rather than an ordinary player.

[0139] As an optional approach, candidate regions are determined by shifting from the first region to the first direction according to a preset first probability matrix, including:

[0140] According to the first probability matrix, candidate regions are determined by shifting from the first region to the first direction. The first probability matrix includes the first subgroup probability corresponding to the first subgroup direction and the second subgroup probability corresponding to the second subgroup direction. The first direction includes the first subgroup direction and the second subgroup direction. The region obtained by shifting from the first region to the first subgroup direction is the first subgroup region, and the region obtained by shifting from the first region to the second subgroup direction is the second subgroup region. The distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region. The probability in the first subgroup probability is greater than the probability in the second subgroup probability.

[0141] Optionally, in this embodiment, the first subgroup direction may include, but is not limited to, the four directions of up, down, left, and right, and the second subgroup direction may include, but is not limited to, the four directions of upper left, lower left, upper right, and lower right. Figure 12 The probability matrix 1202, as shown in the first probability matrix above, can include, but is not limited to, configuring the first subgroup probability and the second subgroup probability for the eight directions of up, down, left, right, upper left, lower left, upper right, and lower right respectively. For example, the probability of the up direction is 1 / 4, and the region (0,2) obtained by shifting upwards from the first region (0,1) with a probability of 1 / 4 is used as the first subgroup region above.

[0142] Optionally, in this embodiment of the application, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region. The probability in the first subgroup probability is greater than the probability in the second subgroup probability. This can be understood as configuring the probability of shifting in a certain direction to be negatively correlated with the distance to the first region. When the distance to the first region is smaller, the probability of shifting is greater. When the distance to the first region is larger, the probability of shifting is smaller.

[0143] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0144] As an optional approach, if the first probability matrix also includes the probability of keeping the first region unchanged, the candidate region is determined according to the preset first probability matrix, including:

[0145] If the first probability matrix also includes the probability of keeping the first region unchanged, candidate regions are determined according to the first probability matrix. The first probability matrix includes the first subgroup probability corresponding to the first subgroup direction and the second subgroup probability corresponding to the second subgroup direction. The first subgroup direction includes the first subgroup direction and the second subgroup direction. The region obtained by shifting from the first region to the first subgroup direction is the first subgroup region. The region obtained by shifting from the first region to the second subgroup direction is the second subgroup region. The distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region. The probability in the first subgroup probability is greater than the probability in the second subgroup probability. The probability of keeping the first region unchanged is greater than the probability in the first subgroup probability.

[0146] Optionally, in this embodiment, the first subgroup direction may include, but is not limited to, five directions: up, down, left, right, and unchanged; the second subgroup direction may include, but is not limited to, four directions: upper left, lower left, upper right, and lower right. Figure 12 The probability matrix 1204, as shown in the first probability matrix above, can be configured with the first subgroup probability and the second subgroup probability for the nine directions: up, down, left, right, unchanged, upper left, lower left, upper right, and lower right. For example, the probability of the up direction is 1 / 8. Starting from the first region (0,1), the region obtained by shifting upward with a probability of 1 / 8 is (0,2), which is the first subgroup region above. The probability of the unchanged direction is 1 / 4. Starting from the first region (0,1), the region obtained by shifting upward with a probability of 1 / 4 is still (0,1), which is the first subgroup region above.

[0147] Optionally, in this embodiment of the application, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region. The probability in the first subgroup probability is greater than the probability in the second subgroup probability. This can be understood as configuring the probability of shifting in a certain direction to be negatively correlated with the distance to the first region. When the distance to the first region is smaller, the probability of shifting is greater. When the distance to the first region is larger, the probability of shifting is smaller.

[0148] The above is merely an example, and the embodiments in this application do not impose any specific limitations.

[0149] By negatively correlating the probability of deviation with the distance from the first region in this embodiment, the shooting operation of the first virtual character can be made more realistic, and the deviation of the shooting operation of the first virtual character can be made more in line with the real rules.

[0150] As an alternative solution,

[0151] Before controlling the first virtual character to perform the first shooting operation on the first area of ​​the second virtual character, the above method further includes: in the case that the virtual scene includes multiple virtual characters that are in a different faction from the first virtual character and all of the multiple virtual characters are within the field of vision of the first virtual character, the virtual character that is closest to the first virtual character among the multiple virtual characters is identified as the second virtual character.

[0152] After controlling the first virtual character to perform a second shooting operation on the second region of the second virtual character, the method further includes: when the virtual character closest to the first virtual character among multiple virtual characters changes from the second virtual character to the third virtual character, detecting whether the target part of the third virtual character is within the field of view of the first virtual character; when the target part of the third virtual character is within the field of view of the first virtual character and is determined to be the part to be shot, controlling the first virtual character to perform a third shooting operation on the second region of the third virtual character, or controlling the first virtual character to perform a third shooting operation on the fourth region of the third virtual character, wherein the fourth region is a region determined among multiple regions according to a preset third probability matrix, the third probability matrix including the probability of offset from the second region to each direction in the third group of directions.

[0153] Optionally, in this embodiment of the application, the third virtual character is a virtual character that is in the same or different camp as the second virtual character and is in a different camp than the first virtual character.

[0154] Optionally, in this embodiment, after performing the second shooting operation on the second area of ​​the second virtual character, controlling the first virtual character to perform the third shooting operation on the second area of ​​the third virtual character can be understood as follows: after performing the second shooting operation on a certain area of ​​the second virtual character, if the nearest virtual character from a different faction changes, the shooting target also changes. However, the shooting position can be inherited. Alternatively, controlling the first virtual character to perform the third shooting operation on the area of ​​the third virtual character determined by a preset third probability matrix in multiple areas, where the area is obtained by offsetting from the second area to each direction in the third group of directions, can be understood as inheriting the shooting position update method. Since in real scenarios, when continuous shooting occurs, the crosshair of the virtual shooting prop will always shift. When controlling the first virtual character to perform shooting operations, when the target changes, by inheriting the above-mentioned shooting position or shooting position update method, the anthropomorphic shooting of the first virtual character can be more realistically realized, improving the player's gaming experience and making it more difficult for the player to distinguish whether the virtual character is controlled by the system or by the player.

[0155] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0156] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0157] According to another aspect of the embodiments of this application, a control device for a virtual character used to implement the above-described virtual character control method is also provided. For example... Figure 15 As shown, the device includes:

[0158] Display module 1502 is used to display a virtual scene and a first virtual character and a second virtual character located in the virtual scene, wherein the first virtual character is a virtual character not controlled by a player, and the second virtual character is a virtual character belonging to a different faction than the first virtual character.

[0159] The first control module 1504 is configured to control the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character when it is detected that the target part of the second virtual character is within the field of vision of the first virtual character and the target part is determined to be the part to be shot. The area where the target part is located is divided into multiple areas, and the multiple areas include the first area.

[0160] The second control module 1506 is used to control the first virtual character to perform a second shooting operation on a second region of the second virtual character when the target part is detected to be within the field of view of the first virtual character after the first shooting operation is completed and the target part is determined to be the part to be shot. The second region is a region determined in the plurality of regions according to a preset first probability matrix. The first probability matrix includes the probability of offset from the first region to each direction in the first group of directions.

[0161] As an optional embodiment, the device is further configured to: before controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, detect whether multiple parts of the second virtual character are within the field of vision of the first virtual character, wherein the second virtual character is divided into the multiple parts, the multiple parts including the target part; if a part is detected within the field of vision of the first virtual character, determine the target part among the parts within the field of vision of the first virtual character as the part to be shot.

[0162] As an optional solution, the device is used to detect whether multiple parts of the second virtual character are within the field of view of the first virtual character by: sequentially detecting whether the multiple parts are within the field of view of the first virtual character in a polling manner; the device is used to determine the target part among the parts within the field of view of the first virtual character as the part to be shot when a part is detected within the field of view of the first virtual character by: during the polling process, determining the first detected part within the field of view of the first virtual character as the target part, and determining the target part as the part to be shot.

[0163] As an optional embodiment, the device is further configured to: before controlling the first virtual character to perform a first shooting operation on a first area in the second virtual character, if the target part is being identified as the part to be shot for the first time, randomly select one area from the plurality of areas as the first area; if the target part is not being identified as the part to be shot for the first time, determine the first area from the plurality of areas according to a preset second probability matrix, wherein the second probability matrix includes the probability of shifting from a third area to each direction in a second group of directions, and the third area is the area in the plurality of areas where a shooting operation was performed when the target part was previously identified as the part to be shot.

[0164] As an optional solution, the device is further configured to: before controlling the first virtual character to perform a second shooting operation on a second region in the second virtual character, determine a candidate region offset from the first region to a first direction according to a preset first probability matrix, and determine the second region according to the candidate region, wherein the first set of directions includes the first direction; or, if the first probability matrix also includes the probability of keeping the first region unchanged, determine the candidate region according to the preset first probability matrix, wherein the candidate region is the first region, or is a region offset from the first region to the first direction; if the candidate region is the first region, determine the second region as the first region; if the candidate region is a region offset from the first region to the first direction, determine the second region according to the candidate region.

[0165] As an alternative, the device is used to determine the second region based on the candidate region in the following manner: if the candidate region is located outside the region where the second virtual character is located, the second region is determined as the first region.

[0166] As an optional solution, the device is configured to determine the second region based on the candidate region in the following manner: if the candidate region is located within the region where the target part is located, the second region is determined as the candidate region; if the candidate region is located outside the region where the target part is located but within the region where a part adjacent to the target part is located, it is determined whether the part adjacent to the target part is within the field of view of the first virtual character, wherein the second virtual character is divided into multiple parts, the multiple parts including the target part and the parts adjacent to the target part; if the part adjacent to the target part is within the field of view of the first virtual character, the second region is determined as the candidate region; if the part adjacent to the target part is not within the field of view of the first virtual character, the second region is determined as the first region.

[0167] As an optional solution, the device is used to determine a candidate region offset from the first region to a first direction according to a preset first probability matrix in the following manner: The candidate region offset from the first region to the first direction is determined according to the first probability matrix, wherein the first probability matrix includes a first subgroup probability corresponding to a first subgroup direction and a second subgroup probability corresponding to a second subgroup direction, the first subgroup direction includes the first subgroup direction and the second subgroup direction, the region offset from the first region to the first subgroup direction is the first subgroup region, the region offset from the first region to the second subgroup direction is the second subgroup region, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region, and the probability in the first subgroup probability is greater than the probability in the second subgroup probability.

[0168] As an optional solution, the device is used to determine candidate regions according to a preset first probability matrix in the following manner, provided that the first probability matrix also includes a probability of keeping the first region unchanged: The candidate regions are determined according to the first probability matrix, wherein the first probability matrix includes a first subgroup probability corresponding to a first subgroup direction and a second subgroup probability corresponding to a second subgroup direction, the first subgroup direction includes the first subgroup direction and the second subgroup direction, the region obtained by shifting from the first region to the first subgroup direction is the first subgroup region, the region obtained by shifting from the first region to the second subgroup direction is the second subgroup region, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region, the probability in the first subgroup probability is greater than the probability in the second subgroup probability, and the probability of keeping the first region unchanged is greater than the probability in the first subgroup probability.

[0169] As an optional solution, the device is further configured to: before controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, in the case that the virtual scene includes multiple virtual characters of different factions from the first virtual character and all of the multiple virtual characters are within the field of view of the first virtual character, determine the virtual character closest to the first virtual character among the multiple virtual characters as the second virtual character; the device is further configured to: after controlling the first virtual character to perform a second shooting operation on a second area of ​​the second virtual character, if the virtual character closest to the first virtual character among the multiple virtual characters changes from the second virtual character to the third virtual character, detect whether the target part of the third virtual character is within the field of view of the first virtual character; if the target part of the third virtual character is within the field of view of the first virtual character and is determined to be the part to be shot, control the first virtual character to perform a third shooting operation on the second area of ​​the third virtual character, or control the first virtual character to perform the third shooting operation on a fourth area of ​​the third virtual character, wherein the fourth area is an area determined among the multiple areas according to a preset third probability matrix, the third probability matrix including the probability of offset from the second area to each direction in a third group of directions.

[0170] According to one aspect of this application, a computer program product is provided, comprising a computer program / instructions containing program code for performing the methods shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via communication section 1609, and / or installed from removable media 1611. When the computer program is executed by central processing unit 1601, it performs various functions provided in embodiments of this application.

[0171] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0172] Figure 16 A schematic block diagram of a computer system architecture for implementing an electronic device according to embodiments of the present application is shown.

[0173] It should be noted that, Figure 16 The computer system 1600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0174] like Figure 16As shown, the computer system 1600 includes a central processing unit (CPU) 1601, which can perform various appropriate actions and processes based on programs stored in read-only memory (ROM) 1602 or programs loaded from storage section 1608 into random access memory (RAM). The RAM 1603 also stores various programs and data required for system operation. The CPU 1601, ROM 1602, and RAM 1603 are interconnected via a bus 1604. An input / output interface 1605 (I / O interface) is also connected to the bus 1604.

[0175] The following components are connected to the input / output interface 1605: an input section 1606 including a keyboard, mouse, etc.; an output section 1607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1608 including a hard disk, etc.; and a communication section 1609 including a network interface card such as a local area network card, modem, etc. The communication section 1609 performs communication processing via a network such as the Internet. A drive 1160 is also connected to the input / output interface 1605 as needed. A removable medium 1611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on the drive 1160 as needed so that computer programs read from it can be installed into the storage section 1608 as needed.

[0176] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1609, and / or installed from removable medium 1611. When the computer program is executed by central processing unit 1601, it performs various functions defined in the system of this application.

[0177] According to another aspect of the embodiments of this application, an electronic device for implementing the above-described virtual character control method is also provided, the electronic device being... Figure 1 The terminal device or server shown. This embodiment uses this electronic device as an example for illustration. Figure 17As shown, the electronic device includes a memory 1702 and a processor 1704. The memory 1702 stores a computer program, and the processor 1704 is configured to execute the steps of any of the above method embodiments via the computer program.

[0178] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0179] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0180] S1 displays a virtual scene and a first virtual character and a second virtual character located in the virtual scene. The first virtual character is a virtual character not controlled by the player, and the second virtual character is a virtual character belonging to a different faction than the first virtual character.

[0181] S2, when it is detected that the target part of the second virtual character is within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a first shooting operation on the first area of ​​the second virtual character, wherein the area where the target part is located is divided into multiple areas, and the multiple areas include the first area;

[0182] S3, after the first shooting operation is completed, if the target part is detected to be within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a second shooting operation on the second region of the second virtual character. The second region is a region determined in multiple regions according to a preset first probability matrix. The first probability matrix includes the probability of shifting from the first region to each direction in the first group of directions.

[0183] Alternatively, as those skilled in the art will understand, Figure 17 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 17 This does not limit the structure of the aforementioned electronic devices or electronic equipment. For example, electronic devices or electronic equipment may also include components that are more... Figure 17 The more or fewer components shown (such as network interfaces, etc.), or having the same Figure 17 The different configurations shown.

[0184] The memory 1702 can be used to store software programs and modules, such as the program instructions / modules corresponding to the virtual character control method and device in this embodiment. The processor 1704 executes various functional applications and data processing by running the software programs and modules stored in the memory 1702, thereby realizing the aforementioned virtual character control method. The memory 1702 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1702 may further include memory remotely located relative to the processor 1704, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Specifically, the memory 1702 may be used, but is not limited to, to store information such as the virtual character's account. As an example, such as... Figure 17 As shown, the memory 1702 may include, but is not limited to, the display module 1502, the first control module 1504, and the second control module 1506 from the control device of the virtual character. Furthermore, it may include, but is not limited to, other module units from the control device of the virtual character, which will not be elaborated upon in this example.

[0185] Optionally, the transmission device 1706 described above is used to receive or send data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission device 1706 includes a Network Interface Controller (NIC), which can be connected to other network devices and a router via a network cable to communicate with the Internet or a local area network. In another example, the transmission device 1706 is a radio frequency (RF) module, used for wireless communication with the Internet.

[0186] In addition, the aforementioned electronic device also includes: a display 1708 for displaying the aforementioned virtual scene; and a connection bus 1710 for connecting the various module components in the aforementioned electronic device.

[0187] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0188] According to one aspect of this application, a computer-readable storage medium is provided, from which a processor of a computer device reads computer instructions, and the processor executes the computer instructions, causing the computer device to perform the virtual character control method provided in various alternative implementations of the control aspect of the virtual character described above.

[0189] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:

[0190] S1 displays a virtual scene and a first virtual character and a second virtual character located in the virtual scene. The first virtual character is a virtual character not controlled by the player, and the second virtual character is a virtual character belonging to a different faction than the first virtual character.

[0191] S2, when it is detected that the target part of the second virtual character is within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a first shooting operation on the first area of ​​the second virtual character, wherein the area where the target part is located is divided into multiple areas, and the multiple areas include the first area;

[0192] S3, after the first shooting operation is completed, if the target part is detected to be within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a second shooting operation on the second region of the second virtual character. The second region is a region determined in multiple regions according to a preset first probability matrix. The first probability matrix includes the probability of shifting from the first region to each direction in the first group of directions.

[0193] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0194] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0195] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more computer devices (which may be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.

[0196] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0197] In the several embodiments provided in this application, it should be understood that the disclosed client can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection between units or modules, and may be electrical or other forms.

[0198] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0199] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0200] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for controlling a virtual character, characterized in that, include: The virtual scene is displayed, along with a first virtual character and a second virtual character located within the virtual scene. The first virtual character is a non-player-controlled virtual character, and the second virtual character is a virtual character belonging to a different faction than the first virtual character. When executing the continuous shooting behavior logic, the first virtual character is controlled to continuously shoot at the second virtual character. When it is detected that the target part of the second virtual character is within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a first shooting operation on the first area of ​​the second virtual character, wherein the area where the target part is located is divided into multiple areas, and the multiple areas include the first area; After the first shooting operation is completed, if the target part is detected to be within the field of view of the first virtual character and the target part is determined to be the part to be shot, the first virtual character is controlled to perform a second shooting operation on the second region of the second virtual character. The second region is a region determined in the plurality of regions according to a preset first probability matrix. The first probability matrix includes the probability of shifting from the first region to each direction in the first group of directions. Before controlling the first virtual character to perform a first shooting operation on the first area of ​​the second virtual character, the method further includes: if the target part is the first time it is determined to be the part to be shot, determining one of the multiple areas as the first area; if the target part is not the first time it is determined to be the part to be shot, determining the first area among the multiple areas according to a preset second probability matrix, wherein the second probability matrix includes the probability of shifting from a third area to each direction in a second group of directions, and the third area is the area among the multiple areas where the shooting operation was performed when the target part was previously determined to be the part to be shot.

2. The method according to claim 1, characterized in that, Before controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, the method further includes: Detect whether multiple parts of the second virtual character are within the field of view of the first virtual character, wherein the second virtual character is divided into the multiple parts, and the multiple parts include the target part; If a part is detected within the field of view of the first virtual character, the target part within the field of view of the first virtual character is determined as the part to be shot.

3. The method according to claim 2, characterized in that, The step of detecting whether multiple parts of the second virtual character are within the field of view of the first virtual character includes: sequentially detecting whether the multiple parts are within the field of view of the first virtual character in a polling manner; The step of determining the target part within the field of view of the first virtual character as the part to be shot when a part is detected within the field of view of the first virtual character includes: during the polling process, determining the first detected part within the field of view of the first virtual character as the target part, and determining the target part as the part to be shot.

4. The method according to claim 1, characterized in that, Before controlling the first virtual character to perform a second shooting operation on the second area of ​​the second virtual character, the method further includes: According to the preset first probability matrix, a candidate region is determined by shifting from the first region to a first direction, and a second region is determined based on the candidate region, wherein the first set of directions includes the first direction; or, If the first probability matrix also includes the probability of keeping the first region unchanged, a candidate region is determined according to the preset first probability matrix, wherein the candidate region is the first region, or is a region obtained by shifting from the first region to the first direction; if the candidate region is the first region, the second region is determined as the first region; if the candidate region is a region obtained by shifting from the first region to the first direction, the second region is determined according to the candidate region.

5. The method according to claim 4, characterized in that, Determining the second region based on the candidate regions includes: If the candidate region is located outside the region where the second virtual character is located, the second region will be identified as the first region.

6. The method according to claim 4, characterized in that, Determining the second region based on the candidate regions includes: If the candidate region is located within the area where the target location is located, the second region is determined as the candidate region; If the candidate region is located outside the region where the target part is located, but within the region where a part adjacent to the target part is located, it is determined whether the part adjacent to the target part is within the field of view of the first virtual character. The second virtual character is divided into multiple parts, including the target part and the parts adjacent to the target part. If the part adjacent to the target part is within the field of view of the first virtual character, the second region is determined as the candidate region. If the part adjacent to the target part is not within the field of view of the first virtual character, the second region is determined as the first region.

7. The method according to claim 4, characterized in that, The step of determining the candidate region offset from the first region in the first direction according to the preset first probability matrix includes: According to the first probability matrix, the candidate region obtained by shifting from the first region to the first direction is determined, wherein the first probability matrix includes a first subgroup probability corresponding to a first subgroup direction and a second subgroup probability corresponding to a second subgroup direction, the first group direction includes the first subgroup direction and the second subgroup direction, the region obtained by shifting from the first region to the first subgroup direction is the first subgroup region, the region obtained by shifting from the first region to the second subgroup direction is the second subgroup region, the distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region, and the probability in the first subgroup probability is greater than the probability in the second subgroup probability.

8. The method according to claim 4, characterized in that, The step of determining candidate regions according to a preset first probability matrix, where the first probability matrix also includes the probability of keeping the first region unchanged, includes: If the first probability matrix also includes the probability of keeping the first region unchanged, the candidate region is determined according to the first probability matrix. The first probability matrix includes a first subgroup probability corresponding to a first subgroup direction and a second subgroup probability corresponding to a second subgroup direction. The first subgroup direction includes the first subgroup direction and the second subgroup direction. The region obtained by shifting from the first region to the first subgroup direction is the first subgroup region, and the region obtained by shifting from the first region to the second subgroup direction is the second subgroup region. The distance between the region in the first subgroup region and the first region is less than the distance between the region in the second subgroup region and the first region. The probability in the first subgroup probability is greater than the probability in the second subgroup probability, and the probability of keeping the first region unchanged is greater than the probability in the first subgroup probability.

9. The method according to any one of claims 1 to 8, characterized in that, Before controlling the first virtual character to perform a first shooting operation on the first area of ​​the second virtual character, the method further includes: when the virtual scene includes multiple virtual characters that are in a different faction from the first virtual character and all of the multiple virtual characters are within the field of vision of the first virtual character, the virtual character that is closest to the first virtual character among the multiple virtual characters is identified as the second virtual character. After controlling the first virtual character to perform a second shooting operation on a second region of the second virtual character, the method further includes: if the virtual character closest to the first virtual character among the plurality of virtual characters changes from the second virtual character to the third virtual character, detecting whether the target part of the third virtual character is within the field of view of the first virtual character; if the target part of the third virtual character is within the field of view of the first virtual character and is determined to be the part to be shot, controlling the first virtual character to perform a third shooting operation on the second region of the third virtual character, or controlling the first virtual character to perform the third shooting operation on a fourth region of the third virtual character, wherein the fourth region is a region determined among the plurality of regions according to a preset third probability matrix, the third probability matrix including the probability of offset from the second region to each direction in a third group of directions.

10. A control device for a virtual character, characterized in that, include: The display module is used to display a virtual scene and a first virtual character and a second virtual character located in the virtual scene. The first virtual character is a virtual character not controlled by the player, and the second virtual character is a virtual character in a different faction from the first virtual character. When executing the continuous shooting behavior logic, the first virtual character is controlled to continuously shoot at the second virtual character. A first control module is configured to control the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character when it is detected that the target part of the second virtual character is within the field of vision of the first virtual character and the target part is determined to be the part to be shot. The area where the target part is located is divided into multiple areas, and the multiple areas include the first area. The second control module is used to control the first virtual character to perform a second shooting operation on a second region of the second virtual character when the target part is detected to be within the field of view of the first virtual character after the first shooting operation is performed and the target part is determined to be the part to be shot. The second region is a region determined in the plurality of regions according to a preset first probability matrix. The first probability matrix includes the probability of offset from the first region to each direction in the first group of directions. Before controlling the first virtual character to perform a first shooting operation on the first area of ​​the second virtual character, the device is further configured to: if the target part is the first time it is determined to be the part to be shot, determine one of the multiple areas as the first area; if the target part is not the first time it is determined to be the part to be shot, determine the first area among the multiple areas according to a preset second probability matrix, wherein the second probability matrix includes the probability of shifting from the third area to each direction in the second group of directions, and the third area is the area among the multiple areas where the shooting operation was performed when the target part was previously determined to be the part to be shot.

11. The apparatus according to claim 10, characterized in that, The device is also used for: Before controlling the first virtual character to perform a first shooting operation on a first area of ​​the second virtual character, it is detected whether multiple parts of the second virtual character are within the field of vision of the first virtual character, wherein the second virtual character is divided into the multiple parts, and the multiple parts include the target part; If a part is detected within the field of view of the first virtual character, the target part within the field of view of the first virtual character is determined as the part to be shot.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or computer at runtime as described in any one of claims 1 to 9.

13. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method described in any one of claims 1 to 9.

14. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 9 through the computer program.

Citation Information

Patent Citations

  • Shooting control method and device for virtual character, electronic equipment and storage medium

    CN113663329A