Interactive control method and apparatus for virtual object, device, medium, and product
By calculating the flight trajectory and attack direction of virtual objects, the interaction efficiency between controlled virtual objects and NPC virtual objects in the virtual scene is improved, the problem of low interaction efficiency is solved, multiple interactions and realistic flight effects are achieved, and enhanced Gameplay experience.
Patent Information
- Application Number
- PCT/CN2024/073459
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-22
- Filing Date
- 2024-01-22
- Publication Date
- 2024-09-26
AI Technical Summary
In virtual scenes, the interaction efficiency between controlled virtual objects controlled by players and NPC-type virtual objects is low. Existing technology is difficult to achieve realistic flight trajectories and multiple interactions, which affects the gameplay experience.
By determining the first and second hit directions of the virtual object, based on the connection direction of the root bone point and the virtual prop, combined with the speed and weight, the flight trajectory is calculated, so that the virtual object flies along a specific trajectory after being hit, and Trigger a second flight when preset conditions are met to improve interaction frequency and efficiency.
It achieves efficient interaction between virtual objects, improves the efficiency of human-computer interaction, enhances the diversity of gameplay and interactive experience, and achieves rapid health reduction of virtual objects through multiple hits and collisions.
Smart Images

Figure CN2024073459_26092024_PF_FP
Abstract
Description
Interactive control method, device, equipment, medium and product for virtual objects
[0001] This application claims priority to Chinese patent application No. 202310325401.3, filed on March 22, 2023, entitled “Method, device, equipment, medium and product for interactive control of virtual objects,” the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a method, device, equipment, medium and product for interactive control of a virtual object. Background Art
[0003] A virtual scene generally includes multiple types of virtual objects, such as controlled virtual objects controlled by players and first virtual objects of NPC (Non-Player Character) type.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a method, device, equipment, medium, and product for interactive control of virtual objects, which improves the efficiency of human-computer interaction. The technical solution is as follows:
[0006] In one aspect, a method for interactive control of a virtual object is provided, the method comprising:
[0007] displaying a virtual scene interface, wherein the virtual scene interface displays a first virtual object;
[0008] In response to the controlled virtual object hitting the first virtual object, displaying in the virtual scene interface that the first virtual object is flying along a first flight trajectory after being hit, the controlled virtual object being a virtual object controlled by the terminal;
[0009] In response to the first virtual object being hit at a target location by the second virtual object during flight, and the second virtual object meeting a preset condition, the first virtual object is displayed in the virtual scene interface flying along a second flight trajectory after being hit.
[0010] In another aspect, a method for interactive control of a virtual object is provided, the method comprising:
[0011] In response to a controlled virtual object in a virtual scene hitting a first virtual object, determining a first hit direction of the first virtual object based on the direction of an extension of a line connecting a root skeleton point of the controlled virtual object and a root skeleton point of the first virtual object, and determining a first flight trajectory based on the first hit direction, a first speed, and a virtual weight of the first virtual object, so that the first virtual object flies along the first flight trajectory after being hit, where the controlled virtual object is a virtual object controlled by the terminal;
[0012] In response to the first virtual object being hit at a target part during flight, determining a secondary hit direction of the first virtual object based on the direction of an extension line of a line connecting a virtual prop that hits the first virtual object and a root bone point of the first virtual object, and determining a second flight trajectory based on the secondary hit direction, a second speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the second flight trajectory after being hit;
[0013] The first speed is the speed of the first virtual object in the direction of the first strike, and the second speed is the speed of the first virtual object in the direction of the second strike.
[0014] In another aspect, a device for interactive control of a virtual object is provided, the device comprising:
[0015] An interface display module, configured to display a virtual scene interface, wherein the virtual scene interface displays a first virtual object;
[0016] a flight display module, configured to display, in response to a controlled virtual object hitting the first virtual object, in the virtual scene interface, the first virtual object flying along a first flight trajectory after being hit, wherein the controlled virtual object is a virtual object controlled by the terminal;
[0017] The flight display module is further configured to display, in response to the first virtual object being hit at a target location by a second virtual object during flight, and the second virtual object meeting a preset condition, the first virtual object flying along a second flight trajectory after being hit in the virtual scene interface.
[0018] In another aspect, a device for interactive control of a virtual object is provided, the device comprising:
[0019] a first trajectory determination module for, in response to a controlled virtual object in a virtual scene hitting a first virtual object, determining a first hit direction of the first virtual object based on a direction of an extension of a line connecting a root skeleton point of the controlled virtual object and a root skeleton point of the first virtual object, and determining a first flight trajectory based on the first hit direction, a first velocity, and a virtual weight of the first virtual object, so that the first virtual object flies along the first flight trajectory after being hit, wherein the controlled virtual object is a virtual object controlled by the terminal;
[0020] a second trajectory determination module configured to, in response to the first virtual object being hit at a target part during flight, determine a secondary hit direction of the first virtual object based on a direction of an extension of a line connecting a virtual prop that hits the first virtual object and a root bone point of the first virtual object, and determine a second flight trajectory based on the secondary hit direction, a second speed, and a virtual weight of the first virtual object, so that the first virtual object flies along the second flight trajectory after being hit;
[0021] The first speed is the speed of the first virtual object in the direction of the first strike, and the second speed is the speed of the first virtual object in the direction of the second strike.
[0022] On the other hand, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the interactive control method of the virtual object in the embodiment of the present application.
[0023] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the interactive control method of a virtual object in an embodiment of the present application.
[0024] On the other hand, a computer program product is provided, which includes a computer program, the computer program being stored in a computer-readable storage medium, the processor of a computer device reading the computer program from the computer-readable storage medium, and the processor executing the computer program, so that the computer device executes the interactive control method of a virtual object described in any of the above-mentioned implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.
[0026] FIG1 is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0027] FIG2 is a flow chart of a method for interactive control of a virtual object provided in an embodiment of the present application;
[0028] FIG3 is a flow chart of another method for interactive control of a virtual object provided in an embodiment of the present application;
[0029] FIG4 is a flow chart of another method for interactive control of a virtual object provided in an embodiment of the present application;
[0030] FIG5 is a schematic diagram of determining a striking direction according to an embodiment of the present application;
[0031] FIG6 is a schematic diagram of a flight process provided by an embodiment of the present application;
[0032] FIG7 is a flowchart of another method for interactive control of a virtual object provided in an embodiment of the present application;
[0033] FIG8 is a schematic diagram of a virtual object impact provided by an embodiment of the present application;
[0034] FIG9 is a schematic diagram of another virtual object that impacts an embodiment of the present application;
[0035] FIG10 is a schematic diagram of a virtual object interaction provided by an embodiment of the present application;
[0036] FIG11 is a flowchart of another method for interactive control of a virtual object provided in an embodiment of the present application;
[0037] FIG12 is a flowchart of another method for interactive control of a virtual object provided in an embodiment of the present application;
[0038] FIG13 is a schematic diagram of interrupt priority between multiple states provided in an embodiment of the present application;
[0039] FIG14 is a block diagram of a virtual object interactive control device provided in an embodiment of the present application;
[0040] FIG15 is a block diagram of a virtual object interactive control device provided in an embodiment of the present application;
[0041] FIG16 is a block diagram of a terminal provided in an embodiment of the present application;
[0042] Figure 17 is a block diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail with reference to the accompanying drawings. In the present application, the terms "first", "second", etc. are used to distinguish between identical or similar items with substantially the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there a limit on the quantity and execution order. In the present application, the term "at least one" refers to one or more, and the meaning of "multiple" refers to two or more. It should be noted that the information involved in this application (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions. For example, the virtual scene interfaces involved in this application are all obtained with full authorization.
[0044] When running a virtual scene, the player controls the controlled virtual object to attack the first virtual object, reducing the health of the first virtual object to achieve interaction between virtual objects. However, the first virtual object can generally only be hit in place, making the interaction between virtual objects less efficient.
[0045] The following is an introduction to the professional terms involved in this application:
[0046] Virtual scene: a virtual scene displayed (or provided) when the application is running on the terminal. The virtual scene may be a simulation of the real world, a semi-simulation and semi-fictitious virtual environment, or a purely fictitious virtual environment. Optionally, the virtual scene is any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiment of the present application does not limit the dimension of the virtual scene. For example, the virtual scene includes the sky, land, ocean, etc., and the land includes environmental elements such as deserts and cities. The terminal user can control the movement of virtual objects in the virtual scene.
[0047] Virtual object: refers to an movable object in a virtual world. The movable object is at least one of a virtual person, a virtual animal, and an animated character. Optionally, when the virtual world is a three-dimensional virtual world, the virtual object is a three-dimensional model. Each virtual object has its own shape and volume in the three-dimensional virtual world and occupies a portion of the space in the three-dimensional virtual world. Optionally, the virtual object is a three-dimensional character constructed based on three-dimensional human skeleton technology. The virtual object achieves different external images by wearing different skins. In some implementations, virtual objects can also be implemented using 2.5-dimensional or 2-dimensional models, which is not limited in the embodiments of the present application.
[0048] Open world: refers to a virtual scene that is completely free and open. Virtual objects can move freely in any direction to explore. The distances between the boundaries of various directions are very large. At the same time, there are simulated objects of various shapes and sizes in the scene, which can produce various physical collisions or interactions with virtual objects and other entities.
[0049] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0050] The following is an introduction to the implementation environment involved in this application:
[0051] The interactive control method for virtual objects provided in embodiments of the present application can be executed by a computer device. The computer device can be a terminal or a server. The following describes a schematic diagram of the implementation environment of the interactive control method for virtual objects provided in embodiments of the present application. Referring to Figure 1, Figure 1 shows a schematic diagram of the implementation environment of the interactive control method for virtual objects provided in embodiments of the present application. The implementation environment includes a terminal 101 and a server 102. Terminal 101 and server 102 can be connected directly or indirectly via wired or wireless communication, which is not limited herein. In some embodiments, terminal 101 is installed with a target application that runs a virtual scene. The virtual scene includes a controlled virtual object and NPC-type virtual objects controlled by terminal 101. Terminal 101 is used to control the interaction between the controlled virtual object and other virtual objects, and terminal 101 is used to display the interaction effects. Server 102 is the background server of the target application, which is used to provide background services for the operation of the virtual scene. For example, server 102 is used to provide the trajectory of the virtual object moving in the virtual scene. Optionally, terminal 101 itself can also determine the trajectory of the virtual object moving in the virtual scene, which is not specifically limited here.
[0052] In some embodiments, the terminal 101 is a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance, a vehicle-mounted terminal, an aircraft, a VR (Virtual Reality) device, an AR (Augmented Reality) device, etc., but is not limited thereto. In some embodiments, the server 102 is an independent server or a server cluster or distributed system composed of multiple servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In some embodiments, the server 102 is primarily responsible for computing work, and the terminal 101 is responsible for secondary computing work; or, the server 102 is responsible for secondary computing services, and the terminal 101 is responsible for primary computing work; or, the server 102 and the terminal 101 use a distributed computing architecture for collaborative computing.
[0053] Refer to Figure 2, which is a flowchart of a method for interactive control of a virtual object provided in an embodiment of the present application. The method is executed by a computer device. In the embodiment of the present application, the computer device is taken as an example to be explained as a terminal. The method includes the following steps.
[0054] 201. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0055] In an embodiment of the present application, the virtual scene interface is an interface within a virtual scene, and the virtual scene includes multiple virtual objects. The multiple virtual objects include controlled virtual objects controlled by a terminal and NPC-type virtual objects. The controlled virtual objects complete tasks by hitting NPC-type virtual objects. In an embodiment of the present application, the first virtual object is an NPC-type virtual object. Furthermore, the first virtual object is an artificial intelligence object, which refers to an object controlled by an artificial intelligence module, that is, the artificial intelligence module can control the virtual object to perform various actions in the virtual scene.
[0056] 202. In response to the controlled virtual object hitting the first virtual object, the terminal displays in a virtual scene interface that the first virtual object is flying along a first flight trajectory after being hit. The controlled virtual object is the virtual object controlled by the terminal.
[0057] In the embodiments of the present application, the perspective of the virtual scene is either first-person or third-person. In the first-person perspective, the controlled virtual object is not displayed on the virtual scene interface. In the third-person perspective, the controlled virtual object is displayed on the virtual scene interface, i.e., the camera of the virtual scene is behind the controlled virtual object, and the virtual scene interface displays the controlled virtual object and its surrounding environment. In the embodiments of the present application, the third-person perspective is used as an example for explanation.
[0058] In the embodiments of this application, hitting refers to hitting in any of the following interactive forms: hitting with a virtual prop or hitting with a physical body, without specific limitation. Specifically, a controlled virtual object hitting a first virtual object with a physical body means that the controlled virtual object performs a physical attack on the first virtual object. For example, if the physical attack action is hitting, then the controlled virtual object hitting the first virtual object means that the controlled virtual object hits the first virtual object.
[0059] In this embodiment of the present application, the first virtual object can not only be hit by the controlled virtual object, but can also collide with the virtual object. A collision between the first virtual object and the virtual object refers to physical contact between the first virtual object and the virtual object caused by either the first virtual object or the virtual object performing a movement action. In other words, the collision is caused by unintentional contact, not by physical attack.
[0060] 203. In response to the first virtual object being hit by the second virtual object at a target location during flight, and the second virtual object meeting a preset condition, the terminal displays in the virtual scene interface the first virtual object flying along a second flight trajectory after being hit.
[0061] In some embodiments, the target site is any one of at least one predetermined site, including the back and chest, and not specifically limited herein. Alternatively, the target site is any one of at least one vulnerable site, including the head and neck, and not specifically limited herein. Optionally, different types of virtual objects have different vulnerable sites, and thus different target sites are selected for different types of virtual objects.
[0062] In the embodiment of the present application, the first virtual object is hit during flight and deviates from the original flight trajectory. Accordingly, the second flight trajectory is a trajectory that deviates from the first flight trajectory.
[0063] The embodiment of the present application provides a method for interactive control of virtual objects, which controls a controlled virtual object to hit a first virtual object, triggering the first virtual object to fly after being hit, and after the first virtual object is hit by a virtual object that meets preset conditions during flight, triggering flight after being hit a second time. In this way, as long as the controlled virtual object meets the preset conditions, the controlled virtual object can also interact with the virtual object in flight, that is, the controlled virtual object can interact with the same first virtual object multiple times, which innovates the gameplay, improves the efficiency of interaction with the first virtual object, and thus improves human-computer efficiency. In addition, since the flight time of the first virtual object after being hit is generally short, the controlled virtual object triggers the first virtual object to fly after being hit a second time, that is, the controlled virtual object hits the first virtual object multiple times in a short period of time, thus achieving multiple interactions between the controlled virtual object and the first virtual object in a short period of time, further improving human-computer interaction efficiency.
[0064] Figure 2 shows the interface display of interactive control of virtual objects. The following describes the background process of interactive control of virtual objects based on Figure 3. Referring to Figure 3, Figure 3 is a flow chart of a method for interactive control of virtual objects provided in an embodiment of the present application. The method is executed by a computer device, which is a terminal or a server. In the embodiment of the present application, the computer device is a terminal as an example. The method includes the following steps.
[0065] 301. In response to a controlled virtual object in a virtual scene hitting a first virtual object, the terminal determines a first hit direction of the first virtual object based on the direction of an extension of a line between a root skeleton point of the controlled virtual object and a root skeleton point of the first virtual object, and determines a first flight trajectory based on the first hit direction, a first velocity of the first virtual object, and a virtual weight, so that the first virtual object flies along the first flight trajectory after being hit, where the controlled virtual object is a virtual object controlled by the terminal, and the first velocity is a velocity of the first virtual object in the first hit direction.
[0066] In an embodiment of the present application, the terminal determines the first hit direction of the first virtual object based on the direction of the extension line of the line between the root skeleton point of the controlled virtual object and the root skeleton point of the first virtual object, which means that the terminal uses the direction of the extension line as the first hit direction.
[0067] In an embodiment of the present application, the first speed is positively correlated with the attack strength and attack speed of the controlled virtual object, and negatively correlated with the virtual weight of the first virtual object, that is, the greater the attack strength, the greater the attack speed, and the smaller the virtual weight, the greater the first speed.
[0068] In some embodiments, the process of determining the first flight trajectory by the terminal based on the direction of the first hit, the first speed of the first virtual object, and the virtual weight includes the following steps: the terminal determines the first horizontal speed and the first vertical speed of the first virtual object based on the direction of the first hit and the first speed, the first horizontal speed and the first vertical speed being the speed of the first virtual object in the horizontal direction and the vertical direction, respectively; the terminal determines the position of the first virtual object at multiple first time points based on the first hit position, the first horizontal speed, the first vertical speed, and the virtual weight of the first virtual object to obtain the first flight trajectory, the multiple first time points including the time point when the first virtual object reaches the end point of the first flight trajectory and the time point before reaching the end point. In this embodiment, the speed in the horizontal and vertical directions is first determined, and then the displacement in the horizontal and vertical directions during the flight can be predicted, thereby predicting multiple positions during the flight and then obtaining the flight trajectory, thereby improving the rationality and accuracy of determining the flight trajectory.
[0069] In an embodiment of the present application, the process of the terminal determining the first horizontal speed and the first vertical speed of the first virtual object based on the first impact direction and the first speed includes the following steps: the terminal obtains the angles between the first impact direction and the horizontal direction and the vertical direction respectively, and based on the angles, decomposes the first speed into the horizontal direction and the vertical direction to obtain the first horizontal speed and the first vertical speed.
[0070] Optionally, the first virtual object moves at a uniform speed in the horizontal direction and moves in the vertical direction due to gravity acceleration. Accordingly, for each first time point, the terminal determines the time difference between the first time point and the time point when the first virtual object is hit, takes the product of the time difference and the first horizontal velocity as the horizontal displacement of the first time point, and takes the sum of the horizontal coordinate of the first hit position of the first virtual object and the horizontal displacement as the horizontal coordinate corresponding to the first time point. The terminal determines the vertical displacement of the first time point based on the time difference, the first vertical velocity and the acceleration of gravity, takes the sum of the vertical coordinate of the first hit position of the first virtual object and the vertical displacement as the vertical coordinate corresponding to the first time point, and thus obtains the position of the first time point, which includes the horizontal coordinate and vertical coordinate corresponding to the first time point.
[0071] In the embodiment of the present application, the positions of the multiple first time points are arranged in ascending order within the first flight trajectory. Consequently, when the first virtual object flies along the first flight trajectory, it moves sequentially within the multiple positions according to the order of the multiple positions. The time intervals between each of the multiple first time points can be set and modified as needed and are not specifically limited herein.
[0072] 302. In response to the first virtual object being hit on a target part during flight, the terminal determines a secondary hit direction of the first virtual object based on the direction of an extension line of a line connecting the virtual prop that hits the first virtual object and a root bone point of the first virtual object, and determines a second flight trajectory based on the secondary hit direction, a second speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the second flight trajectory after being hit, where the second speed is the speed of the first virtual object in the secondary hit direction.
[0073] In an embodiment of the present application, the terminal determines the secondary hit direction of the first virtual object based on the direction of the extension line of the line between the virtual prop that hits the first virtual object and the root bone point of the first virtual object, which means that the terminal uses the direction of the extension line as the secondary hit direction.
[0074] In the embodiment of the present application, the second speed is related to the attack strength, attack speed, type of props, virtual weight of the first virtual object, and speed of the first virtual object during flight of the virtual object that hits the first virtual object for the second time.
[0075] In some embodiments, the process of determining the second flight trajectory by the terminal based on the secondary impact direction, the second speed of the first virtual object, and the virtual weight includes the following steps: the terminal determines the second horizontal speed and the second vertical speed of the first virtual object based on the secondary impact direction and the second speed, where the second horizontal speed and the second vertical speed are the speeds of the first virtual object in the horizontal direction and the vertical direction, respectively; the terminal determines the position of the first virtual object at multiple second time points based on the secondary impact position, the second horizontal speed, the second vertical speed, and the virtual weight of the first virtual object to obtain the second flight trajectory, where the multiple second time points include the time point when the first virtual object reaches the end point of the second flight trajectory and the time point before reaching the end point. In this embodiment, the speed in the horizontal and vertical directions is first determined, and then the displacement in the horizontal and vertical directions during the flight process can be predicted, thereby predicting multiple positions during the flight process, and then the flight trajectory can be obtained, which improves the rationality and accuracy of determining the flight trajectory.
[0076] The process of the terminal determining the second horizontal speed and the second vertical speed, and determining the positions of the plurality of second time points is similar to that in step 301 and will not be described in detail herein.
[0077] In the embodiment of the present application, the initial flight direction is determined based on the extension of the line connecting the root bone points of the two virtual objects, and the first flight trajectory is then determined by combining the speed and virtual weight in that direction. This first flight trajectory is determined in accordance with physical principles and has high accuracy, so that the first virtual object can display a realistic flight effect when flying along the first flight trajectory. Similarly, the second flight trajectory is determined in accordance with physical principles and has high accuracy, so that the first virtual object can display a realistic flight effect when flying along the second flight trajectory.
[0078] Figure 2 illustrates the basic process of interactive control of a virtual object, and Figure 3 illustrates the process of determining a flight trajectory. The following further illustrates the process of interactive control of a virtual object based on Figure 4. Referring to Figure 4, a flow chart of a method for interactive control of a virtual object provided in an embodiment of the present application is shown. This method is executed by a computer device. In this embodiment of the present application, the computer device is illustrated as a terminal. The method includes the following steps.
[0079] 401. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0080] In the embodiment of the present application, when the perspective of the virtual scene is a first-person perspective, the controlled virtual object is not displayed in the virtual scene interface. When the perspective of the virtual scene is a third-person perspective, the controlled virtual object is still displayed in the virtual scene interface. In the embodiment of the present application, the virtual scene is a virtual scene in an open world, and the virtual scene interface is the interface within the perspective of the controlled virtual object. Accordingly, the first virtual object is a virtual object within the perspective of the controlled virtual object.
[0081] 402. In response to the controlled virtual object hitting the first virtual object and the hit value of the first virtual object reaching a hit threshold, the terminal determines a first flight trajectory of the first virtual object based on a relative positional relationship between the controlled virtual object and the first virtual object, where the controlled virtual object is a virtual object controlled by the terminal, and the hit value is used to indicate the number of times the first virtual object is hit.
[0082] In an embodiment of the present application, the hit value is the number of hits or the hit score. Accordingly, in the case where the hit value is the number of hits, the hit threshold is the preset number of hits; in the case where the hit value is the hit score, the hit threshold is the preset hit score. Each time the first virtual object is hit, the hit value of the first virtual object is adjusted; when the hit value reaches the hit threshold, it indicates that the first virtual object meets the conditions for flying after being hit, and then the first virtual object is displayed as flying after being hit. Optionally, in the case where the hit value is the number of hits, and the preset number of hits is one, the controlled virtual object only needs to hit the first virtual object once, and the terminal will display the first virtual object flying after being hit.
[0083] In an embodiment of the present application, when the hit value is a number of hits, the preset number of hits is optionally associated with at least one of the type of the first virtual object and the ability value of the controlled virtual object. Different types of virtual objects have different health values. The ability value represents the ability of the controlled virtual object to adjust the health value of the first virtual object. The greater the ability value of the controlled virtual object, the greater the health loss caused to the first virtual object when hitting the first virtual object, that is, the greater the reduction in the health value of the first virtual object. Optionally, the preset number of hits is associated with the type of the first virtual object, and accordingly, the preset number of hits is obtained from the correspondence between the type of the virtual object and the preset number of hits. Alternatively, the preset number of hits is associated with the ability value of the controlled virtual object, and accordingly, the preset number of hits is obtained from the correspondence between the ability value of the controlled virtual object and the preset number of hits. Alternatively, the preset number of hits is associated with both the type of the first virtual object and the ability value of the controlled virtual object, and accordingly, the preset number of hits is obtained from the correspondence between the type of the virtual object and the ability value of the controlled virtual object, and the preset number of hits. In some embodiments, the preset number of hits is also associated with the type of virtual item used by the controlled virtual object. Each hit of a first virtual object with a different type of virtual item results in a different adjustment to the health of the first virtual object. Alternatively, the preset number of hits is associated with the type of virtual item, and accordingly, the preset number of hits is obtained from the correspondence between the type of virtual item and the preset number of hits. Alternatively, the preset number of hits is associated with the type of virtual item and is also associated with at least one of the type of the first virtual object and the ability value of the controlled virtual object. Accordingly, the preset number of hits is obtained from the correspondence between the at least two associated items and the preset number of hits.
[0084] In the case where the hit value is a hit score, the hit threshold is a preset hit score. Each time the first virtual object is hit, the adjustment amplitude of the hit score of the first virtual object is associated with at least one of the type of the first virtual object, the ability value of the controlled virtual object, and the type of the virtual prop. Optionally, the adjustment amplitude is associated with one of the type of the first virtual object, the ability value of the controlled virtual object, and the type of the virtual prop, and accordingly, the adjustment amplitude is obtained from the correspondence between the item and the adjustment amplitude. Alternatively, the adjustment amplitude is associated with two of the type of the first virtual object, the ability value of the controlled virtual object, and the type of the virtual prop, and accordingly, the adjustment amplitude is obtained from the correspondence between these two items and the adjustment amplitude. Alternatively, the adjustment amplitude is associated with the type of the first virtual object, the ability value of the controlled virtual object, and the type of the virtual prop, and accordingly, the adjustment amplitude is obtained from the correspondence between these three items and the adjustment amplitude.
[0085] In some embodiments, before the first virtual object is hit by the controlled virtual object, the first virtual object can also be hit by other controlled virtual objects, that is, the hit value of the first virtual object refers to the cumulative hit value after the first virtual object is hit by at least one controlled virtual object.
[0086] In this embodiment of the present application, a hit value is set for the first virtual object, so that the first virtual object can only fly after being hit multiple times. This implements a mechanism that uses the hit value to produce a specific knockback effect on the first virtual object. Furthermore, because the adjustment range of the hit value and the preset number of hits are flexibly and dynamically determined based on the type of the first virtual object, the ability value of the controlled virtual object, and the type of virtual item, the probability of the virtual object flying after each hit is dynamically set to a percentage.
[0087] In some embodiments, the terminal determines the first flight trajectory of the first virtual object based on the relative positional relationship between the controlled virtual object and the first virtual object, which means that: the terminal determines the extension line of the line between the controlled virtual object and the first virtual object, takes the position of the first virtual object when it is hit as the starting point of the first flight trajectory, and takes the direction of the extension line as the direction of the first flight trajectory at the starting point. The direction of the first flight trajectory at the starting point is also the direction of the first virtual object being hit for the first time. In this embodiment, the first flight trajectory is determined based on the direction of the extension line of the line between the two virtual objects, so that the flight trajectory matches the positional relationship between the two virtual objects, and then the flight trajectory is flexibly and dynamically determined based on different positional relationships, which can improve the effect of flying based on the flight trajectory. For example, see Figure 5, which is a schematic diagram of determining the direction of being hit provided in an embodiment of the present application.
[0088] Optionally, the line connecting the controlled virtual object and the first virtual object refers to a line connecting the root skeleton points of the two virtual objects or a line connecting the centers of gravity of the two virtual objects, without specific limitation herein. If the line connecting the controlled virtual object and the first virtual object refers to a line connecting the root skeleton points of the two virtual objects, then the process of determining the first flight trajectory based on the direction of the extended line of the line is similar to step 301 and is not further described here.
[0089] In an embodiment of the present application, the first flight trajectory is determined by program drive, and the above steps are described by taking the terminal itself determining the first flight trajectory as an example. In other embodiments, the terminal determines the first flight trajectory through a server, which is a background server of a target application running a virtual scene. In other embodiments, the terminal and the server respectively determine the first flight trajectory, so that in the event that an error occurs in the first flight trajectory determined by the terminal, the first flight trajectory determined by the terminal can be adjusted in time through the first flight trajectory determined by the server to obtain an accurate first flight trajectory. It should be noted that step 402 is only an optional implementation method for determining the first flight trajectory, and the first flight trajectory can also be determined by other optional implementation methods, which are not specifically limited here. For example, a preset fixed flight trajectory is used as the first flight trajectory.
[0090] 403. The terminal displays, based on the first flight trajectory, in a virtual scene interface, the first virtual object flying along the first flight trajectory after being hit.
[0091] In some embodiments, the terminal displays in the virtual scene interface that the first virtual object flies along the first flight trajectory after being hit, including the following steps: the terminal determines, based on the side of the first virtual object that is hit, from multiple flight forms, a target flight form that matches the hit side, the multiple flight forms corresponding to multiple sides of the virtual object, and the flight form refers to the body form during the flight; the terminal displays in the virtual scene interface that the first virtual object flies along the first flight trajectory in the target flight form.
[0092] In an embodiment of the present application, multiple sides refer to the front, back, left, right, etc. of the first virtual object, and multiple sides correspond to different flight forms. Multiple flight forms can be set and changed as needed. For example, when the side that is hit is the front, the target flight form is the form in which the body of the first virtual object is bent backward. Correspondingly, the first virtual object flying along the first flight trajectory in the target flight form means that the first virtual object flies backward along the first flight trajectory with its body bent backward. In an embodiment of the present application, a flight form that matches the side that is hit is selected from multiple flight forms, thereby improving the diversity and efficiency of displaying the flight process, thereby improving the display effect. In some embodiments, the flight form that matches each side also includes multiple sub-forms, and the multiple sub-forms correspond to different hitting methods and hitting times. The terminal can also select a more accurate flight form from the multiple sub-forms of the hit side based on the way the first virtual object is hit and the time it is hit.
[0093] In some embodiments, the flight process is presented in the form of an animation. Optionally, the flight process includes multiple basic animations such as a knockdown start animation (KnockDown_Start), a knockdown loop animation (KnockDown_Loop), a knockdown end animation (KnockDown_End), and a knockdown bump animation (KnockDown_Bump). The knockdown start animation refers to the flying animation displayed when the first virtual object is triggered to fly after being hit, and is composed of multiple flight forms. Which flight form is used to form the animation is determined according to the side of the virtual object that is hit, as the knockdown start animation. The knockdown loop animation refers to the cyclic flight animation of the virtual object during the flight process. The knockdown end animation refers to the animation of the virtual object landing normally after flying. The knockdown bump animation refers to the animation of the virtual object colliding with other virtual objects or virtual objects during the flight. For example, see Figure 6, which is a schematic diagram of a flight process provided in an embodiment of the present application. Among them, when the first virtual object is hit from the front by the controlled virtual object with a virtual prop, the first virtual object's body bends backward and performs a flight displacement backward.
[0094] In an embodiment of the present application, the landing point of the first virtual object's flight should be located on the movable area (navmesh) of the virtual scene. Accordingly, when the end point of the first flight trajectory is located in the inactive area of the virtual scene, the terminal adjusts the end point of the first flight trajectory so that the adjusted end point is located in the movable area of the virtual scene. When the end point of the first flight trajectory is located in the movable area of the virtual scene, there is no need to adjust the end point of the first flight trajectory. Among them, the end point of the first flight trajectory is determined based on the initial velocity vector of the first virtual object when it is flying after being hit and the physical effect of gravity. That is, a parabola is calculated by the initial velocity vector and the weight of the first virtual object to obtain the first flight trajectory. In this embodiment, by controlling the landing point to be located in the movable area of the virtual scene, it is avoided that the virtual object flying after being hit is stuck in some immovable positions in the virtual scene.
[0095] In some embodiments, the process of adjusting the end point of the first flight trajectory includes the following steps: the position closest to the end point of the first flight trajectory in the walkable area is used as the adjusted end point. Optionally, in the case where there are multiple positions closest to the end point of the first flight trajectory in the walkable area, the position directly below the first flight trajectory among the multiple positions is used as the adjusted end point, so that the end point matches the flight trajectory. In this embodiment, by adjusting the end point of the first flight trajectory, the landing point of the virtual object is located within the movable area, and the adjusted end point matches the first flight trajectory, thereby improving the reliability and accuracy of the adjusted end point. Accordingly, based on the first flight trajectory and the adjusted end point, the terminal displays in the virtual scene interface that the first virtual object flies along the first flight trajectory after being hit.
[0096] In some embodiments, the virtual scene includes virtual objects that are allowed to fly after being hit and virtual objects that are not allowed to fly after being hit. Optionally, the virtual objects that are not allowed to fly after being hit are marked with a first tag, and the first tag indicates that the virtual object is not allowed to fly after being hit. Optionally, when the controlled virtual object hits the first virtual object, it is detected whether the first virtual object carries the first tag. Only when the first virtual object does not carry the first tag, the above steps 402-403 are performed. If the first virtual object carries the first tag, then when the first virtual object is hit by the controlled virtual object, the hit value is not accumulated, and accordingly, the first virtual object will not be triggered to fly.
[0097] 404. In response to the first virtual object being hit by the second virtual object at a target location during flight, and the second virtual object meeting a preset condition, the terminal displays in the virtual scene interface the first virtual object flying along a second flight trajectory after being hit.
[0098] In the embodiment of the present application, a virtual object in flight generally does not trigger a new flight. In order to increase the gameplay diversity in the virtual scene, an additional (perk) correction is provided to set the gameplay in which the first virtual object in flight can fly after being hit a second time.
[0099] In an embodiment of the present application, the second virtual object satisfies a preset condition, including at least one of the following: the ability value of the second virtual object satisfies the preset ability value; or the virtual props used by the second virtual object are preset props. The preset ability value and preset props are set and modified as needed and are not specifically limited here. In an embodiment of the present application, by setting a restriction condition for triggering flight after being knocked back a second time, users are encouraged to improve the ability value of the controlled virtual object and obtain preset props, thereby promoting participation in the virtual scene.
[0100] In other embodiments, in response to a first virtual object being hit by a second virtual object at a target location while in flight, the terminal displays the first virtual object flying along a second flight trajectory after being hit in a virtual scene interface in response to the second virtual object meeting a preset condition and allowing the first virtual object to fly after being hit a second time. In this embodiment, by setting different post-hit flight gameplay for different virtual objects, gameplay diversity is increased, thereby increasing interaction diversity.
[0101] In an embodiment of the present application, the second flight trajectory is determined based on the relative positional relationship between the first virtual object and the second virtual object. In some embodiments, the process for determining the second flight trajectory is similar to the process for determining the first flight trajectory in step 402 and is not further described here. In other embodiments, the second flight trajectory is determined based on the direction of the extension of the line connecting the root bone point of the first virtual object and the virtual prop that hit the first virtual object. This process is similar to step 302 and is not further described here.
[0102] In some embodiments, if the endpoint of the second flight trajectory is located in an inactive area of the virtual scene, the terminal adjusts the endpoint of the second flight trajectory so that the adjusted endpoint is located in an active area of the virtual scene. The process for adjusting the endpoint of the second flight trajectory is similar to the process for adjusting the endpoint of the first flight trajectory in step 403 and is not further described here.
[0103] In some embodiments, in response to a first virtual object being hit at a target part by a second virtual object during flight and the second virtual object meeting a preset condition, the terminal determines a life adjustment ratio of the first virtual object based on the ability value of the second virtual object, and adjusts the life value of the first virtual object based on the life adjustment ratio of the first virtual object, and the life adjustment ratio of the first virtual object is positively correlated with the ability value of the second virtual object.
[0104] In the embodiment of the present application, adjusting the health value of the first virtual object refers to reducing the health value of the first virtual object. Adjusting the health value of the first virtual object based on the health value adjustment ratio (n%) of the first virtual object refers to determining the product of the health value of the first virtual object and the health value adjustment ratio, and using the difference between the health value of the first virtual object and the product as the adjusted health value.
[0105] Accordingly, when the health value of the first virtual object has not been adjusted to the threshold, the terminal displays in the virtual scene interface that the second virtual object is flying along the second flight trajectory after being hit; when the health value of the first virtual object is adjusted to the threshold, the terminal displays in the virtual scene interface that the first virtual object is eliminated.
[0106] In one implementation, the terminal determines the life value adjustment ratio of the first virtual object based on the ability value of the second virtual object, which means that the terminal determines the life value adjustment ratio of the first virtual object based on the ability value of the second virtual object and the type of the first virtual object. Optionally, the process of the terminal determining the life value adjustment ratio of the first virtual object based on the ability value of the second virtual object and the type of the first virtual object includes the following steps: the terminal determines the target correspondence corresponding to the type of the first virtual object from multiple correspondences based on the type of the first virtual object, and the multiple correspondences correspond to multiple types of virtual objects. The terminal determines the life value adjustment ratio corresponding to the ability value of the second virtual object from the target correspondence, and the target correspondence includes the life value adjustment ratios corresponding to multiple ability values. In an embodiment of the present application, the life value adjustment ratio is determined based on the ability value of the second virtual object and the type of the first virtual object, thereby realizing flexible and dynamic determination of the life value adjustment ratio, making the determined life value adjustment ratio more accurate, and thus realizing accurate adjustment of the life value.
[0107] In the embodiment of the present application, the threshold value refers to zero. The elimination of the first object in the virtual scene interface means that the first virtual object in the virtual scene interface disappears instantly, or disappears gradually, or becomes larger and then disappears, so as to improve the display effect.
[0108] In the embodiment of the present application, the basic armor of the default virtual object is relatively thick. When the controlled virtual object hits the virtual object, the virtual object is triggered to fly for the first time after being hit, and the health value of the virtual object is slightly reduced or not reduced. However, by hitting the virtual object in flight, not only is the flight triggered after being hit for the second time, but the health value of the virtual object can also be reduced by a large margin. That is, the adjustment amount of the health value after flying after the second hit is much greater than the adjustment amount of the health value after flying after the first hit. Therefore, it can promote the interaction between the controlled virtual object and the virtual object in flight, so as to achieve a rapid reduction of the virtual object's health value by hitting the virtual object in flight, improve the efficiency of interaction with the virtual object, and thus improve human-computer efficiency.
[0109] In the embodiment of the present application, to achieve flight after being hit for the second time, it is necessary to hit the target part of the first virtual object, and the virtual object that hits the first virtual object must meet the preset conditions. That is, compared with flying after being hit for the first time, the difficulty of flying after being hit for the second time is increased, and the threshold for flying after being hit for the second time is raised; accordingly, the amount of health value adjustment during flight after being hit for the second time is increased so that the difficulty matches the amount of health value adjustment, thereby promoting the interaction between the controlled virtual object and the flying virtual object, and improving the efficiency of human-computer interaction.
[0110] The embodiment of the present application provides a method for interactive control of virtual objects. By controlling a controlled virtual object to hit a first virtual object, the first virtual object is triggered to fly after being hit, and after the first virtual object is hit by a virtual object that meets preset conditions during flight, it is triggered to fly after being hit a second time. In this way, as long as the controlled virtual object meets the preset conditions, the controlled virtual object can also interact with the virtual object in the flight process, that is, the controlled virtual object can interact with the same first virtual object multiple times, which innovates the gameplay, improves the efficiency of interaction with the first virtual object, and thus improves human-computer efficiency. Moreover, since the flight time of the first virtual object after being hit is generally short, the controlled virtual object triggers the first virtual object to fly after being hit a second time, that is, the controlled virtual object hits the first virtual object multiple times in a short period of time, thus achieving multiple interactions between the controlled virtual object and the first virtual object in a short period of time, further improving human-computer interaction efficiency.
[0111] Figure 4 above illustrates only the interactive process of a virtual object flying after being hit twice. A virtual object in flight can also interact with other virtual objects by colliding with them. This process is described in detail below based on Figure 7. Referring to Figure 7, it is a flow chart of a method for interactive control of a virtual object provided in an embodiment of the present application. This method is executed by a computer device. In this embodiment of the present application, the computer device is a terminal. The method includes the following steps.
[0112] 701. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0113] 702. In response to the controlled virtual object hitting the first virtual object and the hit value of the first virtual object reaching a hit threshold, the terminal determines a first flight trajectory of the first virtual object based on a relative positional relationship between the controlled virtual object and the first virtual object, where the controlled virtual object is a virtual object controlled by the terminal, and the hit value is used to indicate the number of times the first virtual object is hit.
[0114] 703. The terminal displays, based on the first flight trajectory, in a virtual scene interface, the first virtual object flying along the first flight trajectory after being hit.
[0115] In the embodiment of the present application, steps 701-703 are similar to steps 401-403 and are not described again here.
[0116] 704. In response to the first virtual object colliding with the third virtual object during flight, the terminal displays, in the virtual scene interface, that the third virtual object has been collided.
[0117] In the embodiment of the present application, the third virtual object is an NPC type virtual object. The first virtual object can collide with at least one third virtual object, that is, the first virtual object can collide with at least one third virtual object during one collision.
[0118] In the embodiment of the present application, the first virtual object can collide with the third virtual object in the air or on the ground. For example, the first virtual object can collide with the third virtual object in flight in the air, or collide with the third virtual object on the ground.
[0119] In an embodiment of the present application, the first virtual object can collide with multiple third virtual objects during a collision. Optionally, the multiple third virtual objects are virtual objects that have physical contact with the first virtual object; or, the multiple third virtual objects are virtual objects within a preset range, and the preset range is centered on the first third virtual object collided with by the first virtual object and has a preset distance as a radius; that is, after any virtual object is hit, a chain collision reaction will be generated on the surrounding virtual objects, so that the first virtual object can collide with multiple virtual objects at one time. For example, see Figure 8, which is a schematic diagram of a collision virtual object provided in an embodiment of the present application. The first virtual object is triggered to fly after being hit by the controlled virtual object, and the first virtual object can collide with multiple third virtual objects at one time during the flight.
[0120] In an embodiment of the present application, the virtual scene includes virtual objects that are allowed to be hit and virtual objects that are not allowed to be hit. Optionally, the virtual objects that are not allowed to be hit are marked with a third identifier, indicating that the virtual objects are not allowed to be hit. Optionally, when the terminal collides with the third virtual object, it detects whether the third virtual object carries the third identifier. If the third virtual object does not carry the third identifier, the above step 704 is performed. If the third virtual object carries the third identifier, the collision of the third virtual object will not be displayed, and the health value of the third virtual object will not be adjusted. Only the health value of the first virtual object will be adjusted.
[0121] An embodiment of the present application provides a method for interactive control of virtual objects, which controls a controlled virtual object to hit a first virtual object. When the hit value of the first virtual object reaches a hit threshold, the first virtual object is triggered to fly after being hit, and the first virtual object can collide with other virtual objects during the flight. That is, the interactive method provided by this method can cause a chain reaction of flying and colliding with virtual objects after being hit through a single attack by the controlled virtual object, thereby making the actual effect of a single attack greater than the effect of the single attack itself, expanding the attack range, and thereby improving the efficiency of human-computer interaction.
[0122] 705. The terminal adjusts the health values of the first virtual object and the third virtual object respectively.
[0123] In some embodiments, the life value adjustment ratio of the virtual object is associated with the ability value of the controlled virtual object and the type of the virtual object. Accordingly, the process of the terminal adjusting the life values of the first virtual object and the third virtual object respectively includes the following steps: the terminal determines the life value adjustment ratio of the first virtual object based on the ability value of the controlled virtual object, adjusts the life value of the first virtual object based on the life value adjustment ratio of the first virtual object, and the life value adjustment ratio of the first virtual object is positively correlated with the ability value of the controlled virtual object. The terminal determines the life value adjustment ratio of the third virtual object based on the ability value of the controlled virtual object, adjusts the life value of the third virtual object based on the life value adjustment ratio of the third virtual object, and the life value adjustment ratio of the third virtual object is positively correlated with the ability value of the controlled virtual object.
[0124] In the embodiment of the present application, adjusting the health values of the first virtual object and the third virtual object refers to reducing the health values of the first virtual object and the third virtual object. For either the first virtual object or the third virtual object, adjusting the health value of the virtual object based on the health value adjustment ratio (n%) of the virtual object refers to determining the product of the health value of the virtual object and the health value adjustment ratio, and using the difference between the health value of the virtual object and the product as the adjusted health value.
[0125] In the embodiment of the present application, the life value adjustment ratio of the virtual object is positively correlated with the ability value of the controlled virtual object, which means that for virtual objects of the same type, the greater the ability value of the controlled virtual object, the greater the corresponding life value adjustment ratio.
[0126] In some embodiments, for any virtual object, the terminal also determines its life value adjustment ratio based on the type of the virtual object. Among them, for any virtual object among the first virtual object and the third virtual object, the terminal determines the life value adjustment ratio of the virtual object based on the ability value of the controlled virtual object and the type of the virtual object, including the following steps: the terminal determines the target correspondence corresponding to the type from multiple correspondences based on the type of the virtual object, and the multiple correspondences correspond to multiple types of virtual objects. The terminal determines the life value adjustment ratio corresponding to the ability value of the controlled virtual object from the target correspondence, and the target correspondence includes the life value adjustment ratio corresponding to multiple ability values. In an embodiment of the present application, the life value adjustment ratio is determined based on the ability value of the controlled virtual object and the type of the virtual object, thereby realizing flexible and dynamic determination of the life value adjustment ratio, making the determined life value adjustment ratio more accurate, and thus realizing accurate adjustment of the life value.
[0127] In the embodiment of the present application, the basic armor of the default virtual object is relatively thick. After the controlled virtual object hits the virtual object, the health value of the virtual object is slightly reduced or not reduced at all. However, the health value of the virtual object can be greatly reduced by colliding with the virtual object. Therefore, the controlled virtual object can be encouraged to hit the virtual object and make it fly, so that the virtual object can collide with other virtual objects during the flight, thereby achieving a rapid reduction in the health value of the virtual object.
[0128] Optionally, the terminal adjusts the health value of the first virtual object not only after the first virtual object collides with a third virtual object during flight, but also after the first virtual object collides with any virtual object in the virtual scene. For example, in response to the first virtual object colliding with a wall in the virtual scene during flight, the terminal displays in the virtual scene interface that the first virtual object has collided with the wall and adjusts the health value of the first virtual object.
[0129] In some embodiments, the third virtual object that is hit will not hit other virtual objects again, thereby improving the simplicity of the collision gameplay. In other embodiments, the third virtual object that is hit can also hit other surrounding virtual objects to generate a collision chain reaction and enhance the collision interaction effect.
[0130] 706. When the health values of the first virtual object and the third virtual object are not adjusted to the threshold, the terminal displays the first virtual object falling to the ground in the virtual scene interface, and displays the third virtual object moving along the target movement trajectory after being hit.
[0131] In some embodiments, the first virtual object falls to the ground in the following ways: the first virtual object falls vertically to the ground at the impact location; or the first virtual object changes its flight trajectory at the impact location and falls to the ground along the changed flight trajectory. Specifically, after colliding with the third virtual object, the first virtual object falls vertically to the ground after its kinetic energy is exhausted. The first virtual object changes its flight trajectory when it acquires new kinetic energy during the collision with the third virtual object. Optionally, the direction of the changed flight trajectory is opposite to that of the first flight trajectory.
[0132] In the case where the first virtual object collides with the third virtual object in the air, the third virtual object moves along the target movement trajectory after being hit, which means that the third virtual object falls vertically to the ground at the collision position; alternatively, the third virtual object changes its flight trajectory at the collision position, the target movement trajectory refers to the changed flight trajectory, and the third virtual object moves along the target movement trajectory after being hit, which means that it falls to the ground along the changed flight trajectory. The implementation process is the same as the process of the first virtual object falling to the ground mentioned above, and will not be repeated here.
[0133] In the case where the location where the first virtual object collides with the third virtual object is the ground, the movement of the third virtual object along the target movement trajectory after being hit means that the third virtual object moves along the target movement trajectory on the ground after being hit. Accordingly, the process of determining the target movement trajectory includes the following steps: the terminal determines the target movement trajectory of the third virtual object after being hit based on the flight direction of the first virtual object relative to the third virtual object. The flight direction is the same as the direction in which the first virtual object flies toward the third virtual object; for example, if the first virtual object flies toward the third virtual object from the left of the third virtual object, the flight direction of the first virtual object relative to the third virtual object is from left to right.
[0134] In some embodiments, the process of the terminal determining the target movement trajectory based on the flight direction includes the following steps: the terminal takes the position where the third virtual object is hit as the starting point, extends a preset distance along the flight direction, and obtains the target movement trajectory. The preset distance is set and changed as needed, and optionally, the preset distance is a fixed distance. This embodiment determines the target movement trajectory in such a way that when the third virtual object moves along the target movement trajectory, it shows the effect of the third virtual object staggering a few steps after being hit, thereby improving the impact display effect; and the movement trajectory is directly determined by a preset distance, without the need to pre-judge the landing point, and the displacement is directly driven, thereby improving the impact display efficiency. Optionally, the movement trajectory is determined by the terminal's own root motion model, thereby improving the determination efficiency.
[0135] In some embodiments, after the third virtual object is hit and its health value has not been adjusted to the threshold, the third virtual object is displayed to move after being hit. In other embodiments, the third virtual object has an impact value, and the impact value is used to indicate the number of times the third virtual object has been hit. Accordingly, after the first virtual object hits the third virtual object on the ground, and the impact value of the third virtual object reaches the impact threshold, the third virtual object is displayed in the virtual scene interface to move along the target movement trajectory after being hit, and the impact value is adjusted after the third virtual object is hit. In the case that the impact value of the third virtual object does not reach the impact threshold, the third virtual object is displayed to be hit, and the movement of the third virtual object after being hit is not displayed. Optionally, the impact value is the cumulative impact value of the third virtual object after being hit by at least one first virtual object.
[0136] The impact value is the number of impacts or the impact score. Accordingly, if the impact value is the number of impacts, the impact threshold is the preset number of impacts; if the impact value is the impact score, the impact threshold is the preset impact score. Each time the third virtual object is impacted, the impact value of the third virtual object is adjusted.
[0137] In the case where the impact value is the number of impacts, optionally, the preset number of impacts is associated with one of the weight of the third virtual object and the weight of the first virtual object, and accordingly, the preset number of impacts can be obtained from the corresponding relationship between the item and the preset number of impacts. Alternatively, the preset number of impacts is associated with both the weight of the third virtual object and the weight of the first virtual object, and accordingly, the preset number of impacts can be obtained from the corresponding relationship between these two items and the preset number of impacts. In the case where the impact value is the impact score, optionally, the adjustment amplitude of the impact score is associated with one of the weight of the third virtual object and the weight of the first virtual object, and accordingly, the adjustment amplitude can be obtained from the corresponding relationship between the item and the adjustment amplitude. Alternatively, the adjustment amplitude is associated with both the weight of the third virtual object and the weight of the first virtual object, and accordingly, the adjustment amplitude can be obtained from the corresponding relationship between these two items and the adjustment amplitude.
[0138] In some embodiments, a terminal displays, in a virtual scene interface, the process of a third virtual object moving along a target movement trajectory after being impacted, including the following steps: the terminal determines, based on the impacted side of the third virtual object, a target impact shape from multiple impact shapes that matches the impacted side, wherein the multiple impact shapes correspond to multiple sides of the virtual object, and the impact shape refers to the physical shape of the virtual object after being impacted; based on the target impact shape, the terminal displays, in the virtual scene interface, the third virtual object moving along the movement trajectory in the target impact shape. In this embodiment, selecting the impact shape that matches the impacted side from multiple impact shapes increases the diversity and efficiency of displaying the impact process, thereby improving the display effect of the impact process.
[0139] In the embodiment of the present application, multiple sides refer to the front side, back side, left side, right side, etc. of the third virtual object being hit, and can be set and changed as needed. For example, the multiple sides are the front side, back side, left side, and right side. Correspondingly, the multiple collision forms corresponding to the multiple directions are named Bump_F, Bump_B, Bump_L, and Bump_R, respectively, and the multiple collision forms can be set and changed as needed. For example, if the side being hit is the front side, then the target collision form is the form in which the body of the third virtual object leans back. Correspondingly, the movement of the third virtual object along the target movement trajectory in the target collision form refers to the movement of the third virtual object along the target movement trajectory in the form in which the body leans back. For example, see Figure 9, which is a schematic diagram of a collision virtual object provided in an embodiment of the present application. Among them, the controlled virtual object hits the front side of the first virtual object, and the first virtual object makes a displacement backwards to fly after being hit; the third virtual object is hit on the right side, and the third virtual object makes a displacement to the left to be hit.
[0140] In this embodiment of the present application, if the health value of the third virtual object has not dropped below a threshold, a target movement trajectory is determined, and the third virtual object is displayed as moving along the target movement trajectory after being hit. Correspondingly, if the health value of the third virtual object drops below a threshold, the third virtual object is displayed as being eliminated after being hit.
[0141] 707. When the health values of the first virtual object and the third virtual object are adjusted to a threshold, the terminal displays in the virtual scene interface that the first virtual object and the third virtual object are eliminated.
[0142] In particular, if the health value of the first virtual object is adjusted to a threshold value, and the health value of the third virtual object is not adjusted to the threshold value, the terminal displays on the virtual scene interface that the first virtual object has been eliminated, and displays that the third virtual object has been hit and moved along the target movement trajectory. If the health value of the first virtual object is not adjusted to the threshold value, and the health value of the third virtual object is adjusted to the threshold value, the terminal displays on the virtual scene interface that the third virtual object has been eliminated, and displays that the first virtual object has fallen to the ground.
[0143] In the embodiment of the present application, the threshold value refers to a zero value. Optionally, the first virtual object and the third virtual object are eliminated from displaying in the virtual scene interface by instantaneously disappearing, gradually disappearing, or growing larger before disappearing, so as to improve the display effect.
[0144] It should be noted that, when the first virtual object does not collide with other virtual objects during flight, the first virtual object is displayed as landing at the end of the first flight trajectory along the first flight trajectory. Optionally, after the first virtual object collides with the ground, the terminal adjusts the life value of the first virtual object. This process is the same as the adjustment process of step 705 and is not repeated here. In particular, when the life value of the first virtual object is adjusted to the threshold, the virtual scene interface shows that the first virtual object is eliminated at the end; when the life value of the first virtual object is not adjusted to the threshold, the virtual scene interface shows that the first virtual object gets up after landing at the end and resumes walking form.
[0145] It should be noted that the first virtual object can collide with at least one third virtual object during flight, and since the life values of the virtual objects that are collided are adjusted, accordingly, the controlled virtual object can gather multiple virtual objects together by moving, and then by hitting a first virtual object, the first virtual object can collide with multiple third virtual objects gathered together at one time, so that it can interact with multiple virtual objects at the same time, and at the same time reduce the life values of multiple virtual objects, improve the interaction efficiency, and produce a refreshing gameplay experience. For example, see Figure 10, which is a schematic diagram of a virtual object interaction provided by an embodiment of the present application. The controlled virtual object hits the first virtual object, triggering the first virtual object to fly, and the first virtual object collides with multiple third virtual objects during flight. In this way, by controlling the controlled virtual object, a chain reaction of flying and collision after being hit is achieved, thereby improving the diversity and efficiency of interactive gameplay.
[0146] Refer to Figure 11, which is a flow chart of a method for interactive control of virtual objects provided by an embodiment of the present application. In an embodiment of the present application, the two data types, namely the probability of a virtual object flying after being hit and the health value adjustment ratio, are packaged and named "pinball table" for subsequent use. Accordingly, in a single game, when a "pinball man" corresponding to the "pinball table" is included, the flight state is triggered after the first virtual object is hit, and then it is detected whether the first virtual object hits a third virtual object during the flight. If it does not hit the third virtual object, the first virtual object is shown to have landed normally. If it hits the third virtual object, the collision effect of the first virtual object and the third virtual object is displayed, and the health values of the first and third virtual objects are adjusted to determine whether the adjusted health values have dropped to a threshold value; if the adjusted health values have not dropped to a threshold value, the first and third virtual objects are shown to have landed normally; if the adjusted health values have dropped to a threshold value, the first and third virtual objects are shown to have been eliminated.
[0147] An embodiment of the present application provides a method for interactive control of virtual objects, which controls a controlled virtual object to hit a first virtual object. When the hit value of the first virtual object reaches a hit threshold, the first virtual object is triggered to fly after being hit, and the first virtual object can collide with other virtual objects during the flight. That is, the interactive method provided by this method can cause a chain reaction of flying and colliding with virtual objects after being hit through a single attack by the controlled virtual object, thereby making the actual effect of a single attack greater than the effect of the single attack itself, expanding the attack range, and thereby improving the efficiency of human-computer interaction.
[0148] The embodiment of FIG. 7 above only illustrates the interactive process of a virtual object colliding with other virtual objects during flight. A virtual object during flight can also interact with other virtual objects during flight, and this process is described in detail below based on FIG. Referring to FIG. 12 , FIG. 12 is a flow chart of a method for interactive control of virtual objects provided in an embodiment of the present application. The method is executed by a computer device. In this embodiment of the present application, the computer device is described as a terminal. The method includes the following steps.
[0149] 1201. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0150] 1202. In response to the controlled virtual object hitting the first virtual object and the hit value of the first virtual object reaching a hit threshold, the terminal determines a first flight trajectory of the first virtual object based on a relative positional relationship between the controlled virtual object and the first virtual object, where the controlled virtual object is the virtual object controlled by the terminal.
[0151] 1203. The terminal displays, based on the first flight trajectory, in a virtual scene interface, the first virtual object flying along the first flight trajectory after being hit.
[0152] In the embodiment of the present application, the above steps 1201-1203 are similar to steps 401-403 and are not repeated here.
[0153] 1204. In response to the first virtual object being hit by the fourth virtual object during flight, the terminal displays in the virtual scene interface that the first virtual object has been hit, and the fourth virtual object is a virtual object in flight.
[0154] In this embodiment, after the first virtual object is hit by the fourth virtual object, the terminal adjusts the health values of the first virtual object and the fourth virtual object. When the health values of the two have not dropped to the threshold, the terminal displays in the virtual scene interface that the first virtual object has been hit, including the following steps: the terminal displays in the virtual scene interface that the first virtual object and the fourth virtual object have fallen to the ground after the collision. The implementation process of falling to the ground is the same as step 706 and will not be repeated here. When the health values of the two have dropped to the threshold, the terminal displays in the virtual scene interface that the first virtual object has been hit, including the following steps: the terminal displays in the virtual scene interface that the first virtual object and the fourth virtual object have been eliminated after the collision, which is the same as step 707 and will not be repeated here. In the embodiment of the present application, the two virtual objects in the flight process can produce collision interactions, which improves the diversity of interactions and improves the efficiency of interactions.
[0155] In an embodiment of the present application, since two virtual objects can produce collision interactions and reduce their health during flight, the controlled virtual object can be promoted to hit multiple virtual objects, triggering multiple virtual objects to fly after being hit, so as to reduce the health of multiple virtual objects at the same time through the collision interactions of virtual objects during flight, improve interaction efficiency, and produce a refreshing gameplay experience.
[0156] In embodiments of the present application, the states of a virtual object include a flying state, an impact state, a startled state (startle), a hit state, a weak stun state (weak stun), and a state where the health value has dropped to a threshold. The impact state includes the moment of impact and the state of movement after the impact (hit reaction). The startled state refers to the state in which the virtual object is startled by some virtual props, such as the state of being startled by sound and light props. The weak stun state refers to the state in which the virtual object is hit. The flying state includes the flying state after being hit once and the flying state after being hit twice (perk). Any state can interrupt or be interrupted by other states. For example, in response to a first virtual object being hit in a first state and the hit value reaching a hit threshold, the terminal displays the first virtual object flying along a first flight trajectory in the virtual scene interface after being hit. The first state includes the impact state, the flying state, or the startled state. In response to the first virtual object reaching a second state during flight, the terminal stops the flight process. The second state includes the hit state, the weak stun state, or the state where the health value has dropped to a threshold. In an embodiment of the present application, multiple states are set to be able to interrupt each other, and the occurrence of a state is generally due to the interaction between virtual objects. This can achieve multiple interaction situations, thereby increasing the diversity of interactions between virtual objects and improving interaction efficiency.
[0157] In the embodiment of the present application, the states that can be interrupted by any state and which states can be interrupted are determined by the priority between multiple states. The higher the priority, the more states that can be interrupted. The above-mentioned states and the interruption priorities between states are only an exemplary description. In different virtual scenes, virtual objects have different states, and the priorities between states can be set and changed as needed, which is not specifically limited here. See Figure 13, which is a schematic diagram of the interruption priorities between multiple states provided in the embodiment of the present application.
[0158] In an embodiment of the present application, the first virtual object can be hit by other virtual objects during flight. In this way, a single attack by the controlled virtual object can cause a chain reaction of flying and hitting virtual objects after being hit, thereby making the actual effect of a single attack greater than the effect of the attack itself, expanding the attack range, and thereby improving the efficiency of human-computer interaction.
[0159] FIG14 is a block diagram of a virtual object interactive control device according to an embodiment of the present application. The device is used to perform the steps of the above-mentioned virtual object interactive control method. Referring to FIG14, the device includes:
[0160] The interface display module 1401 is used to display a virtual scene interface, where the virtual scene interface displays a first virtual object;
[0161] a flight display module 1402 for displaying, in response to the controlled virtual object hitting the first virtual object, the first virtual object flying along a first flight trajectory after being hit in a virtual scene interface, wherein the controlled virtual object is a virtual object controlled by the terminal;
[0162] The flight display module 1402 is also used to display the first virtual object flying along the second flight trajectory after being hit in the virtual scene interface in response to the first virtual object being hit by the second virtual object at the target part during flight and the second virtual object meets the preset conditions.
[0163] In some embodiments, the second virtual object satisfies a preset condition, including at least one of the following:
[0164] The capability value of the second virtual object meets the preset capability value; or,
[0165] The virtual props used by the second virtual object are preset props.
[0166] In some embodiments, the device further includes a life value adjustment module for:
[0167] Based on the ability value of the virtual object of the second virtual object, a life value adjustment ratio of the first virtual object is determined; based on the life value adjustment ratio of the first virtual object, the life value of the first virtual object is adjusted, and the life value adjustment ratio of the first virtual object is positively correlated with the ability value of the second virtual object.
[0168] In some embodiments, the flight display module 1402 is configured to:
[0169] determining, based on the side of the first virtual object that was hit, a target flight form that matches the hit side from a plurality of flight forms, the plurality of flight forms corresponding to the plurality of sides of the virtual object, the flight form referring to a body form during flight;
[0170] The first virtual object is displayed in the virtual scene interface flying along the first flight trajectory in a target flight form.
[0171] In some embodiments, the apparatus further comprises an impact display module for:
[0172] In response to the first virtual object colliding with the third virtual object during flight, it is displayed in the virtual scene interface that the third virtual object has been collided.
[0173] In some embodiments, the impact display module is used to:
[0174] determining a target movement trajectory of the third virtual object after being hit based on a flight direction of the first virtual object relative to the third virtual object;
[0175] Based on the target movement trajectory, the third virtual object is displayed in the virtual scene interface moving along the target movement trajectory after being hit.
[0176] In some embodiments, the collision display module is used to: take the position of the third virtual object when it is hit as the starting point, extend a preset distance along the flight direction, and obtain the target movement trajectory.
[0177] In some embodiments, the impact display module is configured to: determine, based on the impacted side of the third virtual object, a target impact shape matching the impacted side from a plurality of impact shapes, the plurality of impact shapes corresponding to the plurality of sides of the virtual object, the impact shape referring to the body shape of the virtual object after the impact;
[0178] The third virtual object is displayed in the virtual scene interface as moving along the target movement trajectory in a target impact form.
[0179] In some embodiments, the health value adjustment module is further configured to:
[0180] determining a health value adjustment ratio for the first virtual object based on the ability value of the controlled virtual object, and adjusting the health value of the first virtual object based on the health value adjustment ratio of the first virtual object, wherein the health value adjustment ratio of the first virtual object is positively correlated with the ability value of the controlled virtual object;
[0181] Based on the ability value of the controlled virtual object, a life value adjustment ratio of the third virtual object is determined; based on the life value adjustment ratio of the third virtual object, the life value of the third virtual object is adjusted, and the life value adjustment ratio of the third virtual object is positively correlated with the ability value of the controlled virtual object.
[0182] In some embodiments, the impact display module is further used to:
[0183] In response to the first virtual object being hit by the fourth virtual object during flight, the first virtual object is displayed in the virtual scene interface as being hit, and the fourth virtual object is a virtual object in flight.
[0184] In some embodiments, the apparatus further comprises a trajectory determination module configured to:
[0185] Based on the relative positional relationship between the controlled virtual object and the first virtual object, a first flight trajectory of the first virtual object is determined.
[0186] In some embodiments, the trajectory determination module is configured to:
[0187] An extension line of the line connecting the controlled virtual object and the first virtual object is determined, the position of the first virtual object when it is hit is used as the starting point of the first flight trajectory, and the direction of the extension line is used as the direction of the first flight trajectory at the starting point.
[0188] In some embodiments, the apparatus further comprises an endpoint adjustment module for:
[0189] In a case where the end point of the first flight trajectory is located in an inactive area in the virtual scene, the end point of the first flight trajectory is adjusted so that the adjusted end point is located in an active area in the virtual scene.
[0190] In some embodiments, the flight display module 1402 is configured to:
[0191] In response to the controlled virtual object hitting the first virtual object and the hit value of the first virtual object reaching the hit threshold, the first virtual object is displayed in the virtual scene interface flying along the first flight trajectory after being hit, and the hit value is used to indicate the number of times the first virtual object is hit.
[0192] In some embodiments, the apparatus further comprises a state adjustment module configured to:
[0193] In response to the first virtual object being hit in a first state and the hit value reaching a hit threshold, displaying in the virtual scene interface that the first virtual object is flying along a first flight trajectory after being hit, where the first state includes an impact state, a flying state, or a frightened state;
[0194] In response to the first virtual object reaching a second state during the flight, the flight process is stopped, where the second state includes a state of being hit, a state of being dizzy, or a state where the health value drops to a threshold.
[0195] An embodiment of the present application provides a method for interactive control of virtual objects, which controls a controlled virtual object to hit a first virtual object, thereby triggering the first virtual object to fly after being hit. When the first virtual object is hit at a target part by a virtual object that meets preset conditions during flight, the first virtual object is triggered to fly after being hit a second time. This method enables the controlled virtual object to interact with virtual objects in flight, thereby enabling the controlled virtual object to interact with the first virtual object multiple times in a short period of time, thereby improving the efficiency of interaction with the first virtual object and thereby improving human-computer efficiency.
[0196] FIG15 is a block diagram of a virtual object interactive control device according to an embodiment of the present application. The device is used to perform the steps of the above-mentioned virtual object interactive control method. Referring to FIG15 , the device includes:
[0197] A first trajectory determining module 1501 is configured to, in response to a controlled virtual object in a virtual scene hitting a first virtual object, determine a first hit direction of the first virtual object based on the direction of an extension of a line connecting a root skeleton point of the controlled virtual object and a root skeleton point of the first virtual object, and determine a first flight trajectory based on the first hit direction, a first velocity, and a virtual weight of the first virtual object, so that the first virtual object flies along the first flight trajectory after being hit. The controlled virtual object is a virtual object controlled by the terminal;
[0198] A second trajectory determination module 1502 is configured to, in response to the first virtual object being hit at a target part during flight, determine a secondary hit direction of the first virtual object based on the direction of an extension of a line connecting the virtual prop that hits the first virtual object and a root bone point of the first virtual object, and determine a second flight trajectory based on the secondary hit direction, a second speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the second flight trajectory after being hit;
[0199] The first speed is the speed of the first virtual object in the direction of the first hit, and the second speed is the speed of the first virtual object in the direction of the second hit.
[0200] In some embodiments, the first trajectory determination module 1501 is configured to:
[0201] determining a first horizontal velocity and a first vertical velocity of the first virtual object based on the first impact direction and the first velocity, where the first horizontal velocity and the first vertical velocity are velocities of the first virtual object in the horizontal direction and the vertical direction, respectively;
[0202] Based on the first impact position, the first horizontal speed, the first vertical speed and the virtual weight of the first virtual object, the position of the first virtual object at multiple first time points is determined to obtain a first flight trajectory, the multiple first time points including the time point when the first virtual object reaches the end point of the first flight trajectory and the time point before reaching the end point.
[0203] In some embodiments, the second trajectory determination module 1502 is configured to:
[0204] determining a second horizontal speed and a second vertical speed of the first virtual object based on the secondary impact direction and the second speed, where the second horizontal speed and the second vertical speed are speeds of the first virtual object in the horizontal direction and the vertical direction, respectively;
[0205] Based on the second impact position, the second horizontal speed, the second vertical speed and the virtual weight of the first virtual object, the position of the first virtual object at multiple second time points is determined to obtain a second flight trajectory, and the multiple second time points include the time point when the first virtual object reaches the end point of the second flight trajectory and the time point before reaching the end point.
[0206] In the embodiment of the present application, the direction of the first impact is determined based on the direction of the extension line connecting the root skeleton points of the two virtual objects. The first flight trajectory is then determined by combining the velocity and virtual weight in that direction. This first flight trajectory is determined in accordance with physical principles and has high accuracy, allowing the first virtual object to display a realistic flight effect when flying along the first flight trajectory. Similarly, the second flight trajectory is determined in accordance with physical principles and has high accuracy, allowing the first virtual object to display a realistic flight effect when flying along the second flight trajectory.
[0207] In the embodiments of the present application, the computer device is a terminal or a server. When the computer device is a terminal, the terminal serves as the execution subject to implement the technical solution provided in the embodiments of the present application; when the computer device is a server, the server serves as the execution subject to implement the technical solution provided in the embodiments of the present application; or, the technical solution provided in the present application is implemented through interaction between the terminal and the server, which is not limited in the embodiments of the present application.
[0208] Figure 16 shows a block diagram of a terminal 1600 provided in an exemplary embodiment of the present application. Typically, terminal 1600 includes a processor 1601 and a memory 1602. Processor 1601 includes one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 1601 is implemented using at least one of the following hardware forms: a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), or a PLA (Programmable Logic Array). Processor 1601 also includes a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, processor 1601 integrates a GPU (Graphics Processing Unit), which is responsible for rendering and drawing content to be displayed on the display screen. In some embodiments, processor 1601 also includes an AI (Artificial Intelligence) processor, which is responsible for processing computing operations related to machine learning.
[0209] Memory 1602 includes one or more computer-readable storage media, which are non-transitory. Memory 1602 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 1602 is used to store at least one computer program, which is executed by processor 1601 to implement the interactive control method of the virtual object provided in the method embodiment of the present application.
[0210] In some embodiments, terminal 1600 may also optionally include a peripheral device interface 1603 and at least one peripheral device. Processor 1601, memory 1602, and peripheral device interface 1603 are connected via a bus or signal lines. Each peripheral device is connected to peripheral device interface 1603 via a bus, signal lines, or circuit boards. Specifically, the peripheral device includes at least one of a radio frequency circuit 1604, a display screen 1605, a camera assembly 1606, an audio circuit 1607, and a power supply 1608.
[0211] The peripheral device interface 1603 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 1601 and the memory 1602. In some embodiments, the processor 1601, the memory 1602, and the peripheral device interface 1603 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1601, the memory 1602, and the peripheral device interface 1603 are implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0212] RF circuit 1604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. RF circuit 1604 communicates with communication networks and other communication devices via electromagnetic signals. RF circuit 1604 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, RF circuit 1604 includes an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. RF circuit 1604 communicates with other terminals via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, RF circuit 1604 also includes circuitry related to Near Field Communication (NFC), which is not limited in this application.
[0213] The display screen 1605 is used to display a UI (User Interface). The UI includes graphics, text, icons, multimedia resources, and any combination thereof. When the display screen 1605 is a touch screen display, the display screen 1605 also has the ability to collect touch signals on the surface or above the surface of the display screen 1605. The touch signal is input as a control signal to the processor 1601 for processing. At this time, the display screen 1605 is also used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there is one display screen 1605, which is set on the front panel of the terminal 1600; in other embodiments, there are at least two display screens 1605, which are respectively set on different surfaces of the terminal 1600 or in a folding design; in other embodiments, the display screen 1605 is a flexible display screen, which is set on the curved surface or folding surface of the terminal 1600. Even the display screen 1605 is also set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1605 is made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0214] The camera component 1606 is used to capture images or multimedia resources. Optionally, the camera component 1606 includes a front camera and a rear camera. Typically, the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera component 1606 also includes a flash. The flash is a monochrome temperature flash, or a dual-color temperature flash. The dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which is used for light compensation at different color temperatures.
[0215] The audio circuit 1607 includes a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 1601 for processing, or input them into the radio frequency circuit 1604 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there are multiple microphones, which are respectively arranged at different parts of the terminal 1600. The microphone is an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 1601 or the radio frequency circuit 1604 into sound waves. The speaker is a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 1607 also includes a headphone jack.
[0216] Power supply 1608 is used to power various components in terminal 1600. Power supply 1608 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 1608 includes a rechargeable battery, the rechargeable battery can be wired or wireless. A wired rechargeable battery is charged via a wired line, while a wireless rechargeable battery is charged via a wireless coil. The rechargeable battery is also configured to support fast charging technology.
[0217] In some embodiments, the terminal 1600 further includes one or more sensors 1609 , including but not limited to: an acceleration sensor 1610 , a gyroscope sensor 1611 , a pressure sensor 1612 , an optical sensor 1613 , and a proximity sensor 1614 .
[0218] Accelerometer 1610 detects the magnitude of acceleration along the three coordinate axes of the coordinate system established by terminal 1600. For example, accelerometer 1610 is used to detect the components of gravity acceleration along the three coordinate axes. Processor 1601 can control display screen 1605 to display the user interface in either a landscape or portrait view based on the gravity acceleration signal collected by accelerometer 1610. Accelerometer 1610 is also used to collect game or user motion data.
[0219] Gyroscope sensor 1611 detects the orientation and rotation angle of terminal 1600. It works in conjunction with accelerometer 1610 to capture the user's 3D movements on terminal 1600. Processor 1601, based on the data collected by gyroscope sensor 1611, can implement the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation. Pressure sensor 1612 is located on the side frame of terminal 1600 and / or below display screen 1605. When located on the side frame of terminal 1600, pressure sensor 1612 detects the user's grip on terminal 1600. Processor 1601 then performs left-hand or right-hand recognition or shortcut operations based on the grip signals collected by pressure sensor 1612. When located below display screen 1605, processor 1601 controls operational controls on the UI based on the user's pressure on display screen 1605. The operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0220] Optical sensor 1613 is used to detect ambient light intensity. In one embodiment, processor 1601 controls the display brightness of display screen 1605 based on the ambient light intensity detected by optical sensor 1613. Specifically, when the ambient light intensity is high, the display brightness of display screen 1605 is increased; when the ambient light intensity is low, the display brightness of display screen 1605 is decreased. In another embodiment, processor 1601 can also dynamically adjust the shooting parameters of camera assembly 1606 based on the ambient light intensity detected by optical sensor 1613.
[0221] The proximity sensor 1614, also known as a distance sensor, is typically provided on the front panel of the terminal 1600. The proximity sensor 1614 is used to collect the distance between the user and the front of the terminal 1600. In one embodiment, when the proximity sensor 1614 detects that the distance between the user and the front of the terminal 1600 is gradually decreasing, the processor 1601 controls the display screen 1605 to switch from the screen-on state to the screen-off state; when the proximity sensor 1614 detects that the distance between the user and the front of the terminal 1600 is gradually increasing, the processor 1601 controls the display screen 1605 to switch from the screen-off state to the screen-on state. Those skilled in the art will appreciate that the structure shown in FIG16 does not limit the terminal 1600 and that the terminal 1600 may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.
[0222] FIG17 is a schematic diagram of the structure of a server provided in accordance with an embodiment of the present application. The server 1700 may vary significantly due to different configurations or performances, and includes one or more processors (Central Processing Units, CPUs) 1701 and one or more memories 1702, wherein the memories 1702 are used to store computer programs, and the processors 1701 are configured to execute the computer programs to implement the interactive control methods of virtual objects provided in the above-mentioned various method embodiments. Of course, the server also has components such as a wired or wireless network interface, a keyboard, and input / output interfaces for input and output. The server also includes other components for implementing device functions, which will not be described in detail here.
[0223] An embodiment of the present application also provides a computer-readable storage medium, which is used to store at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the interactive control method of a virtual object in any of the above implementation methods.
[0224] The embodiments of the present application also provide a computer program product, which includes a computer program, the computer program is stored in a computer-readable storage medium, the processor of the computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the interactive control method of the virtual object in any of the above-mentioned implementations. In some embodiments, the computer program product involved in the embodiments of the present application can be deployed on a computer device for execution, or on multiple computer devices located in one location, or on multiple computer devices distributed in multiple locations and interconnected by a communication network. Multiple computer devices distributed in multiple locations and interconnected by a communication network constitute a blockchain system.
[0225] The above are merely optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for interactive control of a virtual object, executed by a computer device, the method include: Displaying a virtual scene interface, wherein the virtual scene interface displays a first virtual object; In response to the controlled virtual object hitting the first virtual object, displaying in the virtual scene interface that the first virtual object flies along a first flight trajectory after being hit, the controlled virtual object being a virtual object controlled by the terminal; In response to the first virtual object being hit at a target location by a second virtual object during flight, and the second virtual object meets a preset condition, the first virtual object is displayed in the virtual scene interface flying along a second flight trajectory after being hit.
2. The method according to claim 1, in, The second virtual object satisfies a preset condition, including at least one of the following: The capability value of the second virtual object meets a preset capability value; or, The virtual props used by the second virtual object are preset props.
3. The method according to claim 1, in, The method further comprises: Based on the ability value of the second virtual object, a life value adjustment ratio of the first virtual object is determined; based on the life value adjustment ratio of the first virtual object, the life value of the first virtual object is adjusted, and the life value adjustment ratio of the first virtual object is positively correlated with the ability value of the second virtual object.
4. The method according to claim 1, in, The step of displaying in the virtual scene interface that the first virtual object flies along a first flight trajectory after being hit includes: Based on the side of the first virtual object that is hit, determining a target flight form that matches the hit side from a plurality of flight forms, the plurality of flight forms corresponding to the sides of the virtual object, the flight form referring to the body form during the flight; The first virtual object is displayed in the virtual scene interface flying along the first flight trajectory in the target flight form.
5. The method according to claim 1, in, The method further comprises: In response to the first virtual object colliding with the third virtual object during flight, the collision of the third virtual object is displayed in the virtual scene interface.
6. The method according to claim 5, in, The displaying in the virtual scene interface that the third virtual object is hit includes: determining a target movement trajectory of the third virtual object after being hit based on a flight direction of the first virtual object relative to the third virtual object; Based on the target movement trajectory, the third virtual object is displayed in the virtual scene interface moving along the target movement trajectory after being hit.
7. The method according to claim 6, in, The determining, based on the flight direction of the first virtual object relative to the third virtual object, a target movement trajectory of the third virtual object after being hit, includes: The target movement trajectory is obtained by taking the position of the third virtual object when it is hit as the starting point and extending a preset distance along the flight direction.
8. The method according to claim 6, in, The step of displaying in the virtual scene interface that the third virtual object moves along the target movement trajectory after being hit comprises: Based on the impacted side of the third virtual object, determining a target impact shape matching the impacted side from a plurality of impact shapes, the plurality of impact shapes corresponding to the plurality of sides of the virtual object, the impact shape referring to the body shape of the virtual object after being impacted; The third virtual object is displayed in the virtual scene interface moving along the target movement trajectory in the target impact form.
9. The method according to claim 5, in, The method further comprises: Determining a life value adjustment ratio of the first virtual object based on the ability value of the controlled virtual object, and adjusting the life value of the first virtual object based on the life value adjustment ratio of the first virtual object, wherein the life value adjustment ratio of the first virtual object is positively correlated with the ability value of the controlled virtual object; Based on the ability value of the controlled virtual object, a life value adjustment ratio of the third virtual object is determined; based on the life value adjustment ratio of the third virtual object, the life value of the third virtual object is adjusted, and the life value adjustment ratio of the third virtual object is positively correlated with the ability value of the controlled virtual object.
10. The method according to claim 1, in, The method further comprises: In response to the first virtual object being hit by a fourth virtual object during flight, the first virtual object is displayed in the virtual scene interface as being hit, and the fourth virtual object is a virtual object during flight.
11. The method according to claim 1, in, The process of determining the first flight trajectory includes: Based on the relative position relationship between the controlled virtual object and the first virtual object, a first flight trajectory of the first virtual object is determined.
12. The method according to claim 11, in, The determining a first flight trajectory of the first virtual object based on the relative position relationship between the controlled virtual object and the first virtual object includes: An extension line of the line between the controlled virtual object and the first virtual object is determined, a position of the first virtual object when it is hit is used as a starting point of the first flight trajectory, and a direction of the extension line is used as a direction of the first flight trajectory at the starting point.
13. The method according to claim 1, in, The method further comprises: In a case where the end point of the first flight trajectory is located in an inactive area in the virtual scene, the end point of the first flight trajectory is adjusted so that the adjusted end point is located in an active area in the virtual scene.
14. The method according to claim 1, in, In response to the controlled virtual object hitting the first virtual object, displaying in the virtual scene interface that the first virtual object flies along a first flight trajectory after being hit, comprises: In response to the controlled virtual object hitting the first virtual object and the hit value of the first virtual object reaching a hit threshold, the first virtual object is displayed in the virtual scene interface flying along a first flight trajectory after being hit, and the hit value is used to indicate the number of times the first virtual object is hit.
15. The method according to claim 1, in, The method further comprises: In response to the first virtual object being hit in a first state and the hit value reaching a hit threshold, displaying in the virtual scene interface that the first virtual object is flying along a first flight trajectory after being hit, wherein the first state includes an impact state, a flying state, or a frightened state; In response to the first virtual object reaching a second state during the flight process, the flight process is stopped, where the second state includes a state of being hit, a state of being dizzy, or a state where the health value drops to a threshold.
16. A method for interactive control of a virtual object, executed by a computer device, the method include: In response to a controlled virtual object in a virtual scene hitting a first virtual object, determining a first hit direction of the first virtual object based on the direction of an extension line of a line between a root skeleton point of the controlled virtual object and a root skeleton point of the first virtual object, and determining a first flight trajectory based on the first hit direction, a first speed and a virtual weight of the first virtual object, so that the first virtual object flies along the first flight trajectory after being hit, wherein the controlled virtual object is a virtual object controlled by a terminal; In response to the first virtual object being hit at a target part during flight, determining a secondary hit direction of the first virtual object based on the direction of an extension line of a line between a virtual prop that hits the first virtual object and a root bone point of the first virtual object, and determining a second flight trajectory based on the secondary hit direction, a second speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the second flight trajectory after being hit; The first speed is the speed of the first virtual object in the first struck direction, and the second speed is the speed of the first virtual object in the second struck direction.
17. A virtual object interactive control device, the device include: An interface display module, used to display a virtual scene interface, wherein the virtual scene interface displays a first virtual object; a flight display module, configured to display, in response to a controlled virtual object hitting the first virtual object, in the virtual scene interface, the first virtual object flying along a first flight trajectory after being hit, wherein the controlled virtual object is a virtual object controlled by the terminal; The flight display module is also used to display in the virtual scene interface that the first virtual object is flying along a second flight trajectory after being hit, in response to the first virtual object being hit at a target part by a second virtual object during flight and the second virtual object meets a preset condition.
18. A virtual object interactive control device, the device include: a first trajectory determination module, for determining, in response to a controlled virtual object in a virtual scene hitting a first virtual object, a first hitting direction of the first virtual object based on the direction of an extension line of a line between a root skeleton point of the controlled virtual object and a root skeleton point of the first virtual object, and determining a first flight trajectory based on the first hitting direction, a first speed and a virtual weight of the first virtual object, so that the first virtual object flies along the first flight trajectory after being hit, wherein the controlled virtual object is a virtual object controlled by a terminal; a second trajectory determination module, configured to determine, in response to the first virtual object being hit at a target part during flight, a secondary hit direction of the first virtual object based on the direction of an extension line of a line between a virtual prop that hits the first virtual object and a root bone point of the first virtual object, and determine a second flight trajectory based on the secondary hit direction, a second speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the second flight trajectory after being hit; The first speed is the speed of the first virtual object in the first struck direction, and the second speed is the speed of the first virtual object in the second struck direction.
19. A computer device, comprising a processor and a memory, wherein the memory is used to store at least one computer program, and the at least one computer program is loaded by the processor and executes the interactive control method of a virtual object according to any one of claims 1 to 16.
20. A computer-readable storage medium, wherein the computer-readable storage medium is used to store at least one computer program, wherein the at least one computer program is used to execute the interactive control method of a virtual object according to any one of claims 1 to 16.
21. A computer program product, comprising a computer program, wherein the computer program is stored in a computer-readable storage medium, a processor of a computer device reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device executes the interactive control method of a virtual object as described in any one of claims 1 to 16.
Citation Information
Patent Citations
Method and device for handling collision of obstacles, storage medium and electronic device
CN108579085A
Moving method and device for virtual object in game and electronic equipment
CN111054074A
Virtual character control method, computer readable storage medium and processor
CN112370787A
Virtual item control method and device, computer equipment and storage medium
CN113713382A
Virtual item use method and device, equipment, medium and program product
CN114130031A
