Virtual object control method and device, medium, equipment and product

By simulating multiple interactive behavior patterns in fishing games and controlling the interaction between virtual objects and predators, the problem of single interaction between fish and bait in the prior art is solved, and the realism and user experience of the game are improved.

CN119925933APending Publication Date: 2025-05-06BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510400000.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

In existing fishing games, the interaction between fish and bait is relatively simple, making it difficult for players to experience the realism of the fishing scene.

Method used

By displaying virtual objects in the virtual scene, detecting predation objects, and determining the target interaction behavior pattern based on multiple interactive behavior patterns, controlling the virtual objects to interact with the predation objects, and simulating the fish behavior in the real scene.

Benefits of technology

It increases the diversity and realism of the behavioral performance of virtual objects, and enhances user's interaction interest and participation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119925933A_ABST
    Figure CN119925933A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual object control method and device, a medium, equipment and a product. The method comprises the following steps: displaying a virtual object in a virtual scene; if the predation object is detected in the moving process of the virtual object, determining whether the virtual object enters an interaction mode of interacting with the predation object; if it is determined that the virtual object enters the interaction mode, determining a target interaction behavior mode corresponding to the virtual object from multiple interaction behavior modes; and based on the target interaction behavior mode, controlling the virtual object to interact with the predator object, and determining an interaction result of the virtual object and the predator object, the interaction result being used for indicating whether the virtual object preys the predator object or not. Therefore, diversity control of interaction between the virtual object and the predator object after finding the predator object is realized. And the simulation of multiple behavior modes between the virtual object and the predator object can be realized by presetting multiple interactive behavior modes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, medium, equipment and product for controlling a virtual object. Background Art

[0002] At present, in the field of fishing games, when a fish finds a bait while swimming, it usually follows a moving path rule based on its current position and the position of the bait, so that the fish can prey on the bait and interact with the user. However, the interaction between the fish and the bait in the above solution is relatively simple, and it is difficult for players to experience the realism of the fishing scene. Summary of the invention

[0003] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0004] In a first aspect, the present disclosure provides a method for controlling a virtual object, the method comprising: Display virtual objects in virtual scenes; If a prey object is detected during the movement of the virtual object, determining whether the virtual object enters an interaction mode for interacting with the prey object; If it is determined that the virtual object enters the interaction mode, determining a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes; The virtual object is controlled to interact with the prey object based on the target interactive behavior pattern, and an interaction result between the virtual object and the prey object is determined, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

[0005] In a second aspect, the present disclosure provides a control device for a virtual object, the device comprising: A first display module, used to display virtual objects in a virtual scene; A first determination module, configured to determine whether the virtual object enters an interaction mode for interacting with the prey object if a prey object is detected during the movement of the virtual object; A second determination module is configured to determine a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes if it is determined that the virtual object enters the interaction mode; The first control module is used to control the virtual object to interact with the prey object based on the target interactive behavior mode, and determine the interaction result between the virtual object and the prey object, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

[0006] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which implements the steps of the method described in the first aspect when the computer program is executed by a processing device.

[0007] In a fourth aspect, the present disclosure provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect.

[0008] In a fifth aspect, the present disclosure provides a computer program product, including a computer program, which implements the steps of the method described in the first aspect when executed by a processor.

[0009] In the above technical solution, multiple interactive behavior modes can be pre-set. When it is determined that the virtual object and the prey object are interacting, the target interactive behavior mode can be determined and the virtual object can be controlled based on it, so that the virtual object can control the interaction with the prey object in a diversified manner after finding the prey object. And by pre-setting multiple interactive behavior modes, the behavior mode between the virtual object and the prey object in the real scene can be simulated, the realism of the behavior performance of the virtual object can be increased, and the user's interactive interest can be enhanced.

[0010] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings: Figure 1 is a flowchart of a method for controlling a virtual object provided according to an embodiment of the present disclosure.

[0012] Figure 2 is a flowchart of a method for controlling a virtual object provided according to another embodiment of the present disclosure.

[0013] Figure 3 The present invention is a block diagram of a virtual object control device provided according to an embodiment of the present disclosure.

[0014] Figure 4 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0015] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0016] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0017] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0018] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0019] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0020] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0021] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0022] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0023] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0024] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0025] At the same time, it is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0026] Figure 1 As shown, it is a flow chart of a method for controlling a virtual object according to an embodiment of the present disclosure. Figure 1 As shown, the method may include: In step 11, a virtual object in a virtual scene is displayed. The virtual object may be an object that can be interacted with in the virtual scene, such as fish, shrimp, crab, etc. in a water area in a virtual scene of fishing. For example, in a farm scene, the virtual object may be an animal object that the user catches.

[0027] In order to increase the diversity of virtual objects in a virtual scene, corresponding virtual objects may be generated in the virtual scene at intervals of a preset time period. For example, multiple types corresponding to the time period may be pre-set. Based on the type of the time period to which the generation time belongs, the body type information and number of virtual objects that can be generated are determined, and then virtual objects under the number are generated. The type of the virtual object may be determined from the types included in the body type information. For example, the maximum number of virtual objects in a virtual scene may be set, such as 10. When the number of virtual objects in the virtual scene reaches 10, no new virtual objects are generated.

[0028] In order to ensure the diversity of virtual objects in the virtual scene, the life cycle of each virtual object can be set. When the life cycle of the virtual object is reached, if the virtual object is not in a state of successfully preying on a prey object, the end display method of the virtual object can be determined and the virtual object can be controlled to exit the virtual scene based on the end display method. For example, the life cycle of a small virtual object can be set to 30-45s. When generating a small virtual object, random sampling can be performed to determine its generation cycle. For example, the life cycle of the generated small virtual object is 37s. The method for determining the life cycle of virtual objects of other sizes is similar and will not be repeated here.

[0029] Among them, a variety of end display methods can be preset, such as ending the display by moving to the edge of the virtual scene to simulate the virtual object moving out of the visible area, or ending the display by moving in an inner direction perpendicular to the display device to simulate the virtual object diving. As an example, the virtual object can be randomly selected from a plurality of preset end display methods to determine its end display method. As another example, a specific end display method can be set for virtual objects under some category information, and then it can be determined based on the category information of the virtual object whether there is an associated end display method. If so, the end display method associated with the category information is used as the end display method of the virtual object. If not, one of the preset multiple end display methods can be randomly selected as the end display method of the virtual object.

[0030] In step 12, if a predator is detected during the movement of the virtual object, it is determined whether the virtual object enters an interaction mode for interacting with the predator.

[0031] Among them, the prey object is used to represent the object that the virtual object can prey on, and the type of prey object can be configured based on the actual application scenario. For example, in a fishing scenario, the prey object can be bait. In a fishing scenario, the prey object can include bait, and in a lure fishing scenario, the prey object can also include bionic baits such as sequins, soft and hard plastics, which can have a variety of shapes to attract some types of fish, so that the available prey objects in the fishing scenario can be pre-configured based on different fishing methods, further improving the diversity of prey objects.

