Virtual object control method and apparatus, electronic device, and storage medium

By controlling the state switching and behavior adjustment of virtual objects in the game, the problem of inflexible virtual object pursuit is solved, and a more flexible and exciting pursuit process is achieved.

CN122141241APending Publication Date: 2026-06-05NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2026-01-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Virtual objects are not flexible enough during the chase, making the chase boring and lacking in excitement.

Method used

By controlling virtual objects to enter the first target state from the initial state through preset game events, they can move towards the virtual character at the first movement speed outside the field of vision, and perform game behaviors such as moving away or waiting in place within the field of vision, thus flexibly controlling the pursuit process of virtual objects.

Benefits of technology

It improves the flexibility and excitement of the virtual object pursuit process, avoids boredom, and enhances the expressiveness and camouflage capabilities of virtual objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122141241A_ABST
    Figure CN122141241A_ABST
Patent Text Reader

Abstract

The application discloses a virtual object control method, and relates to the technical field of computer processing, and the method comprises the following steps: in response to a preset game event, controlling a virtual object corresponding to the preset game event to enter a first target state from an initial state; in the case that the virtual object in the first target state is outside the visual field range of a virtual role, controlling the virtual object in the first target state to perform a first game behavior; in the case that the virtual object in the first target state is within the visual field range of the virtual role, controlling the virtual object in the first target state to perform a second game behavior, wherein the second game behavior comprises at least one game behavior of the following: moving away from the virtual role; waiting in place. The application makes the pursuit process of the virtual object more flexible, and makes the virtual object more flexible when stopping the pursuit, so that the boring caused by the constant pursuit is avoided, and the stimulation of the pursuit process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer processing technology, specifically to virtual object control methods, devices, electronic devices, and storage media. Background Technology

[0002] In chase-type games, there are usually one or more virtual objects chasing a virtual character.

[0003] In related technologies, after a pursuit event is triggered, the virtual object pursues the virtual character until the virtual object causes damage to the virtual character.

[0004] However, in the aforementioned technologies, the virtual object will keep chasing the virtual character until it catches up and causes damage, making the chasing process of the virtual object inflexible. Summary of the Invention

[0005] In view of this, this application provides a virtual object control method, device, electronic device, and storage medium to solve the problem of inflexibility in the virtual object tracking process.

[0006] In a first aspect, this application provides a virtual object control method, which provides a graphical user interface through a terminal device. The graphical user interface displays a game scene, and the game scene includes virtual objects controlled by a non-player and virtual characters controlled by the terminal device. The method includes:

[0007] In response to a preset game event, the virtual object corresponding to the preset game event is controlled to enter the first target state from the initial state. When the virtual object in the first target state is outside the field of vision of the virtual character, the virtual object in the first target state is controlled to perform a first game action, wherein the first game action is to move towards the virtual character at a first movement speed; When the virtual object in the first target state is within the field of view of the virtual character, the virtual object in the first target state is controlled to perform a second game action, wherein the second game action includes at least one of the following game actions: Stay away from the virtual character; Wait where you are.

[0008] Secondly, this application provides a virtual object control device that provides a graphical user interface through a terminal device. The graphical user interface displays a game scene, which includes virtual objects not controlled by the player and virtual characters controlled by the terminal device. The device includes: The state activation module is used to respond to a preset game event and control the virtual object corresponding to the preset game event to enter the first target state from the initial state. A first control module is configured to control the virtual object in the first target state to perform a first game action when the virtual object in the first target state is outside the field of vision of the virtual character, wherein the first game action is to move towards the virtual character at a first movement speed. The second control module is configured to control the virtual object in the first target state to perform a second game action when the virtual object in the first target state is within the field of vision of the virtual character, wherein the second game action includes at least one of the following game actions: Stay away from the virtual character; Wait where you are.

[0009] Thirdly, this application provides an electronic device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the virtual object control method of the first aspect or any corresponding embodiment described above.

[0010] Fourthly, this application provides a computer-readable storage medium storing computer instructions for causing a computer to execute the virtual object control method of the first aspect or any corresponding embodiment described above.

[0011] Fifthly, this application provides a computer program product, including computer instructions for causing a computer to execute the virtual object control method of the first aspect or any corresponding embodiment described above.

[0012] The virtual object control method provided in this application controls a virtual object to enter a first target state from an initial state through a preset game event. When the virtual object in the first target state is outside the virtual character's field of vision, the virtual object in the first target state is controlled to move towards the virtual character at a first movement speed. When the virtual object in the first target state is within the virtual character's field of vision, the virtual object in the first target state is controlled to stop moving towards the virtual character. That is, when the virtual object is chasing the virtual character at the first movement speed, the virtual character can control the virtual character to stop chasing by "seeing" the virtual object, making the chasing process of the virtual object more flexible. Moreover, the way to stop chasing includes at least one of moving away from the virtual character and waiting in place, making the virtual object's own behavior more flexible when it stops chasing. The flexible chasing process helps to avoid the boredom caused by continuous chasing, and the flexible stopping of chasing behavior helps the virtual object "pretend not to have started chasing", increasing the excitement of the chasing process. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the specific embodiments or related technologies of this application, the drawings used in the description of the specific embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this application; Figure 2 This is a schematic flowchart of a first type of virtual object control method according to an embodiment of this application; Figure 3 This is a second flowchart illustrating the virtual object control method according to an embodiment of this application; Figure 4 An exemplary diagram illustrating the control method of the first virtual object is shown; Figure 5 An exemplary diagram illustrating the control method of the second virtual object is shown; Figure 6 This is a structural block diagram of a virtual object control device according to an embodiment of this application; Figure 7 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of this application. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] It should be noted that the information (including but not limited to user input information, such as information entered by the user into input boxes), data (including but not limited to data used for analysis, stored data, and displayed data, such as context code, all code of the current project, the service pressure corresponding to operations performed on all code of the current project, and the code development status of the current project), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with relevant laws, regulations, and standards. For example, the context code, operations performed on all code of the current project, the corresponding service pressure, and the code development status involved in this application were all obtained with full authorization.

[0017] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.