[0032] As an example, the prey objects that the virtual object can prey on can be pre-set, and the prey objects can be detected during the movement of the virtual object. After the virtual object is generated, it can enter the cruise mode, and the cruise mode can be used to represent the mode in which the virtual object moves based on the preset path. For example, the prey object detection can be performed during the movement of the virtual object in the cruise mode. For example, multiple paths in the cruise mode can be predetermined, each path contains multiple positions, and is stored in a path library. The virtual object is controlled to move based on the path in the path library in the cruise mode. As an example, the target position of the virtual object can be determined from the path configured in the cruise mode, and the virtual object can be controlled to move to the target position. After reaching the target position, the next target position is re-determined based on the target path. The next target position can be determined according to the position sequence on the target path, or the next target position can be randomly selected from the positions on the target path. Repeat the above steps to realize the cruise of the virtual object in the virtual scene. When a prey object or a preset event is detected in the virtual environment in this mode, the path can be changed.

[0033] As an example, the probability of entering the interactive mode can be preconfigured. When a prey object is detected during the movement of the virtual object, sampling can be performed based on the probability to determine whether the virtual object enters the interactive mode. As another example, in a virtual fishing scene, when a user interacts with fishing through virtual props, a prey object can be added to the virtual scene through virtual props, and prey object detection can be performed during the movement of the virtual object. When it is determined that the distance between the prey object and the virtual object is less than the field of view distance of the virtual object, it can be considered that the prey object is detected. After that, it can be determined whether the virtual object interacts with the prey object. As an example, if the virtual object is currently in the process of moving in the cruising mode and a preset condition is detected, it can be determined that the virtual object enters the interactive mode to try to prey on the prey object. The preset condition may include but is not limited to at least one of the following: receiving an action instruction, detecting a virtual object of the target type, detecting a group of virtual objects of the same type, etc.

[0034] In step 13, if it is determined that the virtual object enters the interactive mode, a target interactive behavior mode corresponding to the virtual object is determined from a plurality of interactive behavior modes, wherein the interactive behavior mode is used to constrain the behavioral performance of the virtual object in the process of moving toward the prey object.

[0035] As an example, a variety of interactive behavior modes may be pre-set based on actual application scenarios, such as the following interactive behavior modes A1-A5: A1: Observation mode: The virtual object moves around the prey, observing its shape and movements to determine whether it is dangerous.

[0036] A2 Slow approach mode: The virtual object slowly adjusts its body angle to move toward the prey.

[0037] A3: Probing attack mode: The virtual object touches the prey object, or rubs against the prey object with its body.

[0038] A4: Chasing mode: For a moving prey object, the virtual object can move based on the position of the prey object.

[0039] A5: Pretend to leave mode: The virtual object suddenly turns and moves to observe whether the prey is alive.

[0040] Among them, the control logic in each interactive behavior mode can be preset, and then one of A1-A5 can be randomly selected as the target interactive behavior mode, and the virtual object can be controlled based on the control logic of the target interactive behavior mode.

[0041] As another example, the interaction behavior patterns of virtual objects with different type information or different body shape information may be the same or different. In this embodiment, the corresponding interaction behavior patterns can be pre-configured for the body shape information or type information, and the type information and body shape information of the virtual object can be determined. For example, for a virtual object with a small size, its corresponding interaction behavior pattern includes A1 and A2. When it is determined that the body shape information of the virtual object is small, the target interaction behavior pattern can be determined from A1 and A2.

[0042] In step 14, the virtual object is controlled to interact with the prey object based on the target interactive behavior pattern, and an interaction result between the virtual object and the prey object is determined, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

[0043] As an example, the body size information may include small, medium, large, giant 1, giant 2, and giant 3. The swimming behavior characteristics of virtual objects under different body size information are usually different. For example, a small virtual object has a moving speed of V1 and can change direction randomly every 5-8 seconds. A medium virtual object has a moving speed of V2 and can change direction every 8-12 seconds. After determining the target interactive behavior pattern, the control parameters can be determined based on the control logic of the target interactive behavior pattern and the body size information of the virtual object, and then the interaction between the virtual object and the predator can be controlled based on the control parameters. For example, if the body size information of the virtual object is small and the determined target interactive behavior pattern is A1, the movement of the virtual object can be controlled based on the speed V1 in the process of controlling the movement of the virtual object around the predator.

[0044] In the above technical solution, multiple interactive behavior modes can be pre-set. When it is determined that the virtual object and the prey object interact, the target interactive behavior mode can be determined and the virtual object can be controlled based on it, so that the virtual object can control the diversity of the interaction with the prey object after discovering the prey object. And by pre-setting multiple interactive behavior modes, the simulation of the behavior mode between the virtual object and the prey object in the real scene can be realized, for example, the simulation of the diversity of the interactive behavior of fish after discovering the bait can be realized, the realism of the behavior performance of the virtual object can be increased, and the user's interactive interest can be enhanced.

[0045] In some embodiments, controlling the virtual object to interact with the prey object based on the target interactive behavior pattern and determining the interaction result between the virtual object and the prey object may include: The virtual object is controlled to interact with the prey object based on the target interactive behavior mode, and an initial interaction result of the virtual object in the interactive mode is determined, wherein the initial interaction result is used to indicate whether the virtual object is in a prey range corresponding to the prey object.

[0046] Among them, the virtual object can be controlled to approach the prey object based on the target interactive behavior mode to achieve interaction. During the interaction process, the prey object may also move. The virtual object can only prey on the prey object when it is within the prey range of the prey object. When the prey object is detected, the virtual object can be controlled based on the target interactive behavior mode to test whether the virtual object can move to the prey range of the prey object under the interactive mode.

[0047] As an example, controlling the virtual object to interact with the prey object based on the target interactive behavior mode and determining an initial interaction result of the virtual object in the interactive mode may include: In the process of controlling the virtual object to interact with the prey object based on the target interactive behavior mode, a first distance between the virtual object and the prey object is obtained at intervals of a preset time period.

[0048] The preset time period may be set based on actual application scenarios, and the present disclosure does not limit this.

[0049] If the first distance is less than or equal to a first threshold corresponding to the predation range, it is determined that the initial interaction result indicates that the virtual object is in the predation range. The predation range may be a range formed by taking the position of the predation object as the center and the first threshold as the radius. If the first distance is less than or equal to the first threshold, it is considered that the virtual object is in the predation range.

[0050] If the first distance is greater than a first threshold and the interaction termination condition is not met, after the virtual object is controlled to interact with the prey object based on the target interaction behavior pattern, a new target interaction behavior pattern corresponding to the virtual object is determined from the multiple interaction behavior patterns, and the virtual object is controlled to interact with the prey object based on the new target interaction behavior pattern.

[0051] Among them, the interaction termination condition includes: the first distance is greater than the second threshold or the duration of the virtual object entering the interaction mode is greater than the third threshold, wherein the second threshold is greater than the first threshold. The second threshold is used to indicate the maximum distance at which the virtual object can detect the prey, that is, the field of view distance mentioned above. When the first distance is greater than the second threshold, it means that the distance between the virtual object and the prey is too large at this time, and the virtual object cannot detect the prey, and the interaction process can be ended. The third threshold is used to constrain the maximum interaction duration between the virtual object and the prey, which can be set based on the actual application scenario. When the duration of the virtual object entering the interaction mode is greater than the third threshold, it means that the maximum interaction duration has been reached and the interaction should be stopped at this time.

[0052] If the first distance is greater than the first threshold and the interaction end condition is not met, it means that the virtual object has not entered the prey range, but the virtual object can continue to interact with the prey. As an example, the determined target interaction behavior mode is A1. In this scenario, the virtual object can be controlled to slowly approach the prey. After the virtual object is controlled to interact with the prey based on A1, the target interaction behavior mode can be re-determined. For example, if the new target interaction behavior mode is determined to be A3, the position of the prey can be controlled to change the virtual object according to the position of the prey, thereby realizing interaction with the prey.