[0018] As one optional application scenario in the embodiments of this application, such as Figure 1 As shown, the system may include at least one terminal device and at least one server. Figure 1 The system is illustrated in the example, which includes a computer 101, a mobile terminal 102, and a server 103, and the terminal devices such as the computer 101 and the mobile terminal 102 are connected to the server 103 through a network 110.

[0019] Specifically, the terminal device can be a smartphone, tablet, laptop, PDA, desktop computer, game console, smart TV, smart wearable device, in-vehicle terminal, VR (Virtual Reality) device, AR (Augmented Reality) device, etc. Server 103 can be a standalone physical server, a server cluster, a distributed system, or a cloud server providing cloud services. Network 110 can be a wired or wireless network, examples of which include, but are not limited to, the Internet, corporate intranet, local area network, wide area network, mobile communication network, and combinations thereof.

[0020] For example, in this embodiment of the application, the terminal device includes an application. This application can be an application that requires downloading and installation, or an application that can be used immediately upon clicking.

[0021] For example, the aforementioned application can be any application capable of providing a game scene for virtual characters and virtual objects to interact within that scene. For instance, the application could be a game application, such as a chase game, a battle royale (BR) game, a multiplayer online battle arena (MOBA) game, a first-person shooter (FPS) game, a third-person shooter (TPS) game, or a multiplayer shooting survival game, etc. Of course, besides game applications, other types of applications can also display virtual characters to users and provide them with corresponding functions. Examples include VR applications, AR applications, 3D mapping applications, military simulation applications, social applications, and interactive entertainment applications. Optionally, the form and corresponding functions of the virtual characters provided by different applications may vary, and these can be pre-configured according to actual needs; this embodiment does not limit this.

[0022] Optionally, a game scene refers to a created environment for virtual objects to engage in activities (such as gaming), such as virtual houses, virtual islands, virtual maps, and virtual buildings. This game scene can be a simulation of the real world, a semi-simulated / semi-fictional environment, or a purely fictional environment. Optionally, the game scene can be a two-dimensional game scene, a 2.5-dimensional game scene, or a three-dimensional game scene, etc., and this application embodiment does not limit this.

[0023] In this embodiment, a virtual character refers to a virtual character controlled by a user account within an application. Optionally, the virtual character can be a human figure, an animal, a cartoon character, or other forms; this embodiment does not limit this. Optionally, the virtual character can be displayed in three-dimensional or two-dimensional form; this embodiment does not limit this. Optionally, when the game scene is a three-dimensional game scene, the virtual character is a three-dimensional model created based on animation skeletal technology. Exemplarily, each virtual character has its own shape and volume in the three-dimensional game scene, occupying a portion of the space in the three-dimensional game scene.

[0024] In this embodiment, a virtual object refers to a virtual character automatically controlled by an application. Exemplarily, a virtual object is an NPC (Non-Player Character). Optionally, similar to a virtual character, a virtual character can be a human figure, an animal, a cartoon character, or other forms; this embodiment does not limit this. Optionally, a virtual object can be displayed in three-dimensional or two-dimensional form; this embodiment does not limit this. Optionally, when the game scene is a three-dimensional game scene, the virtual object is a three-dimensional model created based on animation skeletal technology. Exemplarily, each virtual object has its own shape and volume in the three-dimensional game scene, occupying a portion of the space in the three-dimensional game scene.

[0025] For example, a client running the aforementioned application is installed on a terminal device. The game scene is a scene displayed (or provided) by the application client when it runs on the terminal device. The user logs into the application based on their user account and controls a virtual character in the game scene. At this time, in response to the virtual character's position in the game scene, the application automatically controls the virtual object. For example, in this embodiment, the virtual object has a tracking function for the virtual character.

[0026] Optionally, the server is the backend server of the aforementioned application.

[0027] In related technologies, in pursuit games, after a pursuit event is triggered, a virtual object chases a virtual character until the virtual object damages the virtual character. Furthermore, during the pursuit, by changing the virtual character's field of vision, the virtual object can be displayed in the virtual character's view, making it easier to observe the distance between the two, while the virtual object continues to pursue the virtual character. However, in the aforementioned related technologies, the virtual object will continuously chase the virtual character until it catches up and inflicts damage, making the pursuit process inflexible. Further, in this application, when the virtual object is within the virtual character's field of vision, while displaying the virtual object in the virtual character's view, the virtual object is controlled to stop chasing the virtual character, improving the flexibility of the pursuit process. The virtual object control method provided in this application will be specifically described below with reference to embodiments thereof.

[0028] According to an embodiment of this application, a virtual object control method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0029] This embodiment provides a virtual object control method, which can be used in the client of the aforementioned terminal device or the aforementioned server (hereinafter referred to as the client). Figure 2 This is a flowchart of a virtual object control method according to an embodiment of this application, such as... Figure 2 As shown, the process includes the following steps: Step S201: In response to a preset game event, control the virtual object corresponding to the preset game event to enter the first target state from the initial state.

[0030] A preset game event refers to a judgment event used to determine whether a virtual object has entered the first target state. In the embodiments of this application, in response to a preset game event, the virtual object corresponding to the preset game event is controlled to enter the first target state from the initial state. In specific implementation, the game system may detect the preset game event and then control the virtual object corresponding to the preset game event to enter the first target state from the initial state. For example, when the virtual object is a non-player-controlled object (NPC), the NPC is controlled by the game system, and the NPC itself can be configured with corresponding detection and control logic. During the operation of the game program, after detecting the preset game event, the corresponding control logic is triggered.

[0031] In this embodiment, the client provides a graphical user interface (GUI) through a terminal device. This GUI displays a game scene, which includes virtual objects not controlled by the player and virtual characters controlled by the terminal device. Optionally, the client detects the GUI and, upon detecting a preset game event, controls the virtual object corresponding to that event to transition from its initial state to a first target state.

[0032] For example, a preset game event refers to a virtual character and a virtual object satisfying a preset positional relationship. Optionally, in response to a virtual character and a virtual object satisfying a preset positional relationship, the client controls the virtual object satisfying the preset positional relationship to enter a first target state from an initial state. For example, there are one or more virtual objects and a virtual character satisfying a preset positional relationship; in response to a virtual character and at least one virtual object satisfying a preset positional relationship, the client determines a target virtual object from the at least one virtual object according to preset rules; and then controls the target virtual object to enter the first target state from an initial state. For example, preset rules include, but are not limited to, at least one of the following: random selection, proximity to the virtual character, etc.

[0033] In one possible implementation, the virtual character corresponds to a first detection range. This first detection range refers to the detection range centered on the virtual character. For example, the client determines the first detection range based on the location of the virtual character; further, in response to the presence of a virtual object within the first detection range, it determines that the virtual object and the virtual character satisfy a preset positional relationship; further, in response to a preset game event, it controls the virtual object within the first detection range to enter a first target state from an initial state.

[0034] In another possible implementation, the virtual object corresponds to a second detection range. This second detection range refers to the detection range centered on the virtual object. For example, the client determines the second detection range based on the location of the virtual object; further, in response to the presence of a virtual character within the second detection range, it determines that the virtual character and the virtual object satisfy a preset positional relationship; further, in response to a preset game event, it controls the virtual object to enter a first target state from an initial state.

[0035] For example, the initial state is a waiting state before entering the first target state. Optionally, the virtual object in the initial state can be static or non-static. Non-static includes at least one of movement and execution of attribute behaviors. For example, attribute behaviors refer to the game behaviors preset when designing the virtual object. Optionally, different virtual objects correspond to different attribute behaviors. For example, to improve the detection accuracy of preset game events, if the initial state of the virtual object is static, the preset game events are detected based on the virtual character and a first detection range; if the initial state of the virtual object is non-static, the preset game events are detected based on the virtual object and a second detection range. For example, in the initial state, the virtual object can move in the scene, but it does not pay attention to the virtual character controlled by the player participating in the game and execute game logic specifically for the virtual character. For example, in the initial state, the virtual object may move towards the virtual character controlled by the player, but at this time, the virtual object is not specifically controlled to move towards the virtual character; that is, no specific game logic (such as pursuit) needs to be executed for the virtual character.

[0036] Step S202: When the virtual object in the first target state is outside the field of vision of the virtual character, control the virtual object in the first target state to perform the first game behavior.

[0037] The first target state is configured to control the virtual object to perform a first game action. This first game action is to move towards the virtual character at a first movement speed. Optionally, the first movement speed can be any value and can be flexibly set and adjusted according to actual conditions. For example, the first target state can be called the first pursuit state.

[0038] In this embodiment of the application, when the virtual object is controlled to enter the first target state, and the virtual object in the first target state is outside the field of vision of the virtual character, the client controls the virtual object in the first target state to perform the first game behavior.

[0039] In one possible implementation, the first game action corresponds to a fixed direction of movement. For example, when the virtual object in the first target state is outside the field of view of the virtual character, a line is constructed between the virtual object and the virtual character, and then the virtual object is controlled to perform the first game action along the line.

[0040] In another possible implementation, the first game action corresponds to a non-fixed movement direction. Specifically, the step S202 above, "controlling the virtual object in the first target state to execute the first game action," includes: Step S2021: Obtain the first field of view of the virtual character.

[0041] In this embodiment of the application, when the virtual object in the first target state is outside the field of view of the virtual character, the client obtains the first field of view direction of the virtual character. Here, the first field of view direction refers to the field of view direction indicated by the aforementioned field of view range.

[0042] In one possible implementation, the first visual direction is the direction indicated by the angle bisector ray emitted by the virtual character within the field of view. Here, the angle bisector ray refers to the ray corresponding to the angle bisector, which is used to bisect the visual angle of the field of view. For example, within the field of view, the client constructs an angle bisector ray based on the angle bisector, starting from the virtual character, and then determines the direction indicated by this angle bisector ray as the first visual direction.

[0043] In another possible implementation, the first visual direction is used to characterize the orientation of the virtual character corresponding to the visual field. For example, the orientation of the virtual character refers to the visual direction indicated by the virtual character's eye model.

[0044] Step S2022: Control the virtual object in the first target state to perform the first game behavior until the position of the virtual object in the first target state is located on the reverse extension line of the first field of view direction.

[0045] In this embodiment, after obtaining the first field of view direction, the client controls the virtual object in the first target state to perform a first game action until the position of the virtual object in the first target state is located on the backward extension line of the first field of view direction. Here, the backward extension line of the first field of view direction refers to the backward extension line of the angle bisector ray.

[0046] For example, when a virtual object is located on the reverse extension line of the first field of view, it can be understood that the virtual object is located directly behind the virtual character.

[0047] Step S2023: Control the virtual object in the first target state to execute the first game behavior along the first view direction.

[0048] In this embodiment of the application, after determining that the position of the virtual object in the first target state is located on the reverse extension line of the first field of view, the client controls the virtual object in the first target state to perform the first game behavior along the first field of view.

[0049] For example, in this embodiment of the application, the client responds to a view change operation for a virtual character and obtains a second view direction for the virtual character based on the view change operation. The second view direction refers to the view direction indicated by the changed view range. Further, when the virtual object in the first target state is outside the changed view range, the client controls the virtual object in the first target state to perform a first game action along the second view direction.

[0050] For example, the second field of view direction is obtained in a similar manner to the first field of view direction described above. In one possible implementation, the second field of view direction is the direction indicated by the angle bisector ray emitted by the virtual character within the changed field of view. In another possible implementation, the second field of view direction is used to characterize the orientation of the virtual object corresponding to the changed field of view.

[0051] Step S203: When the virtual object in the first target state is within the field of vision of the virtual character, control the virtual object in the first target state to perform the second game behavior.

[0052] The second target state is also configured to control the virtual object to perform a second game action. This second game action includes at least one of the following: moving away from the virtual character or waiting in place. Optionally, when moving away from the virtual character, the moving speed can be any value, and this first movement speed can be flexibly set and adjusted according to the actual situation. For example, the first game action can be called a first pursuit action, and the second game action can be called a stop pursuit action.

[0053] In this embodiment of the application, when the virtual object is controlled to enter the first target state, and the virtual object in the first target state is within the field of vision of the virtual character, the client controls the virtual object in the first target state to perform the second game behavior.

[0054] Specifically, controlling the virtual object in the first target state to move away from the virtual character includes: Step S2031: Control the virtual object to move in a direction away from the virtual character's field of vision, and stop at a position that satisfies a preset relationship with the field of vision.