[0053] If the first distance is greater than the first threshold and the interaction end condition is met, it is determined that the initial interaction result indicates that the virtual object is not in the predation range.

[0054] If the interaction end condition is reached, it means that the exploratory interaction between the virtual object and the prey object should be stopped at this time. At this time, if the first distance is greater than the first threshold, it means that the virtual object is not in the prey range during the interaction in the interactive mode, and the prey object cannot be preyed upon.

[0055] Therefore, through the above technical solution, the process of the virtual object approaching the prey after detecting the prey can be controlled, thereby improving the diversity of the behavior patterns of the virtual object after detecting the prey, while fitting the real scene and improving the rationality and flexibility of the virtual object control.

[0056] Further, if the initial interaction result indicates that the virtual object is in the prey range, the interaction result is determined based on the prey state of the prey object.

[0057] Therefore, when it is determined that the virtual object is within the prey range, that is, it is able to prey on the prey object, the interaction result can be determined, thereby ensuring the accuracy and determination efficiency of the interaction result.

[0058] In some embodiments, determining the interaction result based on the predation state of the prey object may include: If the predation state of the prey object indicates that the prey object is successfully preyed, then determining the interaction result is to indicate that the virtual object does not prey on the prey object.

[0059] As an example, during the interaction process when the current virtual object approaches the prey object, and the prey object may be preyed upon by other virtual objects, the prey state of the prey object can be obtained. When it is determined that the prey object is successfully preyed upon by other virtual objects, the interaction result can be directly determined.

[0060] If the predation state of the prey object indicates that other virtual objects except the virtual object have not preyed on the prey object in the recent historical period, then the interaction result is determined to indicate that the virtual object preys on the prey object.

[0061] In order to avoid conflicts when multiple virtual objects prey on the same prey object at the same time, the prey object can be tried in the order of virtual object predation. The historical period can be set based on the actual application scenario, such as 0.5s. If no other virtual object preys on the prey object in the last 0.5s, the virtual object is considered to be eligible for predation.

[0062] If the predation state of the prey object indicates that other virtual objects other than the virtual object preyed on the prey object in a recent historical period, the movement of the virtual object is controlled based on the position of the prey object.

[0063] If another virtual object preys on the prey object within the last 0.5 seconds, a conflict may occur when the virtual object preys on the prey object. In this embodiment, the virtual object can be controlled to move according to the prey object, and wait for the other virtual object to finish preying before determining whether the current virtual object preys.

[0064] As an example, controlling the movement of the virtual object based on the position of the prey object includes: A plurality of associated positions of the prey object are obtained, wherein the associated positions are used to represent positions within a preset range centered on the prey object, and a relative relationship between the associated positions and the positions of the prey object remains unchanged.

[0065] Among them, a preset range can be determined in advance with the prey object as the center, and multiple positions with a relative relationship with the prey object can be configured within the preset range as the associated position. For example, the associated position can be configured according to the distance between the position of the prey object and the direction of contact with the prey object.

[0066] A target associated position is determined from the plurality of associated positions, and the virtual object is controlled to move toward the target associated position.

[0067] Among them, a target associated position can be randomly selected from the associated positions. Since the relative relationship between the target associated position and the position of the prey object remains unchanged, the target associated position will also change accordingly when the prey object moves. When the virtual object is controlled to move toward the target associated position, the virtual object can be controlled to move along with the movement of the prey object.

[0068] In some embodiments, the method may further include: If the interaction result indicates that the virtual object preys on the prey object, a target predation behavior pattern corresponding to the virtual object is determined from a plurality of predation behavior patterns preset for the virtual object, and the predation behavior pattern is used to constrain the behavior performance of the virtual object in the process of preying on the prey object.

[0069] Among them, a variety of predation behavior modes can be pre-set based on actual application scenarios, such as the following predation behavior modes C1-C5 can be set: C1: Sudden attack: With speed and precision, it rushes towards the prey in an instant and captures it.

[0070] C2: Relying on high-speed swimming and persistent pursuit: Continuously pursue the prey based on the virtual object's movement speed and endurance.

[0071] C3: Collaborative mode: Multiple virtual objects work together to drive the prey away through attack, making it move into a position that is convenient for predation. C4: Continuous attack: Multiple attempts to prey until the prey is successfully captured or the prey is given up after a certain capture.

[0072] C5: Pretend to leave: The virtual object suddenly turns and moves to observe whether the prey is alive.

[0073] Among them, the control logic of each predator behavior mode can be preset, and then one of C1-C5 can be randomly selected as the target predator behavior mode, and the virtual object can be controlled based on the control logic of the target predator behavior mode.

[0074] As another example, the predation behavior patterns of virtual objects with different species information or different body size information may be the same or different. In this embodiment, the corresponding predation behavior pattern can be pre-configured for the body size information or species information, and the species information and body size information of the virtual object can be determined. For example, for a virtual object in the small size category, its corresponding predation behavior pattern includes C1, C3 and C4. When it is determined that the body size information of the virtual object is small, the target predation behavior pattern can be determined from C1, C3 and C4.

[0075] The virtual object is controlled to interact with the prey object based on the target prey behavior pattern.

[0076] After the target predator behavior pattern is determined, the control parameters can be determined based on the control logic of the target predator behavior pattern and the size information of the virtual object, and then the interaction between the virtual object and the predator can be controlled based on the control parameters. For example, if the size information of the virtual object is small and the target predator behavior pattern determined is C1, the movement of the virtual object can be controlled based on the speed V1 when rushing towards the predator.

[0077] Afterwards, after controlling the virtual object to interact with the prey object based on the target predation behavior pattern, if the distance between the virtual object and the prey object is less than a fourth threshold, the predation result of the virtual object on the prey object is determined based on the movement state of the prey object.

[0078] After the virtual object is controlled to interact with the prey object based on the target predation behavior pattern, the current positions of the virtual object and the prey object can be obtained. As an example, in order to ensure the accuracy of the predation result, the mouth position of the virtual object can be obtained to determine the distance between the two. The fourth threshold can be set based on the actual application scenario, and the present disclosure does not limit this.

[0079] Therefore, through the above technical scheme, when it is determined that the virtual object is preying on the prey object, a diversified display of the prey process can be achieved, which can not only improve the diversity and authenticity of the behavior representation of the virtual object, but also match the behavior characteristics of the virtual object, and can provide users with a richer interactive experience and enhance user participation.

[0080] In some embodiments, if the interaction result indicates that the virtual object does not prey on the prey object, the virtual object may be controlled to move away from the prey object based on a preset leaving mode, and the virtual object may be controlled to re-enter the cruising mode.

[0081] In some embodiments, determining the result of the virtual object capturing the prey object based on the movement state of the prey object may include: If the movement state of the prey object indicates that the prey object has not moved, the predation result is determined to be a successful predation.

[0082] When the distance between the virtual object and the prey object is less than the fourth threshold, it means that the distance between the virtual object and the prey object is small, and the prey object has not moved, and the virtual object can directly prey on the prey object.

[0083] If the movement state of the prey object indicates that the prey object is moving, the prey result is determined based on a preset prey probability.