[0055] In this embodiment of the application, when the virtual object in the first target state is within the field of view of the virtual character, the client controls the virtual object to move in a direction away from the field of view of the virtual character and stop at a position that satisfies a preset relationship with the field of view.

[0056] For example, the direction away from the virtual character's field of vision (i.e., the direction of departure) is the direction in which the virtual character points towards the virtual object. For instance, the client uses the virtual character as the starting point and the direction in which the virtual character points towards the virtual object as the emission direction to construct a ray of departure, and then controls the virtual object to move away from the virtual character along the ray of departure.

[0057] It should be noted that the above description of the direction of departure is merely illustrative and explanatory. In practical applications, the direction of departure can be flexibly set and adjusted. For example, to improve the flexibility of virtual objects, when the virtual object is within the virtual character's field of vision, the client can randomly generate a departure trajectory for the virtual object and then control the virtual object to move away from the virtual character along this trajectory. Alternatively, to reduce the operational burden on the device, when the virtual object is within the virtual character's field of vision, the client can use the virtual object's current position as the starting point, determine the virtual object's historical pursuit trajectory as the departure trajectory, and then control the virtual object to return along this departure trajectory to move away from the virtual character.

[0058] For example, the preset relationship means that the virtual object is located outside the virtual character's field of vision, and the virtual object is located at the edge of the field of vision. When the client controls the virtual object to move in a direction away from the virtual character's field of vision, if the virtual object moves to outside the virtual character's field of vision and is located at the edge of the field of vision, then the client controls the virtual object to stop moving.

[0059] For example, in this embodiment, in response to a view change operation for a virtual character, if the virtual object is outside the changed view range, the client controls the virtual object in the first target state to perform a first game action. The view change operation is used to change the orientation of the virtual object. For example, the graphical user interface includes a view change control. The client changes the orientation of the virtual object through a target operation on this view change control, and then determines the changed view range based on the changed orientation. For example, the target operation is a drag operation, a single click operation, a multiple click operation, a long press operation, a short press operation, a voice control operation, or a corresponding key press operation, etc.

[0060] For example, in response to a view change operation on a virtual object, if the virtual object is within the changed view range, the client controls the virtual object to move in a direction away from the changed view range and stops at a position that satisfies a preset relationship with the changed view range.

[0061] Specifically, the virtual object controlling the first target state waits in place, including: Step S2032: Control the virtual object to wait in place and execute attribute behavior.

[0062] In this embodiment of the application, when the virtual object in the first target state is within the field of view of the virtual character, the client controls the virtual object to wait in place and perform the aforementioned attribute behavior. For example, the virtual object is a "dance model", and the attribute behavior is "dancing".

[0063] The virtual object control method provided in this embodiment controls a virtual object to enter a first target state from an initial state through a preset game event. When the virtual object in the first target state is outside the virtual character's field of vision, the virtual object in the first target state is controlled to move towards the virtual character at a first movement speed. When the virtual object in the first target state is within the virtual character's field of vision, the virtual object in the first target state is controlled to stop moving towards the virtual character. That is, when the virtual object is chasing the virtual character at the first movement speed, the virtual character can control the virtual character to stop chasing by "seeing" the virtual object, making the chasing process of the virtual object more flexible. Moreover, the way to stop chasing includes at least one of moving away from the virtual character and waiting in place, making the virtual object's own behavior more flexible when it stops chasing. The flexible chasing process helps to avoid the boredom caused by continuous chasing, and the flexible stopping of chasing behavior helps the virtual object "pretend not to have started chasing", increasing the excitement of the chasing process.

[0064] Furthermore, when the virtual object is within the virtual character's field of vision, controlling the virtual object to move away from the virtual character until it leaves the virtual character's field of vision allows the virtual object to "disguise itself as a normal patrol without initiating pursuit," increasing the excitement of the pursuit process. Moreover, when the virtual object leaves the field of vision, it stops at a position that satisfies a preset relationship with the field of vision. The virtual object does not continue pursuing after leaving the field of vision, which helps avoid it returning to the field of vision quickly and repeatedly triggering the moving-away behavior. This reduces the operational burden on the equipment caused by frequent field of vision checks and repeated behavior triggers, reducing the operational pressure on the equipment during the pursuit process. Additionally, if the virtual object is within the changed field of vision after the virtual character's field of vision changes, controlling the virtual object to continue pursuing the virtual character. While reducing the operational burden on the equipment caused by frequent field of vision checks and repeated behavior triggers, the virtual object resumes pursuit promptly after the virtual character moves away, which helps increase the tension and excitement of the pursuit process.

[0065] Furthermore, when chasing a virtual character at the initial movement speed, the virtual object is controlled to chase directly behind the virtual character based on the virtual character's field of vision, and continues the chase from directly behind. At this point, the virtual character cannot "see" the virtual object due to slight changes in its field of vision, which helps improve the virtual object's chasing success rate. Additionally, if the virtual object is outside the changed field of vision after the virtual character's field of vision has changed, the virtual object's movement direction is adjusted based on the changed field of vision, ensuring that the virtual object always stays directly behind the virtual character during the chase. This means the virtual object has the ability to actively avoid the virtual character's line of sight, reducing the probability of the virtual object being detected during the chase and further improving the virtual object's chasing success rate.

[0066] This embodiment provides a virtual object control method, which can be used in the client of the aforementioned terminal device or the aforementioned server (hereinafter referred to as the client). Figure 3 This is a flowchart of a virtual object control method according to an embodiment of this application, such as... Figure 3 As shown, the process includes the following steps: Step S301: In response to a preset game event, control the virtual object corresponding to the preset game event to enter the first target state from the initial state.

[0067] The above steps S301 and Figure 2 Step S201 in the embodiment is similar; see details below. Figure 2 Examples are not detailed here.

[0068] Step S302: When the virtual object in the first target state is outside the field of view of the virtual character, and the distance between the virtual object in the first target state and the virtual character is greater than the second threshold, control the virtual object in the first target state to perform the first game behavior.

[0069] For example, the aforementioned preset positional relationship refers to the distance between the virtual object and the virtual character being less than a first threshold and greater than a second threshold. The first threshold is greater than the second threshold. For example, the first and second thresholds can be any values, and can be flexibly set and adjusted according to actual circumstances.

[0070] In this embodiment of the application, after the virtual object enters the first target state, when the virtual object in the first target state is outside the field of vision of the virtual character and the distance between the virtual object in the first target state and the virtual character is greater than the second threshold, the client controls the virtual object in the first target state to perform the aforementioned first game behavior.

[0071] Step S303: When the virtual object in the first target state is within the field of vision of the virtual character, control the virtual object in the first target state to perform the second game behavior.

[0072] The above steps S303 and Figure 2 Step S203 in the embodiment is similar; see details below. Figure 2 Examples are not detailed here.

[0073] Step S304: When the distance between the virtual object in the first target state and the virtual character is less than the second threshold, control the virtual object in the first target state to switch from the first target state to the second target state.

[0074] In this embodiment, after the virtual object enters the first target state, when the distance between the virtual object and the virtual character in the first target state is less than a second threshold, the client controls the virtual object in the first target state to switch from the first target state to the second target state. The second target state is configured to control the virtual object to perform a third game action.

[0075] For example, in this embodiment of the application, the third game behavior is to move towards the virtual character at a second movement speed, and the second movement speed is greater than the first movement speed. When the distance between the virtual object in the first target state and the virtual character is less than a second threshold, the client controls the virtual object to increase the first movement speed to the second movement speed, and controls the virtual object to move towards the virtual character at the second movement speed. For example, similar to the first movement speed, the second movement speed can be any value, and can be flexibly set and adjusted according to the actual situation.

[0076] It should be noted that when controlling the virtual object in the first target state to switch from the first target state to the second target state, the virtual object in the first target state can be within the virtual character's field of vision or outside the virtual character's field of vision.

[0077] In one possible implementation, when the virtual object in the first target state is within the virtual character's field of vision, if the distance between the virtual object in the first target state and the virtual character is less than a second threshold, the client controls the virtual object in the first target state to switch from the first target state to the second target state. For example, when the virtual object in the first target state performs the aforementioned second game behavior, if the virtual character actively moves closer to the virtual object, the client, in response to the distance between the virtual object in the first target state and the virtual character being less than the second threshold, controls the virtual object in the first target state to switch to the second target state.

[0078] In another possible implementation, if the virtual object in the first target state is outside the virtual character's field of vision, and the distance between the virtual object in the first target state and the virtual character is less than a second threshold, the client controls the virtual object in the first target state to switch from the first target state to the second target state. For example, when the virtual object in the first target state performs the aforementioned first game action, as the virtual object in the first target state moves, the client, in response to the distance between the virtual object in the first target state and the virtual character being less than the second threshold, controls the virtual object in the first target state to switch to the second target state.

[0079] For example, the first target state is configured with a preset duration. This preset duration represents the maximum duration of the first target state. Optionally, when controlling a virtual object in the first target state to perform a first game action, if the virtual object in the first target state is outside the virtual character's field of vision, and the duration of the virtual object in the first target state is less than the preset duration, the client controls the virtual object in the first target state to continue the first game action; conversely, if the duration of the virtual object in the first target state is greater than or equal to the preset duration, the client controls the virtual object to switch from the first target state to the aforementioned initial state, and controls the virtual object in the initial state to remain at its current position. For example, the preset duration can be any value, and can be flexibly set and adjusted according to actual circumstances.

[0080] For example, after the virtual object in the first target state switches to the initial state, the client responds to the aforementioned preset game event and restarts the execution from step S301.

[0081] It should be noted that the aforementioned third game behavior will not be affected by the aforementioned field of view. For example, when the virtual object in the second target state performs the third game behavior, if the virtual object in the second target state is outside the field of view of the virtual character, the client controls the virtual object in the second target state to perform the third game behavior; similarly, if the virtual object in the second target state is within the field of view of the virtual character, the client maintains the virtual object in the second target state performing the third game behavior.

[0082] For example, the second target state is also configured to control the virtual object to perform a fourth game action.

[0083] In one possible implementation, the fourth game action is releasing target information. This target information is used to attract other virtual objects. For example, when a virtual object is in a second target state, the client controls the virtual object in the second target state to release target information targeting the virtual character. Optionally, this target information includes, but is not limited to, at least one of the following: audio information, video information, audio-visual information, etc. In one possible implementation, upon detecting the target information, the client controls other virtual objects to move towards the virtual character in response to the target information. In another possible implementation, upon detecting the game result generated by the target information in the above game scenario, the client controls other virtual objects to move towards the virtual character in response to the game result.

[0084] In one alternative implementation, the virtual character kills the virtual object to control the virtual object to leave the second target state. For example, after releasing the target information, the client, in response to the virtual character's attack operation against the virtual object in the second target state, controls the virtual object's health to decrease; further, when the virtual object's health in the second target state decreases to 0, the client controls the virtual object in the second target state to stop releasing the target information.

[0085] For example, the graphical user interface includes at least one attack control. In response to a trigger operation on the attack control, the client generates an attack operation; subsequently, in response to the virtual character's attack operation on a virtual object in a second target state, the client controls the virtual object's health to decrease. Optionally, the attack operation is at least one of a click operation, a drag operation, a voice control operation, or a corresponding key press operation.

[0086] For example, when the life value of the virtual object in the second target state decreases to 0, the client controls the virtual object in the second target state to stop releasing target information and controls the virtual object to switch to a silent state. The silent state refers to the initial state in which the virtual object cannot respond to the aforementioned preset game event. Optionally, the silent state corresponds to a first duration; if the duration of the virtual object's silent state exceeds the first duration, the client controls the virtual object in the silent state to switch back to the initial state. Alternatively, when the life value of the virtual object in the second target state decreases to 0, the client controls the virtual object in the second target state to stop releasing target information and controls the virtual object to disappear from the game scene.

[0087] In another alternative implementation, the virtual character moves away from the virtual object to control the virtual object to leave the second target state. For example, after releasing the target information, the client, in response to the distance between the virtual character and the virtual object exceeding a third threshold, controls the virtual object to switch out of the second target state. For example, the third threshold can be any data, and can be flexibly set and adjusted according to actual conditions. For example, the third threshold is greater than the aforementioned second threshold. For example, the third threshold is also less than the aforementioned first threshold. For example, the first threshold is 16 meters, the second threshold is 6 meters, and the third threshold is 10 meters.