[0084] If the prey object is in a moving state, the virtual object may fail to capture the prey object due to the movement of the prey object. In this scenario, the capture result can be determined based on the preset capture probability. For example, the capture probability can be set based on the actual application scenario. For example, if it is set to 30%, that is, there is a 30% chance of successful capture when the prey object moves, then sampling can be performed based on the capture probability. If the sampling is successful, the capture result is determined to be a capture success. If the sampling is unsuccessful, the capture result is determined to be a capture failure.

[0085] Therefore, through the above technical scheme, when it is determined that the virtual object can prey on the prey object, it is further determined whether the prey object can be successfully preyed on in the end in combination with the movement state of the prey object, thereby improving the accuracy of the prey result and the realism of the virtual object control process. In addition, it can also increase the user's interactive viscosity to a certain extent.

[0086] In some possible embodiments, the prey object is a bait, and the virtual scene is a fishing scene. In the scene, after the virtual object preys on the bait, it can try to break away from the fishing line by struggling and fighting, so as to finally determine whether the user can successfully fish. Accordingly, the method may also include: If the capture result indicates that the virtual object has successfully captured the fishing bait, a fishing result of the virtual object is determined based on the item information of the virtual item associated with the fishing bait.

[0087] If the capture result indicates that the virtual object has successfully captured the bait, it can be further determined whether the virtual object can be caught. The probability of catching the virtual object by the virtual prop can be determined from the prop information. As an example, the probability of catching the virtual object corresponding to the virtual prop can be preset. As another example, the probability of catching the virtual object of different body shapes by the virtual prop can be preset and stored in the prop information. In this step, the body shape information of the virtual object can be determined, and then the probability of catching the virtual object corresponding to the body shape information can be obtained from the prop information. Then, sampling can be performed based on the catching probability to determine the catching result of the virtual object.

[0088] If the fishing result is a fishing failure, a target escape behavior mode is determined from a plurality of preset escape behavior modes, and the action of the virtual object is controlled based on the target escape behavior mode, and after the action of the virtual object is controlled based on the target escape behavior mode, a fishing failure effect of the virtual object is displayed. The escape behavior mode is used to constrain the behavior performance of the virtual object for leaving the virtual prop.

[0089] In the actual scene, after the fish bites the bait, it will try to break free from the fishing line through a series of struggles and fights. In this embodiment, in order to improve the authenticity of the virtual scene, multiple escape behavior patterns can be pre-set, such as T1-T3, where T1 can be swimming left and right, T2 can be diving and floating, and T3 can be jumping and washing gills. The above patterns can also be combined to obtain an escape behavior pattern that includes multiple escapes, such as T1 and T2 can be combined to obtain an escape behavior pattern that includes 2 escapes. Among them, the control logic in each escape behavior pattern can be pre-set, and one can be randomly selected from them as the target escape behavior pattern, and the virtual object can be controlled based on the control logic of the target escape behavior pattern.

[0090] If the fishing result is a fishing failure, that is, the virtual object escapes the virtual props, the target escape behavior pattern can be determined based on the maximum escape number. For example, if the maximum escape number is 3, the target escape number can be determined based on the maximum escape number. For example, if the target escape number is 2 by random sampling from 1-3, one of the escape behavior patterns with an escape number of 2 can be selected as the target escape behavior pattern. In this scenario, the target escape behavior pattern contains 2 escape periods. The target escape behavior patterns corresponding to different escape periods can be the same or different. For example, the target escape behavior patterns of the two escape periods in the target escape behavior pattern are T1 and T2 respectively. Then, after controlling the virtual object to swim left and right based on T1, the virtual object can be controlled to dive and float based on T2, and then the escape special effects of the virtual object can be displayed.

[0091] For another example, the duration range corresponding to the escape period can be preset, such as 5-8s. The durations of different escape periods can be the same or different, and the duration of the escape period can be determined by random sampling from the duration range, such as controlling the virtual object to swim left and right for 5s based on T1, and then controlling the virtual object to dive and float for 7s based on T2, and then displaying the escape special effects of the virtual object.

[0092] As another example, in order to further improve the realism of the control process of the virtual object, an interval period can be added between different escape process periods when configuring the combined escape behavior mode, and the duration of the interval period can range from 3 to 5 seconds. Then, the virtual object can be controlled to swim left and right for 5 seconds based on T1, and then the virtual object can be controlled for 4 seconds based on the default mode corresponding to the interval period, and then the virtual object can be controlled to dive and float for 7 seconds based on T2, and then the escape special effects of the virtual object can be displayed.

[0093] If the fishing result is successful, a target escape behavior mode is determined from a plurality of preset escape behavior modes, and the action of the virtual object is controlled based on the target escape behavior mode. The implementation method of this step is similar to the above, and will not be described in detail here.

[0094] In the process of controlling the action of the virtual object based on the target escape behavior pattern, in response to the action of the virtual prop, a target response behavior pattern is determined from a plurality of preset action response behavior patterns, and the action of the virtual object is controlled based on the target response behavior pattern; when it is determined that the virtual object is within the fishing range corresponding to the virtual prop, the successful fishing effect of the virtual object is displayed.

[0095] When it is necessary to explain, the fishing result is a successful fishing, and the time to finally fish the virtual object needs to be determined in combination with the user's interactive operation. In the process of controlling the action of the virtual object based on the target escape behavior mode, the user's operation will be responded to. Among them, in the process of fishing the virtual object, the user will operate the virtual prop action, such as controlling the fishing rod to pull up, and multiple action response behavior modes can be pre-set to respond to the action of the virtual prop. For example, the action response behavior can include X1 and X2, X1 can be a fatigue mode, that is, the swing amplitude and frequency are reduced, and X2 can be a dizziness mode, that is, the virtual object enters a rigid state, and then recovers by tail swinging, rolling, etc. Among them, the control logic in each action response behavior mode can be pre-set, and one of X1 and X2 can be randomly selected as the target response behavior mode, and the virtual object can be controlled based on the control logic of the target response behavior mode.

[0096] The position of the virtual object may change with the position of the virtual prop. If it is determined that the virtual object is within the fishing range corresponding to the virtual prop, the successful fishing effect of the virtual object is displayed, that is, the user fishes the virtual object from the virtual scene. The fishing range corresponding to the virtual prop may be a range less than a certain distance from the user, which may be configured based on actual application scenarios and is not limited by the present disclosure.

[0097] Among them, if after the control logic based on the target response behavior pattern is completed to control the virtual object, the virtual object is not yet in the fishing range, the action of the virtual object can continue to be controlled based on the target escape behavior pattern. For example, the escape period corresponding to the target escape behavior pattern when the action of the virtual prop is received can be used as an interruption period. If there is a next escape period of the interruption period in the target escape behavior pattern, the virtual object can continue to be controlled based on the pattern of the next escape period in the target escape behavior pattern. After the action of the virtual object is controlled based on the target escape behavior pattern, if the virtual object is not yet in the fishing range, a default behavior mode of the virtual object can be pre-set for the scene. In this embodiment, the virtual object can be controlled based on the default behavior mode until the virtual object is in the fishing range and the user completes fishing.

[0098] Therefore, through the above technical scheme, the way of breaking free and reacting of fish after biting the bait can be simulated based on a variety of escape behavior patterns and response behavior patterns, thereby further improving the diversity of the behavioral performance of virtual objects and increasing the fun of interacting with virtual objects. At the same time, it enables users to use different response strategies according to their response behavior patterns during the fishing process, thereby increasing the diversity of user interaction and improving the fun of interaction.