[0088] For example, if the distance between the virtual character and the virtual object is greater than a third threshold, the client controls the virtual object in the second target state to switch to the initial state; or, the client controls the virtual object in the second target state to switch to the silent state.

[0089] In another possible implementation, the fourth game action is attacking a virtual character. For example, when the virtual object is in the second target state, the client controls the virtual object in the second target state to attack the virtual character; further, when the virtual object in the second target state moves a distance greater than a target value, the client controls the virtual object in the second target state to switch from the second target state to the aforementioned initial state; further, the client controls the virtual object in the initial state to move to its initial position. For example, the target value can be any numerical value, and can be flexibly set and adjusted according to actual circumstances.

[0090] In one possible implementation, the initial position refers to the position of the virtual object before it enters the first target state. In another possible implementation, the initial position refers to the fixed refresh position of the virtual object.

[0091] The virtual object control method provided in this embodiment, during the pursuit of a virtual character by a virtual object, controls the virtual object in the first target state to perform a first game behavior when the distance between the virtual object in the first target state and the virtual character is greater than a second threshold. When the distance between the virtual object in the first target state and the virtual character is less than the second threshold, the virtual object in the first target state is controlled to switch from the first target state to the second target state to perform a third game behavior. That is, when the virtual object gets close to the virtual character to a certain extent during the pursuit, the target state of the virtual object is changed to change the game behavior of the virtual object, making the pursuit process of the virtual object more flexible. Moreover, for the virtual object in the first target state, the field of view is used as a limitation, and the virtual object is controlled to pursue the virtual character when it is outside the field of view. For the virtual object in the second target state, the field of view is not used as a limitation, and the virtual object is directly controlled to perform a third game behavior. While making the pursuit process of the virtual object more flexible, it balances the pursuit flexibility and the pursuit success rate, and improves the pursuit success rate to a certain extent.

[0092] In addition, by controlling virtual objects to release target information to attract other virtual objects, the thrill of the chase is further enhanced. Moreover, virtual objects can be killed, reducing the oppressive feeling of virtual objects. Furthermore, virtual characters can flexibly choose appropriate methods to eliminate target information. For example, when virtual props or their own skills are sufficient, they can use virtual objects to attract enough other virtual objects and kill more virtual objects at once to obtain more benefits in the game, thus improving the overall flexibility and strategy of the game.

[0093] In addition, when the movement distance of the virtual object in the second target state is greater than the target value, the virtual object in the second target state is controlled to switch from the second target state to the initial state. That is, when the pursuit distance is sufficient, the virtual object is controlled to leave the second target state in time, reducing the tedium caused by long-distance pursuit. Moreover, the virtual object in the initial state is controlled to move to the initial position, that is, the model of the same virtual object can be reused, reducing the pressure of model building, and thus reducing the pressure of model rendering during device operation.

[0094] In addition, the third game behavior is to move towards the virtual character at a second movement speed, which is greater than the first movement speed. The pursuit speed is determined by the distance between the virtual object and the virtual character. When the distance is far (greater than the second threshold and less than the first threshold), the virtual object is pursued slowly (at the first movement speed), and when the distance is close (less than the second threshold), the virtual object is pursued quickly (at the second movement speed). This improves the pursuit flexibility of the virtual object and enhances the pursuit thrill of the virtual object.

[0095] Optionally, in practical applications, different virtual objects correspond to different second game behaviors. For example, in this embodiment, the virtual objects include a first virtual object and a second virtual object.

[0096] For example, such as Figure 4 As shown, for the first virtual object, the virtual object control methods include: Step S401: In response to a preset game event, control the first virtual object corresponding to the preset game event to enter the first target state from the initial state.

[0097] For example, the first virtual object corresponds to the aforementioned second detection range.

[0098] Step S402: When the first virtual object in the first target state is outside the field of vision of the virtual character, control the first virtual object in the first target state to perform the first game behavior.

[0099] For example, the first game action is to move toward the virtual character at a first movement speed.

[0100] For example, when the first virtual object in the first target state is outside the field of view of the virtual character, and the distance between the first virtual object in the first target state and the virtual character is less than a first threshold and greater than a second threshold, the first virtual object in the first target state is controlled to perform a first game behavior.

[0101] Specifically, the step S402 above, "controlling the first virtual object in the first target state to execute the first game behavior," includes: Step S4021: Obtain the first field of view of the first virtual character; Step S4022: Control the first virtual object in the first target state to execute the first game behavior until the position of the first virtual object in the first target state is located on the reverse extension line of the first field of view; Step S4023: Control the first virtual object in the first target state to execute the first game behavior along the first view direction; Step S4024: In response to a view change operation for the virtual character, obtain the second view direction of the virtual character based on the view change operation; Step S4025: When the first virtual object in the first target state is outside the changed field of view, control the first virtual object in the first target state to perform the first game behavior along the second field of view direction.

[0102] Step S403: When the first virtual object in the first target state is within the virtual character's field of vision, control the first virtual object in the first target state to perform a second game action. The second game action is to move away from the virtual character.

[0103] Specifically, step S403 includes: Step S4031: Control the first virtual object to move in a direction away from the virtual character's field of vision, and stop at a position that satisfies a preset relationship with the field of vision. In step S4032, in response to the field of view change operation for the virtual character, if the first virtual object is outside the changed field of view, the first virtual object in the first target state is controlled to perform the first game behavior.

[0104] Step S404: When the distance between the first virtual object and the virtual character in the first target state is less than the second threshold, control the first virtual object in the first target state to switch from the first target state to the second target state.

[0105] For example, the second target state is configured to control the first virtual object to perform a third game action. For example, the third game action is to move towards the virtual character at a second movement speed, and the second movement speed is greater than the first movement speed.

[0106] It should be noted that when the first virtual object in the first target state switches from the first target state to the second target state, the first virtual object in the first target state can be within or outside the virtual character's field of vision. It should also be noted that the aforementioned third game behavior is not affected by the aforementioned field of vision.

[0107] For example, the second target state is also configured to control the first virtual object to perform a fourth game action.

[0108] For example, the fourth game behavior is to release target information. This target information is used to attract other virtual objects.

[0109] In one alternative implementation, the virtual character kills the first virtual object to control the first virtual object to leave the second target state. For example, after releasing target information, the client, in response to the virtual character's attack operation against the first virtual object in the second target state, controls the first virtual object's health to decrease; further, when the first virtual object's health in the second target state decreases to 0, the client controls the first virtual object in the second target state to stop releasing target information.

[0110] In another alternative implementation, the virtual character moves away from the first virtual object to control the first virtual object to leave the second target state. For example, after releasing the target information, the client, in response to the distance between the virtual character and the first virtual object exceeding a third threshold, controls the first virtual object to switch out of the second target state.

[0111] For example, since the first virtual object cannot directly attack the virtual character, by releasing target information to attract other virtual objects, the attracted other virtual objects may include attack-type virtual objects, which indirectly makes up for the weakness that the first virtual object cannot attack, and further enhances the thrill of the chase.

[0112] For example, such as Figure 5 As shown, for the second virtual object, the virtual object control methods include: Step S501: In response to a preset game event, control the second virtual object corresponding to the preset game event to enter the first target state from the initial state.

[0113] For example, the virtual character is configured with a first detection range that can detect a second virtual object within that range.

[0114] Step S502: When the second virtual object in the first target state is outside the field of vision of the virtual character, control the second virtual object in the first target state to perform the first game behavior.

[0115] For example, the first game action is to move toward the virtual character at a first movement speed.

[0116] For example, when the second virtual object in the first target state is outside the field of view of the virtual character, and the distance between the second virtual object in the first target state and the virtual character is less than a first threshold and greater than a second threshold, the second virtual object in the first target state is controlled to perform the first game behavior.

[0117] For example, the first game action corresponds to a fixed direction of movement.

[0118] Step S503: When the second virtual object in the first target state is within the virtual character's field of vision, control the second virtual object in the first target state to perform a second game action. The second game action is to wait in place.

[0119] Step S504: When the distance between the second virtual object in the first target state and the virtual character is less than the second threshold, control the second virtual object in the first target state to switch from the first target state to the second target state.

[0120] For example, the second target state is configured to control the second virtual object to perform a third game action. For example, the third game action is to move towards the virtual character at a second movement speed, and the second movement speed is greater than the first movement speed mentioned above.

[0121] It should be noted that when the second virtual object controlling the first target state switches from the first target state to the second target state, the second virtual object in the first target state can be within or outside the virtual character's field of vision. It should also be noted that the aforementioned third game behavior is not affected by the aforementioned field of vision.

[0122] For example, the second target state is also configured to control the second virtual object to perform a fourth game action.

[0123] For example, the fourth game behavior is attacking a virtual character. For example, when the second virtual object is in the second target state, the client controls the second virtual object in the second target state to attack the virtual character; further, when the movement distance of the second virtual object in the second target state is greater than the target value, the client controls the second virtual object in the second target state to switch from the second target state to the aforementioned initial state; further, the client controls the second virtual object in the initial state to move to the initial position.

[0124] The above Figure 4 and Figure 5 The details in the embodiments are the same as those described above. Figure 2 and Figure 3 The implementation examples are similar; see details below. Figure 2 and Figure 3 Examples are not detailed here.

[0125] This embodiment also provides a virtual object control device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0126] This embodiment provides a virtual object control device that provides a graphical user interface (GUI) through a terminal device. The GUI displays a game scene, which includes virtual objects not controlled by the player and virtual characters controlled by the terminal device, such as... Figure 6 As shown, it includes: The state activation module 601 is used to respond to a preset game event and control the virtual object corresponding to the preset game event to enter the first target state from the initial state. The first control module 602 is used to control the virtual object in the first target state to perform a first game behavior when the virtual object in the first target state is outside the field of vision of the virtual character, wherein the first game behavior is to move towards the virtual character at a first movement speed. The second control module 603 is used to control the virtual object in the first target state to perform a second game action when the virtual object in the first target state is within the field of view of the virtual character, wherein the second game action includes at least one of the following game actions: Stay away from virtual characters; Wait where you are.

[0127] In some optional implementations, the second control module 603 is used to control the virtual object to move in a direction away from the virtual character's field of vision and stop at a position that satisfies a preset relationship with the field of vision.

[0128] In some optional implementations, the first control module 602 is further configured to respond to a view change operation for a virtual character, and if the virtual object is outside the changed view range, control the virtual object in the first target state to perform a first game action.

[0129] In some optional embodiments, the first control module 602 is configured to control the virtual object in the first target state to perform a first game action when the virtual object in the first target state is outside the field of view of the virtual character and the distance between the virtual object in the first target state and the virtual character is greater than a second threshold; the device further includes: The third control module is used to control the virtual object in the first target state to switch from the first target state to the second target state when the distance between the virtual object and the virtual character in the first target state is less than a second threshold. The second target state is configured to control the virtual object to perform a third game behavior.

[0130] In some alternative embodiments, the apparatus further includes: The information release module is used to control the release of target information for virtual characters by virtual objects in the second target state. The target information is used to attract other virtual objects. The life control module is used to respond to the attack operation of the virtual character against the virtual object in the second target state and control the reduction of the virtual object's life value in the second target state. The stop release module is used to control the virtual object in the second target state to stop releasing target information when the life value of the virtual object in the second target state is reduced to 0.

[0131] In some alternative embodiments, the apparatus further includes: The attack control module is used to control the virtual objects in the second target state to attack the virtual characters; The state switching module is used to control the virtual object in the second target state to switch from the second target state to the initial state when the movement distance of the virtual object in the second target state is greater than the target value. The object movement module is used to control the movement of virtual objects in the initial state to the initial position; where the initial position refers to the position where the virtual object was before entering the first target state.

[0132] In some alternative implementations, the third game action is to move toward the virtual character at a second movement speed, which is greater than the first movement speed.

[0133] In some alternative implementations, the first control module 602 includes: The direction acquisition unit is used to acquire the first field of view direction of the virtual character; wherein, the first field of view direction refers to the field of view direction indicated by the field of view range; The first movement unit is used to control the virtual object in the first target state to perform the first game behavior until the position of the virtual object in the first target state is located on the reverse extension line of the first field of view. The second movement unit is used to control the virtual object in the first target state to perform the first game action along the first field of view.