[0099] In some embodiments, the target predator behavior mode is a cooperative mode; The controlling the virtual object to interact with the prey object based on the target prey behavior pattern may include: A collaboration signal is sent to associated virtual objects of the same type as the virtual object within a target range, wherein the collaboration signal is used to trigger the associated virtual objects to move to a position around the prey object, and the target range is used to indicate a range where the distance to the virtual object is less than a fifth threshold.

[0100] As an example, when it is determined that the target predation behavior mode is a cooperative mode, the type of the virtual object can be determined, and further, the types of each virtual object within a range where the distance from the virtual object is less than the fifth threshold can be determined, and a virtual object of the same type as the virtual object is used as the associated virtual object, and a cooperative signal is sent to the associated virtual object to request the associated virtual object to cooperate with the virtual object. For the associated virtual object, after receiving the cooperative signal, the associated virtual object can be controlled to move toward the predator.

[0101] Therefore, through the above technical solution, the interaction between different virtual objects in the virtual scene can be increased, the simulation of the swimming behavior of the fish school can be realized, and the diversity of the behavioral performance of the virtual objects can be further increased.

[0102] In some embodiments, the method may further include: If the virtual object receives a cooperation signal, multiple associated positions of the prey object in the virtual scene are obtained, wherein the associated positions are used to represent positions within a preset range centered on the prey object, and the relative relationship between the associated positions and the position of the prey object remains unchanged.

[0103] When a virtual object receives a collaboration signal, it means that other virtual objects invite the current virtual object to collaborate, and then the position of the prey object in the virtual scene can be obtained, and then its associated position can be obtained.

[0104] A target associated position is determined from the plurality of associated positions, and the virtual object is controlled to move toward the target associated position. The specific implementation of the above steps has been described in detail above and will not be repeated here.

[0105] Therefore, by receiving collaborative signals, collaborative interaction with other virtual objects can be achieved. If the user does not operate the prey object to move, the prey process of the virtual object on the prey object can be displayed through the collaboration of multiple virtual objects. If the user operates the prey object to move, the behavior of multiple virtual objects chasing and following the prey object can be displayed to the user, thereby improving the user's interactive experience and interactive participation.

[0106] In some embodiments, the method may further include: In the process of controlling the virtual object to move toward the target associated position, if it is determined that the virtual object preys on the prey object, a prey position is determined based on the position of the prey object, wherein the position of the prey object is different from the prey position.

[0107] The virtual object is controlled to interact with the prey object based on the prey position.

[0108] In order to further enhance the authenticity of the behavior of the virtual object, the virtual object can be triggered to prey on the prey object during the process of the virtual object cooperating based on the cooperation signal. As an example, the cooperative predation probability in the cooperative mode is pre-set, and then the virtual object can be sampled based on the cooperative predation probability to determine whether to prey on the prey object.

[0109] It should be noted that in order to avoid conflicts when multiple virtual objects are simultaneously preying on a prey object, the prey position can be determined based on the position of the prey object in this step. For example, a position can be randomly selected from a position that is a certain offset from the position of the prey object as the prey position, so that the prey position is different from the position of the prey object and the distance is close.

[0110] When the virtual object is controlled to interact with the prey object based on the prey position, the virtual object is controlled to move toward the prey position, and the virtual object that sends the cooperation signal moves toward the actual position of the prey object. Thus, through the above method, the virtual object does not actually prey on the prey object, but when the virtual object is controlled based on the prey position, the behavior of the virtual object is to prey on the prey object, so that the cooperating virtual object initiates a pseudo-prey operation on the prey object, which increases the behavior of the virtual object when preying, and avoids conflicts when multiple virtual objects actually prey on the same prey object.

[0111] In some embodiments, the method may further include: If the process of controlling the virtual object to move to the target associated position satisfies the collaboration termination condition, the target position of the virtual object is determined, and the target position is different from the target associated position, and the collaboration termination condition includes controlling the distance of the virtual object to move to the target associated position to reach a sixth threshold, or controlling the duration of the virtual object to move to the target associated position to reach a seventh threshold; controlling the virtual object to move to the target position.

[0112] Among them, the cooperation end condition can be set based on the actual application scenario, so as to exit the cooperation mode when the cooperation end condition is met. As an example, in this embodiment, the target position of the virtual object can be determined based on the path in the cruising mode, such as re-determining the cruising path from the path library to determine the target position, and the target position is different from the target associated position, so that when the virtual object is controlled to move to the target position, it leaves the following position of the prey object, avoiding the virtual objects in the virtual scene from gathering together for a long time, fitting the actual scene, and also making the virtual objects in the virtual scene dispersed.

[0113] like Figure 2 As shown, it is a flow chart of a method for controlling a virtual object provided in a virtual fishing scene based on an embodiment of the present disclosure. If the prey object is a bait, the steps shown in the figure have been described in detail above and will not be repeated here.

[0114] In some embodiments, the method may further include: If a target virtual object of the target type is detected during the movement of the virtual object, a target avoidance behavior pattern corresponding to the virtual object is determined from preset avoidance behavior patterns.

[0115] The target type can be pre-set based on actual conditions, such as the type at the top of the food chain can be used as the target type, or the type of the virtual object can be used as the target type, so that the virtual object can avoid the virtual objects of this type during the patrol process. For another example, the target type can be pre-configured based on the size information of the virtual object. For example, if a small virtual object needs to avoid a large virtual object, when the size information of the current virtual object is small, the type information of the large virtual object can be used as the target type corresponding to the virtual object. For example, the types of other virtual objects within a preset distance of the virtual object can be determined during the movement process. If it is determined to be the target type, the target avoidance behavior mode can be determined.

[0116] As an example, a plurality of avoidance behavior modes may be pre-set, such as adjusting the moving direction, accelerating the movement, floating movement, etc., and one of them may be randomly selected as the target avoidance behavior mode.

[0117] After controlling the action of the virtual object based on the target avoidance behavior pattern, determining the target position of the virtual object based on the current position of the virtual object; and controlling the virtual object to move toward the target position.

[0118] After determining the target avoidance behavior mode, the control parameters can be determined based on the control logic of the target avoidance behavior mode and the body shape information of the virtual object, and then the virtual object action can be controlled based on the control parameters. Afterwards, the target position of the virtual object can be determined based on the path in the cruising mode, so that the virtual object continues the cruising mode, further improving the diversity of the behavior performance of the virtual object.

[0119] In some embodiments, the method further includes: in response to determining a cluster under the type of the virtual object, determining an associated position corresponding to the cluster. The associated position of the cluster may be a position within a range containing multiple virtual objects in the cluster, which may be randomly determined within the range. Then, the virtual object is controlled to move toward the associated position. Thus, the virtual object can join the cluster queue during the movement, thereby simulating a real movement scene of the virtual object.

[0120] In some embodiments, the method further includes: in response to receiving an instruction for a virtual object, controlling the virtual object to move to a position indicated by the instruction. After controlling the virtual object to move to the position indicated by the instruction, determining a target position of the virtual object; and controlling the virtual object to move to the target position. Thus, instruction control can be combined with the control process of the virtual object, thereby increasing the scope of application of the virtual object control method.

[0121] Based on the same inventive concept, the present disclosure also provides a control device for a virtual object, such as Figure 3 As shown, the device 10 comprises: A first display module 100 is used to display virtual objects in a virtual scene; A first determination module 200 is used to determine whether the virtual object enters an interaction mode for interacting with the prey object if a prey object is detected during the movement of the virtual object; A second determination module 300 is configured to determine a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes if it is determined that the virtual object enters the interaction mode; The first control module 400 is used to control the virtual object to interact with the prey object based on the target interactive behavior mode, and determine the interaction result between the virtual object and the prey object, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

[0122] Optionally, the first control module includes: A first control submodule, configured to control the virtual object to interact with the prey object based on the target interaction behavior mode, and determine an initial interaction result of the virtual object in the interaction mode, wherein the initial interaction result is used to indicate whether the virtual object is in a prey range corresponding to the prey object; The first determination submodule is configured to determine the interaction result based on a predation state of the prey object if the initial interaction result indicates that the virtual object is within the prey range.

[0123] Optionally, the first control submodule includes: an acquisition submodule, configured to acquire a first distance between the virtual object and the prey object at intervals of a preset time period during a process of controlling the virtual object to interact with the prey object based on the target interaction behavior mode; a second determination submodule, configured to determine that the initial interaction result indicates that the virtual object is within the prey range if the first distance is less than or equal to a first threshold corresponding to the prey range; A second control submodule is configured to determine a new target interaction behavior mode corresponding to the virtual object from the multiple interaction behavior modes after the virtual object is controlled to interact with the prey object based on the target interaction behavior mode if the first distance is greater than a first threshold and the interaction end condition is not met, and control the virtual object to interact with the prey object based on the new target interaction behavior mode; a third determination submodule, configured to determine, if the first distance is greater than the first threshold and an interaction termination condition is met, that the initial interaction result indicates that the virtual object is not within the predation range; The interaction termination condition includes: the first distance is greater than a second threshold or the duration of the virtual object entering the interaction mode is greater than a third threshold, wherein the second threshold is greater than the first threshold.

[0124] Optionally, the first determining submodule includes: a fourth determination submodule, configured to determine, if the predation state of the prey object indicates that the prey object is successfully preyed, that the interaction result indicates that the virtual object does not prey on the prey object; a fifth determination submodule, configured to determine that the interaction result indicates that the virtual object preys on the prey object if the prey state of the prey object indicates that other virtual objects except the virtual object have not preyed on the prey object in a recent historical period; The third control submodule is configured to control the movement of the virtual object based on the position of the prey object if the prey state of the prey object indicates that other virtual objects other than the virtual object have preyed on the prey object in a recent historical period.

[0125] Optionally, the device further comprises: A sixth determination submodule, configured to determine a target predation behavior pattern corresponding to the virtual object from a plurality of predation behavior patterns preset by the virtual object if the interaction result indicates that the virtual object preys on the prey object; A fourth control submodule, configured to control the virtual object to interact with the prey object based on the target predation behavior pattern; The seventh determination submodule is used to determine the predation result of the virtual object on the prey object based on the movement state of the prey object if the distance between the virtual object and the prey object is less than a fourth threshold after the virtual object is controlled to interact with the prey object based on the target predation behavior pattern.

[0126] Optionally, the target predator behavior mode is a collaborative mode; The fourth control submodule is further used for: A collaboration signal is sent to associated virtual objects of the same type as the virtual object within a target range, wherein the collaboration signal is used to trigger the associated virtual objects to move to a position around the prey object, and the target range is used to indicate a range where the distance to the virtual object is less than a fifth threshold.

[0127] Optionally, the seventh determining submodule is further used for: If the movement state of the prey object indicates that the prey object has not moved, determining that the predation result is a successful predation; If the movement state of the prey object indicates that the prey object is moving, the prey result is determined based on a preset prey probability.

[0128] Optionally, the prey object is a bait, and the device further comprises: A third determination module, configured to determine a fishing result of the virtual object based on item information of a virtual item associated with the fishing bait if the fishing result indicates that the virtual object has successfully caught the fishing bait; A second control module is used for, if the fishing result is a fishing failure, determining a target escape behavior mode from a plurality of preset escape behavior modes, controlling the action of the virtual object based on the target escape behavior mode, and displaying a fishing failure effect of the virtual object after the action of the virtual object is controlled based on the target escape behavior mode; A third control module, configured to determine a target escape behavior mode from a plurality of preset escape behavior modes if the fishing result is successful, and control the action of the virtual object based on the target escape behavior mode; a fourth control module, configured to determine a target response behavior mode from a plurality of preset action response behavior modes in response to the action of the virtual prop in the process of controlling the action of the virtual object based on the target escape behavior mode, and control the action of the virtual object based on the target response behavior mode; The second display module is used to display the successful fishing effect of the virtual object when it is determined that the virtual object is within the fishing range corresponding to the virtual prop.

[0129] Optionally, the device further comprises: an acquisition module, configured to acquire a plurality of associated positions of a prey object in the virtual scene if the virtual object receives a cooperation signal, wherein the associated position is used to represent a position within a preset range centered on the prey object, and a relative relationship between the associated position and the position of the prey object remains unchanged; The fifth control module is used to determine a target associated position from the multiple associated positions and control the virtual object to move toward the target associated position.

[0130] Optionally, the device further comprises: a fourth determination module, configured to determine a predation position based on the position of the prey object if it is determined that the virtual object preys on the prey object during the process of controlling the virtual object to move toward the target associated position, wherein the position of the prey object is different from the predation position; A sixth control module is used to control the virtual object to interact with the prey object based on the prey position.

[0131] Optionally, the device further comprises: a fifth determining module, configured to determine the target position of the virtual object if the process of controlling the virtual object to move to the target associated position satisfies a collaboration termination condition, the target position and the target associated position being different, the collaboration termination condition comprising controlling the distance of the virtual object to move to the target associated position to reach a sixth threshold, or controlling the duration of the virtual object to move to the target associated position to reach a seventh threshold; A seventh control module is used to control the virtual object to move toward the target position.

[0132] Optionally, the device further comprises: a sixth determination module, configured to determine a target avoidance behavior pattern corresponding to the virtual object from preset avoidance behavior patterns if a target virtual object under a target type is detected during the movement of the virtual object; a seventh determination module, configured to determine a target position of the virtual object based on a current position of the virtual object after controlling the action of the virtual object based on the target avoidance behavior mode; An eighth control module is used to control the virtual object to move toward the target position.

[0133] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 600 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0134] like Figure 4As shown, the electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0135] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0136] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0137] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0138] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0139] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0140] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: displays a virtual object in a virtual scene; if a prey object is detected during the movement of the virtual object, determines whether the virtual object enters an interactive mode for interacting with the prey object; if it is determined that the virtual object enters the interactive mode, determines a target interactive behavior mode corresponding to the virtual object from a plurality of interactive behavior modes; based on the target interactive behavior mode, controls the virtual object to interact with the prey object, determines an interaction result between the virtual object and the prey object, and the interaction result is used to indicate whether the virtual object preys on the prey object.

[0141] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0142] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0143] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, the first display module may also be described as a "module for displaying virtual objects in a virtual scene".