[0134] In some alternative implementations, the first control module 602 further includes: The direction change unit is used to respond to a view change operation for a virtual character and obtain a second view direction of the virtual character based on the view change operation; wherein, the second view direction refers to the view direction indicated by the changed view range. The second movement unit is also used to control the virtual object in the first target state to perform the first game behavior along the second field of view when the virtual object in the first target state is outside the changed field of view.

[0135] The virtual object control device provided in this application can execute the virtual object control method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing the method. Further functional descriptions of the various modules and units described above are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0136] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0137] The following is a detailed reference. Figure 7The diagram illustrates a structural schematic suitable for implementing the electronic device described in the embodiments of this application. The electronic device may include a processor (e.g., a central processing unit, graphics processor, etc.) 701, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 702 or a program loaded from memory 708 into random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the electronic device. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0138] Typically, the following devices can be connected to I / O interface 705: input devices 706 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 707 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; memory devices 708 including, for example, magnetic tapes, hard disks, etc.; and communication devices 709. Communication device 709 allows electronic devices to exchange data via wireless or wired communication with other devices. Although Figure 7 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown, and more or fewer devices may be implemented or have instead.

[0139] Specifically, according to embodiments of this application, the processes described above with reference to the 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 non-transitory 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 device 709, or installed from memory 708, or installed from ROM 702. When the computer program is executed by processor 701, it performs the functions defined in the virtual object control method of embodiments of this application.

[0140] Figure 7 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.

[0141] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the virtual object control method shown in the above embodiments is implemented.

[0142] For example, the electronic device is the target terminal device.

[0143] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.

[0144] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and all such modifications and variations fall within the scope defined by the appended claims.

Claims

1. A method for controlling virtual objects, characterized in that, The method includes providing a graphical user interface (GUI) via a terminal device, the GUI displaying a game scene, the game scene including virtual objects not controlled by the player and virtual characters controlled by the terminal device. In response to a preset game event, the virtual object corresponding to the preset game event is controlled to enter the first target state from the initial state. When the virtual object in the first target state is outside the field of vision of the virtual character, the virtual object in the first target state is controlled to perform a first game action, wherein the first game action is to move towards the virtual character at a first movement speed; When the virtual object in the first target state is within the field of view of the virtual character, the virtual object in the first target state is controlled to perform a second game action, wherein the second game action includes at least one of the following game actions: Stay away from the virtual character; Wait where you are.

2. The method according to claim 1, characterized in that, Controlling the virtual object in the first target state to move away from the virtual character includes: Control the virtual object to move away from the virtual character's field of vision and stop at a position that satisfies a preset relationship with the field of vision.

3. The method according to claim 2, characterized in that, The method further includes: In response to a view change operation for the virtual character, if the virtual object is outside the changed view range, the virtual object in the first target state is controlled to perform the first game behavior.

4. The method according to claim 1, characterized in that, When the virtual object in the first target state is outside the virtual character's field of vision, controlling the virtual object in the first target state to perform the first game action includes: When the virtual object in the first target state is outside the field of view of the virtual character, and the distance between the virtual object in the first target state and the virtual character is greater than a second threshold, the virtual object in the first target state is controlled to perform the first game behavior. The method further includes: When the distance between the virtual object in the first target state and the virtual character is less than a second threshold, the virtual object in the first target state is controlled to switch from the first target state to the second target state, wherein the second target state is configured to control the virtual object to perform a third game behavior.

5. The method according to claim 4, characterized in that, The method further includes: The virtual object controlling the second target state releases target information for the virtual character, the target information being used to attract other virtual objects; In response to the virtual character's attack operation against the virtual object in the second target state, the virtual object's health value in the second target state is reduced. When the life value of the virtual object in the second target state is reduced to 0, the virtual object in the second target state is controlled to stop releasing the target information.

6. The method according to claim 4, characterized in that, The method further includes: The virtual object controlling the second target state attacks the virtual character; When the movement distance of the virtual object in the second target state is greater than the target value, the virtual object in the second target state is controlled to switch from the second target state to the initial state; Control the virtual object in the initial state to move to the initial position; wherein, the initial position refers to the position where the virtual object was before entering the first target state.

7. The method according to claim 4, characterized in that, The third game action is to move towards the virtual character at a second movement speed, where the second movement speed is greater than the first movement speed.

8. The method according to claim 1, characterized in that, The virtual object controlling the first target state to execute the first game behavior includes: Obtain the first field of view of the virtual character; wherein, the first field of view refers to the field of view direction indicated by the field of view range; Control the virtual object in the first target state to execute the first game behavior until the position of the virtual object in the first target state is located on the reverse extension line of the first view direction; The virtual object in the first target state is controlled to perform the first game behavior along the first view direction.

9. The method according to claim 8, characterized in that, The virtual object controlling the first target state to execute the first game behavior further includes: In response to a view change operation for the virtual character, a second view direction of the virtual character is obtained based on the view change operation; wherein, the second view direction refers to the view direction indicated by the changed view range; When the virtual object in the first target state is outside the changed field of view, the virtual object in the first target state is controlled to perform the first game behavior along the second field of view direction.

10. A virtual object control device, characterized in that, The device provides a graphical user interface (GUI) through a terminal device, which displays a game scene. The game scene includes virtual objects not controlled by the player and virtual characters controlled by the terminal device. The device includes: The state activation module is used to respond to a preset game event and control the virtual object corresponding to the preset game event to enter the first target state from the initial state. A first control module is configured to control the virtual object in the first target state to perform a first game action when the virtual object in the first target state is outside the field of vision of the virtual character, wherein the first game action is to move towards the virtual character at a first movement speed. The second control module is configured to control the virtual object in the first target state to perform a second game action when the virtual object in the first target state is within the field of vision of the virtual character, wherein the second game action includes at least one of the following game actions: Stay away from the virtual character; Wait where you are.

11. An electronic device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the virtual object control method of any one of claims 1 to 9 by executing the computer instructions.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the virtual object control method according to any one of claims 1 to 9.

13. A computer program product, characterized in that, It includes computer instructions for causing a computer to execute the virtual object control method according to any one of claims 1 to 9.