[0144] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0145] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0146] According to one or more embodiments of the present disclosure, Example 1 provides a method for controlling a virtual object, the method comprising: Display virtual objects in virtual scenes; If a prey object is detected during the movement of the virtual object, determining whether the virtual object enters an interaction mode for interacting with the prey object; If it is determined that the virtual object enters the interaction mode, determining a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes; The virtual object is controlled to interact with the prey object based on the target interactive behavior pattern, and an interaction result between the virtual object and the prey object is determined, wherein the interaction result is used to indicate whether the virtual object preys on the prey pair.

[0147] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein controlling the virtual object to interact with the prey object based on the target interactive behavior pattern and determining the interaction result between the virtual object and the prey object includes: Controlling the virtual object to interact with the prey object based on the target interactive behavior mode, and determining an initial interaction result of the virtual object in the interactive mode, wherein the initial interaction result is used to indicate whether the virtual object is in a prey range corresponding to the prey object; If the initial interaction result indicates that the virtual object is in the prey range, the interaction result is determined based on the prey state of the prey object.

[0148] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 2, wherein the step of controlling the virtual object to interact with the prey object based on the target interactive behavior mode and determining an initial interaction result of the virtual object in the interactive mode includes: In the process of controlling the virtual object to interact with the prey object based on the target interactive behavior mode, obtaining a first distance between the virtual object and the prey object at intervals of a preset time period; If the first distance is less than or equal to a first threshold corresponding to the predation range, determining that the initial interaction result indicates that the virtual object is within the predation range; If the first distance is greater than a first threshold and the interaction end condition is not met, after the virtual object is controlled to interact with the prey object based on the target interaction behavior mode, a new target interaction behavior mode corresponding to the virtual object is determined from the multiple interaction behavior modes, and the virtual object is controlled to interact with the prey object based on the new target interaction behavior mode; If the first distance is greater than the first threshold and the interaction end condition is met, determining that the initial interaction result indicates that the virtual object is not within the predation range; The interaction termination condition includes: the first distance is greater than a second threshold or the duration of the virtual object entering the interaction mode is greater than a third threshold, wherein the second threshold is greater than the first threshold.

[0149] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 2, wherein determining the interaction result based on the predation state of the prey object includes: If the predation state of the prey object indicates that the prey object is successfully preyed, determining the interaction result is to indicate that the virtual object does not prey on the prey object; If the predation state of the prey object indicates that other virtual objects except the virtual object have not preyed on the prey object in the recent historical period, determining the interaction result as indicating that the virtual object preys on the prey object; If the predation state of the prey object indicates that other virtual objects other than the virtual object preyed on the prey object in a recent historical period, the movement of the virtual object is controlled based on the position of the prey object.

[0150] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 1, wherein the method further includes: If the interaction result indicates that the virtual object preys on the prey object, determining a target predation behavior pattern corresponding to the virtual object from a plurality of predation behavior patterns preset by the virtual object; Controlling the virtual object to interact with the prey object based on the target prey behavior pattern; After the virtual object is controlled to interact with the prey object based on the target prey behavior pattern, if the distance between the virtual object and the prey object is less than a fourth threshold, the prey result of the virtual object on the prey object is determined based on the movement state of the prey object.

[0151] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 5, wherein the target predator behavior mode is a cooperative mode; The controlling the virtual object to interact with the prey object based on the target prey behavior pattern includes: A collaboration signal is sent to associated virtual objects of the same type as the virtual object within a target range, wherein the collaboration signal is used to trigger the associated virtual objects to move to a position around the prey object, and the target range is used to indicate a range where the distance to the virtual object is less than a fifth threshold.

[0152] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 5, wherein determining the result of the virtual object capturing the prey object based on the movement state of the prey object comprises: If the movement state of the prey object indicates that the prey object has not moved, determining that the predation result is a successful predation; If the movement state of the prey object indicates that the prey object is moving, the prey result is determined based on a preset prey probability.

[0153] According to one or more embodiments of the present disclosure, Example 8 provides the method of Example 5, wherein the prey object is a bait, and the method further includes: If the capture result indicates that the virtual object has successfully captured the bait, determining a fishing result of the virtual object based on the item information of the virtual item associated with the bait; If the fishing result is a fishing failure, a target escape behavior mode is determined from a plurality of preset escape behavior modes, and the action of the virtual object is controlled based on the target escape behavior mode, and after the action of the virtual object is controlled based on the target escape behavior mode, a fishing failure effect of the virtual object is displayed; If the fishing result is successful, determining a target escape behavior mode from a plurality of preset escape behavior modes, and controlling the action of the virtual object based on the target escape behavior mode; In the process of controlling the action of the virtual object based on the target escape behavior pattern, in response to the action of the virtual prop, a target response behavior pattern is determined from a plurality of preset action response behavior patterns, and the action of the virtual object is controlled based on the target response behavior pattern; When it is determined that the virtual object is within the fishing range corresponding to the virtual prop, a successful fishing effect of the virtual object is displayed.

[0154] According to one or more embodiments of the present disclosure, Example 9 provides the method of Example 1, wherein the method further includes: If the virtual object receives the cooperation signal, a plurality of associated positions of the prey object in the virtual scene are obtained, wherein the associated positions are used to represent positions within a preset range centered on the prey object, and the relative relationship between the associated positions and the positions of the prey object remains unchanged; A target associated position is determined from the plurality of associated positions, and the virtual object is controlled to move toward the target associated position.

[0155] According to one or more embodiments of the present disclosure, Example 10 provides the method of Example 9, the method further comprising: In the process of controlling the virtual object to move toward the target associated position, if it is determined that the virtual object preys on the prey object, determining a prey position based on the position of the prey object, wherein the position of the prey object is different from the prey position; The virtual object is controlled to interact with the prey object based on the prey position.

[0156] According to one or more embodiments of the present disclosure, Example 11 provides the method of Example 9, wherein the method further includes: If the process of controlling the virtual object to move to the target associated position satisfies a collaboration termination condition, determining the target position of the virtual object, the target position and the target associated position are different, and the collaboration termination condition includes controlling the distance of the virtual object to move to the target associated position to reach a sixth threshold, or controlling the duration of the virtual object to move to the target associated position to reach a seventh threshold; Control the virtual object to move toward the target position.

[0157] According to one or more embodiments of the present disclosure, Example 12 provides the method of Example 1, wherein the method further includes: If a target virtual object under the target type is detected during the movement of the virtual object, a target avoidance behavior mode corresponding to the virtual object is determined from preset avoidance behavior modes; After controlling the action of the virtual object based on the target avoidance behavior pattern, determining a target position of the virtual object based on a current position of the virtual object; Control the virtual object to move toward the target position.

[0158] According to one or more embodiments of the present disclosure, Example 13 provides a control device for a virtual object, the device comprising: A first display module, used to display virtual objects in a virtual scene; A first determination module, configured to determine whether the virtual object enters an interaction mode for interacting with the prey object if a prey object is detected during the movement of the virtual object; A second determination module is configured to determine a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes if it is determined that the virtual object enters the interaction mode; The first control module is used to control the virtual object to interact with the prey object based on the target interactive behavior mode, and determine the interaction result between the virtual object and the prey object, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

[0159] According to one or more embodiments of the present disclosure, Example 14 provides a computer-readable medium having a computer program stored thereon, which implements the steps of any of the methods described in Examples 1-12 when executed by a processing device.

[0160] According to one or more embodiments of the present disclosure, Example 15 provides an electronic device, including: a storage device having a computer program stored thereon; A processing device is used to execute the computer program in the storage device to implement the steps of the method described in any one of Examples 1-12.

[0161] According to one or more embodiments of the present disclosure, Example 16 provides a computer program product, including a computer program, which implements the steps of any one of the methods of Examples 1-12 when executed by a processor.

[0162] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0163] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0164] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for controlling a virtual object, characterized in that: The method comprises: Display virtual objects in virtual scenes; If a prey object is detected during the movement of the virtual object, determining whether the virtual object enters an interaction mode for interacting with the prey object; If it is determined that the virtual object enters the interaction mode, determining a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes; The virtual object is controlled to interact with the prey object based on the target interactive behavior pattern, and an interaction result between the virtual object and the prey object is determined, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

2. The method according to claim 1, characterized in that: The step of controlling the virtual object to interact with the prey object based on the target interactive behavior pattern and determining the interaction result between the virtual object and the prey object includes: Controlling the virtual object to interact with the prey object based on the target interactive behavior mode, and determining an initial interaction result of the virtual object in the interactive mode, wherein the initial interaction result is used to indicate whether the virtual object is in a prey range corresponding to the prey object; If the initial interaction result indicates that the virtual object is in the prey range, the interaction result is determined based on the prey state of the prey object.

3. The method according to claim 2, characterized in that The step of controlling the virtual object to interact with the prey object based on the target interactive behavior mode and determining an initial interaction result of the virtual object in the interactive mode includes: In the process of controlling the virtual object to interact with the prey object based on the target interactive behavior mode, obtaining a first distance between the virtual object and the prey object at intervals of a preset time period; If the first distance is less than or equal to a first threshold corresponding to the predation range, determining that the initial interaction result indicates that the virtual object is within the predation range; If the first distance is greater than a first threshold and the interaction end condition is not met, after the virtual object is controlled to interact with the prey object based on the target interaction behavior mode, a new target interaction behavior mode corresponding to the virtual object is determined from the multiple interaction behavior modes, and the virtual object is controlled to interact with the prey object based on the new target interaction behavior mode; If the first distance is greater than the first threshold and the interaction end condition is met, determining that the initial interaction result indicates that the virtual object is not within the predation range; The interaction termination condition includes: the first distance is greater than a second threshold or the duration of the virtual object entering the interaction mode is greater than a third threshold, wherein the second threshold is greater than the first threshold.

4. The method according to claim 2, characterized in that: The determining the interaction result based on the predation state of the prey object includes: If the predation state of the prey object indicates that the prey object is successfully preyed, determining the interaction result is to indicate that the virtual object does not prey on the prey object; If the predation state of the prey object indicates that other virtual objects except the virtual object have not preyed on the prey object in the recent historical period, determining the interaction result as indicating that the virtual object preys on the prey object; If the predation state of the prey object indicates that other virtual objects other than the virtual object preyed on the prey object in a recent historical period, the movement of the virtual object is controlled based on the position of the prey object.

5. The method according to claim 1, characterized in that The method further comprises: If the interaction result indicates that the virtual object preys on the prey object, determining a target predation behavior pattern corresponding to the virtual object from a plurality of predation behavior patterns preset by the virtual object; Controlling the virtual object to interact with the prey object based on the target prey behavior pattern; After the virtual object is controlled to interact with the prey object based on the target predation behavior pattern, if the distance between the virtual object and the prey object is less than a fourth threshold, the predation result of the virtual object on the prey object is determined based on the movement state of the prey object.

6. The method according to claim 5, characterized in that The target predation behavior mode is a cooperative mode; The controlling the virtual object to interact with the prey object based on the target prey behavior pattern includes: A collaboration signal is sent to associated virtual objects of the same type as the virtual object within a target range, wherein the collaboration signal is used to trigger the associated virtual objects to move to a position around the prey object, and the target range is used to indicate a range where the distance to the virtual object is less than a fifth threshold.

7. The method according to claim 5, characterized in that The determining, based on the movement state of the prey object, the result of the virtual object capturing the prey object, comprises: If the movement state of the prey object indicates that the prey object has not moved, determining that the predation result is a successful predation; If the movement state of the prey object indicates that the prey object is moving, the prey result is determined based on a preset prey probability.

8. The method according to claim 5, characterized in that The prey object is a bait, and the method further comprises: If the capture result indicates that the virtual object has successfully captured the bait, determining a fishing result of the virtual object based on the item information of the virtual item associated with the bait; If the fishing result is a fishing failure, a target escape behavior mode is determined from a plurality of preset escape behavior modes, and the action of the virtual object is controlled based on the target escape behavior mode, and after the action of the virtual object is controlled based on the target escape behavior mode, a fishing failure effect of the virtual object is displayed; If the fishing result is successful, determining a target escape behavior mode from a plurality of preset escape behavior modes, and controlling the action of the virtual object based on the target escape behavior mode; In the process of controlling the action of the virtual object based on the target escape behavior pattern, in response to the action of the virtual prop, a target response behavior pattern is determined from a plurality of preset action response behavior patterns, and the action of the virtual object is controlled based on the target response behavior pattern; When it is determined that the virtual object is within the fishing range corresponding to the virtual prop, a successful fishing effect of the virtual object is displayed.

9. The method according to claim 1, characterized in that: The method further comprises: If the virtual object receives the cooperation signal, a plurality of associated positions of the prey object in the virtual scene are obtained, wherein the associated positions are used to represent positions within a preset range centered on the prey object, and the relative relationship between the associated positions and the positions of the prey object remains unchanged; A target associated position is determined from the plurality of associated positions, and the virtual object is controlled to move toward the target associated position.

10. The method according to claim 9, characterized in that The method further comprises: In the process of controlling the virtual object to move toward the target associated position, if it is determined that the virtual object preys on the prey object, determining a prey position based on the position of the prey object, wherein the position of the prey object is different from the prey position; The virtual object is controlled to interact with the prey object based on the prey position.

11. The method according to claim 9, characterized in that The method further comprises: If the process of controlling the virtual object to move to the target associated position satisfies a collaboration termination condition, determining the target position of the virtual object, the target position and the target associated position are different, and the collaboration termination condition includes controlling the distance of the virtual object to move to the target associated position to reach a sixth threshold, or controlling the duration of the virtual object to move to the target associated position to reach a seventh threshold; Control the virtual object to move toward the target position.

12. The method according to claim 1, characterized in that The method further comprises: If a target virtual object under the target type is detected during the movement of the virtual object, a target avoidance behavior mode corresponding to the virtual object is determined from preset avoidance behavior modes; After controlling the action of the virtual object based on the target avoidance behavior pattern, determining a target position of the virtual object based on a current position of the virtual object; Control the virtual object to move toward the target position.

13. A control device for a virtual object, characterized in that: The device comprises: A first display module, used to display virtual objects in a virtual scene; A first determination module, configured to determine whether the virtual object enters an interaction mode for interacting with the prey object if a prey object is detected during the movement of the virtual object; A second determination module is configured to determine a target interaction behavior mode corresponding to the virtual object from a plurality of interaction behavior modes if it is determined that the virtual object enters the interaction mode; The first control module is used to control the virtual object to interact with the prey object based on the target interactive behavior mode, and determine the interaction result between the virtual object and the prey object, wherein the interaction result is used to indicate whether the virtual object preys on the prey object.

14. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processing device, the steps of the method according to any one of claims 1 to 12 are implemented.

15. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 12.

16. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.