Virtual object interaction control method and device, equipment, medium and product
By responding to the controlled virtual object hitting the first virtual object and determining its flight trajectory in a virtual scene, the problem of low interaction efficiency of virtual objects is solved, and more efficient human-computer interaction is achieved.
Patent Information
- Application Number
- CN202510344460.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-05-06
AI Technical Summary
The interaction efficiency between virtual objects in the existing virtual scene is low, especially the interaction efficiency between the charged virtual object and the first virtual object is insufficient.
By displaying the virtual scene interface, in response to the controlled virtual object hitting the first virtual object, the flight trajectory of the first virtual object is determined, so that it can fly along the flight trajectory after hitting, and trigger a secondary knock-off when the preset condition is met.
The interaction efficiency between virtual objects is improved, so that the controlled virtual object can interact with the first virtual object multiple times in a short time, and the efficiency of human-computer interaction is improved.
Smart Images

Figure CN119925931A_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese application with application number 202310325401.3, application date March 22, 2023, and invention name “Interactive control method, device, equipment, medium and product of virtual objects”. 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 a controlled virtual object controlled by a player and a first virtual object of NPC (Non-Player Character) type. When running the 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, while the first virtual object can generally only be hit in place, making the interaction efficiency between virtual objects low. Summary of the invention
[0004] The embodiment of the present application provides 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:
[0005] In one aspect, a method for interactive control of a virtual object is provided, the method comprising:
[0006] Displaying a virtual scene interface, wherein the virtual scene interface displays a first virtual object;
[0007] 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 hitting the first virtual object, the controlled virtual object being a virtual object controlled by the terminal;
[0008] In response to the first virtual object hitting the target part during flight, and the virtual object that hits the first virtual object meets a preset condition, the first virtual object is displayed in the virtual scene interface flying along a second flight trajectory after hitting again.
[0009] In another aspect, a method for interactive control of a virtual object is provided, the method comprising:
[0010] 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 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 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 hitting, the controlled virtual object being a virtual object controlled by a terminal;
[0011] In response to the first virtual object being hit on a target part during flight, determining a second hit direction of the first virtual object based on 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 second 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 again;
[0012] 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.
[0013] In some embodiments, determining the first flight trajectory based on the first hit direction, the first speed and the virtual weight of the first virtual object includes:
[0014] Determine a first horizontal speed and a first vertical speed of the first virtual object based on the first hit direction and the first speed, where the first horizontal speed and the first vertical speed are speeds of the first virtual object in a horizontal direction and a vertical direction, respectively;
[0015] Determining the position of the first virtual object at a plurality of first time points based on the first impact position of the first virtual object, the first horizontal speed, the first vertical speed, and the virtual weight to obtain the first flight trajectory, the plurality of first time points including a time point when the first virtual object reaches an end point of the first flight trajectory and a time point before reaching the end point;
[0016] In some embodiments, determining the second flight trajectory based on the secondary impact direction, the second speed and the virtual weight of the first virtual object includes:
[0017] Determine 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;
[0018] Based on the second impact position of the first virtual object, the second horizontal speed, the second vertical speed and the virtual weight, the position of the first virtual object at multiple second time points is determined to obtain the 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.
[0019] In another aspect, a virtual object interactive control device is provided, the device comprising:
[0020] An interface display module, used to display a virtual scene interface, wherein the virtual scene interface displays a first virtual object;
[0021] 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 hitting the first virtual object, wherein the controlled virtual object is a virtual object controlled by the terminal;
[0022] 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 hitting the target part again in response to the first virtual object hitting the target part during flight and the virtual object that hits the first virtual object meets a preset condition.
[0023] In some embodiments, the virtual object that hits the first virtual object satisfies a preset condition, which refers to at least one of the following: the ability value of the virtual object that hits the first virtual object satisfies a preset ability value; or, the virtual props used by the virtual object that hits the first virtual object are preset props.
[0024] In some embodiments, the device further comprises a life value adjustment module, configured to:
[0025] Based on the ability value of the virtual object that hits the first virtual object and the type of the first 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 virtual object that hits the first virtual object.
[0026] In some embodiments, the flight display module is used to:
[0027] Based on a first direction in which the first virtual object is hit, determining a target flight form that matches the first direction from a plurality of flight forms, the plurality of flight forms corresponding to a plurality of directions, the flight form referring to a body form of the virtual object during flight;
[0028] Based on the target flight form, the first virtual object is displayed in the virtual scene interface flying along the first flight trajectory in the target flight form.
[0029] In some embodiments, the device further comprises an impact display module, configured to:
[0030] In response to the first virtual object colliding with the second virtual object during flight, the second virtual object is displayed in the virtual scene interface as being collided.
[0031] In some embodiments, the impact display module is used to:
[0032] determining a target movement trajectory of the second virtual object after being hit based on a flight direction of the first virtual object relative to the second virtual object;
[0033] Based on the target movement trajectory, the second virtual object is displayed in the virtual scene interface moving along the target movement trajectory after the collision.
[0034] In some embodiments, the collision display module is used to: take the position of the second virtual object when it is hit as the starting point, extend a preset distance along the flight direction, and obtain the target movement trajectory.
[0035] In some embodiments, the collision display module is used to: determine a target collision shape matching the second direction from multiple collision shapes based on the second direction in which the second virtual object is hit, the multiple collision shapes corresponding to multiple directions, and the collision shape refers to the body shape of the virtual object after being hit; based on the target collision shape, display the second virtual object moving along the target movement trajectory in the virtual scene interface in the target collision shape.
[0036] In some embodiments, the life value adjustment module is further used to:
[0037] determining a life value adjustment ratio of the first virtual object based on the ability value of the controlled virtual object and the type of the first 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;
[0038] Based on the ability value of the controlled virtual object and the type of the second virtual object, a life value adjustment ratio of the second virtual object is determined; based on the life value adjustment ratio of the second virtual object, the life value of the second virtual object is adjusted, and the life value adjustment ratio of the second virtual object is positively correlated with the ability value of the controlled virtual object.
[0039] In some embodiments, the impact display module is further used to:
[0040] In response to the first virtual object being hit by a third virtual object during flight, the first virtual object being hit is displayed in the virtual scene interface, and the third virtual object is a virtual object during flight.
[0041] In some embodiments, the apparatus further comprises a trajectory determination module, configured to:
[0042] 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.
[0043] In some embodiments, the trajectory determination module is used to:
[0044] Determine the extension direction of the line between the controlled virtual object and the first virtual object, use the position of the first virtual object when it is hit as the starting point of the first flight trajectory, and use the extension direction of the extension line as the direction of the first flight trajectory at the starting point.
[0045] In some embodiments, the apparatus further comprises an endpoint adjustment module, configured to:
[0046] If 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.
[0047] In some embodiments, the flight display module is used to:
[0048] In response to the controlled virtual object hitting the first virtual object and the knock-off value of the first virtual object reaching the knock-off threshold, the first virtual object is displayed in the virtual scene interface flying along a first flight trajectory after being hit, and the knock-off value is adjusted after the first virtual object is hit.
[0049] In some embodiments, the apparatus further comprises a state adjustment module, configured to:
[0050] In response to the first virtual object being hit in a first state and the knock-off value reaching a knock-off 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 a collision state, a flight state, and a frightened state;
[0051] In response to the first virtual object reaching a second state during the flight process, the flight process is stopped, the second state comprising a hit state, a dizzy state, and a state where the health value drops to a threshold.
[0052] In another aspect, a virtual object interactive control device is provided, the device comprising:
[0053] a first trajectory determination module, configured to determine, in response to a controlled virtual object in a virtual scene hitting a first virtual object, a first hit direction of the first virtual object based on 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 determine 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 hitting, wherein the controlled virtual object is a virtual object controlled by a terminal;
[0054] a second trajectory determination module, configured to determine, in response to the first virtual object being hit on a target part during flight, a second hit direction of the first virtual object based on an extension line of a line between a virtual prop hitting the first virtual object and a root bone point of the first virtual object, and determine a second flight trajectory based on the second 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 again;
[0055] 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.
[0056] In some embodiments, the first trajectory determination module is used to:
[0057] Determine a first horizontal speed and a first vertical speed of the first virtual object based on the first hit direction and the first speed, where the first horizontal speed and the first vertical speed are speeds of the first virtual object in a horizontal direction and a vertical direction, respectively;
[0058] Based on the first impact position of the first virtual object, the first horizontal speed, the first vertical speed and the virtual weight, the position of the first virtual object at multiple first time points is determined to obtain the first flight trajectory, and the multiple first time points include 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.
[0059] In some embodiments, the second trajectory determination module is used to:
[0060] Determine 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;
[0061] Based on the second impact position of the first virtual object, the second horizontal speed, the second vertical speed and the virtual weight, the position of the first virtual object at multiple second time points is determined to obtain the 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.
[0062] 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.
[0063] 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.
[0064] On the other hand, a computer program product is provided, which includes 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 described in any of the above-mentioned implementation methods.
[0065] An embodiment of the present application provides an interactive control method for virtual objects, which controls a controlled virtual object to hit a first virtual object, triggering the first virtual object to be knocked away, and triggering a second knock-away after the first virtual object is hit by a virtual object that meets preset conditions at a target location during flight; the method enables the controlled virtual object to interact with the virtual object during flight, so that the controlled virtual object can interact with the first virtual object multiple times in a short period of time, thereby improving the interaction efficiency with the first virtual object and thereby improving human-computer efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0067] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0068] Figure 2is a flow chart of a method for interactive control of a virtual object provided in an embodiment of the present application;
[0069] Figure 3 is a flow chart of another method for interactive control of virtual objects provided in an embodiment of the present application;
[0070] Figure 4 is a flow chart of another method for interactive control of virtual objects provided in an embodiment of the present application;
[0071] Figure 5 It is a schematic diagram of determining a direction of impact provided by an embodiment of the present application;
[0072] Figure 6 is a schematic diagram of a flight process provided by an embodiment of the present application;
[0073] Figure 7 is a flow chart of another method for interactive control of virtual objects provided in an embodiment of the present application;
[0074] Figure 8 is a schematic diagram of a virtual object impact provided by an embodiment of the present application;
[0075] Fig. 9 is a schematic diagram of another virtual object impact provided by an embodiment of the present application;
[0076] Fig.10 is a schematic diagram of virtual object interaction provided by an embodiment of the present application;
[0077] Fig.11 is a flow chart of another method for interactive control of virtual objects provided in an embodiment of the present application;
[0078] Fig.12 is a flow chart of another method for interactive control of virtual objects provided in an embodiment of the present application;
[0079] Fig.13 This is a schematic diagram of interruption priorities between multiple states provided in an embodiment of the present application;
[0080] Fig.14 is a block diagram of an interactive control device for a virtual object provided in an embodiment of the present application;
[0081] Fig.15 is a block diagram of an interactive control device for a virtual object provided in an embodiment of the present application;
[0082] Fig.16 is a block diagram of a terminal provided in an embodiment of the present application;
[0083] Fig.17 This is a block diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0084] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0085] In this application, the terms "first", "second", etc. are used to distinguish 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 any limitation on quantity and execution order.
[0086] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.
[0087] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions. For example, the virtual scene interface involved in this application is obtained with full authorization.
[0088] The following is an introduction to the professional terms involved in this application:
[0089] Virtual scene: a virtual scene displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulation of the real world, a semi-simulated and semi-fictitious virtual environment, or a purely fictitious virtual environment. The virtual scene can be any of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, or a three-dimensional virtual scene. The embodiments of the present application do not limit the dimensions of the virtual scene. For example, a virtual scene may include the sky, land, ocean, etc. The land may include environmental elements such as deserts and cities, and terminal users can control virtual objects to move in the virtual scene.
[0090] Virtual object: refers to an movable object in the virtual world. The movable object can be at least one of a virtual character, a virtual animal, and a cartoon character. Optionally, when the virtual world is a three-dimensional virtual world, the virtual object can be a three-dimensional stereo model, and each virtual object has its own shape and volume in the three-dimensional virtual world, occupying a part of the space in the three-dimensional virtual world. Optionally, the virtual object is a three-dimensional character built based on three-dimensional human skeleton technology, and the virtual object achieves different external images by wearing different skins. In some implementations, the virtual object can also be implemented using a 2.5-dimensional or 2-dimensional model, which is not limited in the embodiments of the present application.
[0091] 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.
[0092] AI (Artificial Intelligence) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0093] The following is an introduction to the implementation environment involved in this application:
[0094] The interactive control method of virtual objects provided in the embodiment of the present application can be executed by a computer device, which can be a terminal. The following is a schematic diagram of the implementation environment of the interactive control method of virtual objects provided in the embodiment of the present application. Figure 1 , Figure 1 A schematic diagram of an implementation environment of an interactive control method for a virtual object provided in an embodiment of the present application, the implementation environment includes a terminal 101 and a server 102. The terminal 101 and the server 102 can be directly or indirectly connected via wired or wireless communication, which is not limited in this application. In some embodiments, a target application for running a virtual scene is installed on the terminal 101, and the virtual scene includes a controlled virtual object and an NPC-type virtual object controlled by the terminal 101. The terminal 101 is used to control the interaction between the controlled virtual object and other virtual objects, and the terminal 101 is used to display the interaction effect. The server 102 is a background server of the target application, which is used to provide background services for the operation of the virtual scene, for example, providing the trajectory of the virtual object moving in the virtual scene; optionally, the terminal 101 itself can also determine the trajectory of the virtual object moving in the virtual scene, which is not specifically limited here.
[0095] In some embodiments, the terminal 101 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, an intelligent voice interaction device, a smart home appliance, a vehicle 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 a 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 mainly undertakes computing work, and the terminal 101 undertakes secondary computing work; or, the server 102 undertakes secondary computing services, and the terminal 101 undertakes the main computing work; or, the server 102 and the terminal 101 use a distributed computing architecture for collaborative computing.
[0096] See also Figure 2 , Figure 2 It 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 a terminal as an example for explanation. The method includes the following steps.
[0097] 201. A terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0098] In the embodiment of the present application, the virtual scene interface is an interface in the virtual scene, the virtual scene includes multiple virtual objects, the multiple virtual objects include controlled virtual objects controlled by the terminal and NPC-type virtual objects, and the controlled virtual objects complete the task by hitting the NPC-type virtual objects. In the embodiment of the present application, the first virtual object is an NPC-type virtual object.
[0099] 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 flies along a first flight trajectory after hitting the first virtual object. The controlled virtual object is a virtual object controlled by the terminal.
[0100] In the embodiment of the present application, the perspective of the virtual scene can be a first-person perspective or a third-person perspective. In the first-person perspective, the controlled virtual object is not displayed in the virtual scene interface. In the third-person perspective, the controlled virtual object is displayed in the virtual scene interface, that is, the camera of the virtual scene is behind the controlled virtual object, and the virtual scene interface displays the controlled virtual object and the surrounding environment of the controlled virtual object. In the embodiment of the present application, the third-person perspective is used as an example for explanation.
[0101] In the embodiment of the present application, hitting refers to hitting in any of the following interactive forms: hitting through virtual props or hitting through limbs, which is not specifically limited here.
[0102] 203. In response to the first virtual object hitting the target part during flight and the virtual object hitting the first virtual object meets a preset condition, the terminal displays in the virtual scene interface that the first virtual object flies along a second flight trajectory after hitting the target part again.
[0103] In some embodiments, the target part may be any part of at least one preset part, including the back, chest, etc., which are not specifically limited here. The target part may also be any part of at least one weak part, including the head, neck, etc., which are not specifically limited here. Optionally, different types of virtual objects have different weak parts, and thus different types of virtual objects have different target parts.
[0104] 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.
[0105] An embodiment of the present application provides an interactive control method for virtual objects, which controls a controlled virtual object to hit a first virtual object, triggering the first virtual object to be knocked away, and triggering a second knock-away after the first virtual object is hit by a virtual object that meets preset conditions at a target location during flight; the method enables the controlled virtual object to interact with the virtual object during flight, so that the controlled virtual object can interact with the first virtual object multiple times in a short period of time, thereby improving the interaction efficiency with the first virtual object and thereby improving human-computer efficiency.
[0106] Figure 2 This is the interface performance of the interactive control of virtual objects. Figure 3 This chapter introduces the background process of interactive control of virtual objects. Figure 3 , Figure 3It is a flowchart of an interactive control method of a virtual object provided in an embodiment of the present application. The method is executed by a computer device, which may be a terminal or a server. In the embodiment of the present application, the computer device is a terminal as an example for explanation. The method includes the following steps.
[0107] 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 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 speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the first flight trajectory after the hit, wherein the controlled virtual object is a virtual object controlled by the terminal, and the first speed is a speed of the first virtual object in the first hit direction.
[0108] In an embodiment of the present application, the terminal determines the first hit direction of the first virtual object based on 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 will take the root skeleton point of the first virtual object as the starting point and the direction of the extension line as the first hit direction.
[0109] In the 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.
[0110] In some embodiments, the process of determining the first flight trajectory by the terminal based on the first hit direction, the first speed and the virtual weight of the first virtual object includes the following steps: the terminal determines the first horizontal speed and the first vertical speed of the first virtual object based on the first hit direction and the first speed, the first horizontal speed and the first 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 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 include 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 process can be predicted, so that multiple positions during the flight process can be predicted, and then the flight trajectory can be obtained, which improves the rationality and accuracy of determining the flight trajectory.
[0111] In an embodiment of the present application, the process of determining the first horizontal speed and the first vertical speed of the first virtual object by the terminal 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.
[0112] Optionally, the first virtual object moves at a uniform speed in the horizontal direction and moves with gravity acceleration in the vertical direction. 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, and uses the product of the time difference and the first horizontal speed as the horizontal displacement of the first time point, and uses 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 speed and the acceleration of gravity, and uses 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, thereby obtaining the position of the first time point, which includes the horizontal coordinate and the vertical coordinate corresponding to the first time point.
[0113] In the embodiment of the present application, the positions of the multiple first time points can be arranged in the first flight trajectory in the order of the time points from small to large, and then the first virtual object moves in the multiple positions in sequence according to the order of the multiple positions when flying along the first flight trajectory. Among them, the time intervals between the multiple first time points can be set and changed as needed, and are not specifically limited here.
[0114] 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 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 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 again, and the second speed is the speed of the first virtual object in the secondary hit direction.
[0115] In an embodiment of the present application, the terminal determines the second hit direction of the first virtual object based on 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: taking the root bone point of the first virtual object as the starting point and the direction pointing to the extension line as the first hit direction.
[0116] In an 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 again.
[0117] In some embodiments, the process of determining the second flight trajectory by the terminal based on the secondary impact direction, the second speed and the virtual weight of the first virtual object 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, and 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, 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. 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, so that multiple positions during the flight process can be predicted, and then the flight trajectory can be obtained, which improves the rationality and accuracy of determining the flight trajectory.
[0118] The process in which the terminal determines the second horizontal speed and the second vertical speed, and determines the positions of the plurality of second time points is the same as step 301 and will not be described in detail herein.
[0119] In the embodiment of the present application, the first flying direction is determined based on the extension line of the line between the root bone points of the two virtual objects, and then the first flight trajectory is determined in combination with the speed and virtual weight in the direction. The first flight trajectory determined in this way conforms to the physical principles and has high accuracy, so that the first virtual object can display a realistic flying effect when flying along the first flight trajectory. Similarly, the second flight trajectory determined conforms to the physical principles and has high accuracy, so that the first virtual object can display a realistic flying effect when flying along the second flight trajectory.
[0120] Above Figure 2 It is the basic process of interactive control of virtual objects. Figure 3 It is the process of determining the flight trajectory. Figure 4 The process of interactive control of virtual objects is further explained. Figure 4 , Figure 4 It 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 a terminal as an example for explanation. The method includes the following steps.
[0121] 401. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0122] In the embodiment of the present application, if the perspective of the virtual scene is a first-person perspective, the controlled virtual object is not displayed in the virtual scene interface. If the perspective of the virtual scene is a third-person perspective, the controlled virtual object is also 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 an 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.
[0123] 402. In response to the controlled virtual object hitting the first virtual object and the knock-off value of the first virtual object reaching the knock-off threshold, the terminal determines a first flight trajectory of the first virtual object based on a relative position relationship between the controlled virtual object and the first virtual object, wherein the controlled virtual object is a virtual object controlled by the terminal, and the knock-off value is adjusted after the first virtual object is hit.
[0124] In an embodiment of the present application, the knock-off value can be the number of hits or the knock-off score. Accordingly, if the knock-off value is the number of hits, the knock-off threshold is the preset number of knock-offs; if the knock-off value is the knock-off score, the knock-off threshold is the preset knock-off score. Each time the first virtual object is hit, the knock-off value of the first virtual object is adjusted; when the knock-off value reaches the knock-off threshold, it means that the first virtual object meets the conditions for being knocked off, and then the first virtual object is knocked off. Optionally, if the knock-off value is the number of hits, and the preset number of knock-offs is once, the controlled virtual object only needs to hit the first virtual object once to knock the first virtual object off.
[0125] In an embodiment of the present application, if the knock-off value is the number of hits, optionally, the preset number of knock-offs is associated with at least one of the type of the first virtual object and the ability value of the controlled virtual object. Among them, different types of virtual objects have different life values. The ability value is used to indicate the ability of the controlled virtual object to adjust the life value of the first virtual object. The greater the ability value of the controlled virtual object, the greater the loss of life value caused to the first virtual object when hitting the first virtual object, that is, the greater the reduction in the life value of the first virtual object. Optionally, the preset number of knock-offs is associated with the type of the first virtual object, and accordingly, the preset number of knock-offs can be obtained from the correspondence between the type of the virtual object and the preset number of knock-offs. Alternatively, the preset number of knock-offs is associated with the ability value of the controlled virtual object, and accordingly, the preset number of knock-offs can be obtained from the correspondence between the ability value of the controlled virtual object and the preset number of knock-offs. Alternatively, the preset number of knock-offs 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 knock-offs can be 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 knock-offs. In some embodiments, the preset number of knock-offs is also associated with the type of virtual props used by the controlled virtual object. When different types of virtual props hit the first virtual object once, the life value of the first virtual object is adjusted to different extents. Optionally, the preset number of knock-offs is associated with the type of virtual props, and accordingly, the preset number of knock-offs can be obtained from the correspondence between the type of virtual props and the preset number of knock-offs. Alternatively, the preset number of knock-offs is associated with the type of virtual props, 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, and accordingly, the preset number of knock-offs can be obtained from the correspondence between the at least two associated items and the preset number of knock-offs.
[0126] If the knock-off value is a knock-off score, and the knock-off threshold is a preset knock-off score, each time the first virtual object is hit, the adjustment range of the knock-off score 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 range 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 range can be obtained from the correspondence between the item and the adjustment range. Alternatively, the adjustment range 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 range can be obtained from the correspondence between these two items and the adjustment range. Alternatively, the adjustment range 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 range can be obtained from the correspondence between these three items and the adjustment range.
[0127] In some embodiments, before the controlled virtual object hits the first virtual object, the first virtual object may also be hit by other controlled virtual objects, that is, the knock-off value of the first virtual object refers to the accumulated knock-off value after the first virtual object is hit by at least one controlled virtual object.
[0128] In the embodiment of the present application, by setting a knock-off value for the first virtual object, the first virtual object can be knocked off only after being hit multiple times, thus realizing a mechanism of producing a specific knock-off effect on the first virtual object by introducing the knock-off value. And because the adjustment range of the knock-off score and the preset knock-off times can be flexibly and dynamically determined according to the type of the first virtual object, the ability value of the controlled virtual object, and the type of the virtual prop, the probability of a% of the virtual object being knocked off each time it is hit is dynamically set.
[0129] 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, and determines the first flight trajectory of the first virtual object based on the extension line. Optionally, the terminal uses the position of the first virtual object when it is hit as the starting point of the first flight trajectory, and uses the extension 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 in which the first virtual object was first hit. In this way, the first flight trajectory is determined based on 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 , Figure 5 It is a schematic diagram of determining the direction of impact provided in an embodiment of the present application.
[0130] Optionally, the line between the controlled virtual object and the first virtual object refers to the line between the root skeleton points of the two virtual objects or the line between the centers of gravity of the two virtual objects, which is not specifically limited here. If the line between the controlled virtual object and the first virtual object refers to the line between the root skeleton points of the two virtual objects, the process of determining the first flight trajectory based on the extension line of the line is the same as step 301, and will not be repeated here.
[0131] In an embodiment of the present application, the first flight trajectory is determined by program drive, and the above steps are explained 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, and the server is a background server of a target application running a virtual scene. In other embodiments, the terminal and the server determine the first flight trajectory respectively, 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.
[0132] 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.
[0133] 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 first direction in which the first virtual object is hit, a target flight form matching the first direction from multiple flight forms, where the multiple flight forms correspond to multiple directions, and the flight form refers to the body form of the virtual object during flight; based on the target flight form, the terminal displays in the virtual scene interface that the first virtual object flies along the first flight trajectory in the target flight form.
[0134] In an embodiment of the present application, multiple directions refer to the front, rear, left, right and other directions in which the first virtual object is hit, and multiple directions correspond to different flight forms, and multiple flight forms can be set and changed as needed. For example, if the first direction is forward, the target flight form is the form in which the body of the first virtual object is bent backward. Accordingly, the first virtual object flies along the first flight trajectory in the target flight form, which means that the first virtual object flies backward along the first flight trajectory in the form of a body bent backward. In an embodiment of the present application, a flight form that matches the hit direction is selected from multiple flight forms, which improves the diversity and efficiency of the displayed flight process, thereby improving the display effect of the hit. In some embodiments, the flight form matched in each direction also includes multiple sub-forms, which correspond to different hit methods and hit times, respectively. The terminal can also select a more accurate flight form from the multiple sub-forms of the first direction based on the way the first virtual object is hit and the time it is hit.
[0135] In some embodiments, the flight process is presented in the form of an animation; optionally, the flight process includes a plurality of 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 impact animation (KnockDown_Bump). The knockdown start animation refers to the flying animation displayed when the first virtual object is hit and triggers a knockdown, which is composed of flight forms in multiple directions. The direction of the flight form to be used to form the animation is determined according to the direction in which the virtual object is hit, as the knockdown start animation. The knockdown loop animation refers to the cyclical flight animation of the virtual object during flight. The knockdown end animation refers to the animation of the virtual object landing normally after flight. The knockdown impact animation refers to the animation of the virtual object colliding with other virtual objects or virtual objects during flight. For example, see Figure 6 , Figure 6 1 is a schematic diagram of a flying process provided by an embodiment of the present application, wherein the first virtual object is hit from the front by the controlled virtual object with a virtual prop, and the body of the first virtual object bends backwards and moves backwards in flight.
[0136] In an embodiment of the present application, the landing point of the first virtual object flight should be located on the movable area (navmesh) of the virtual scene. Accordingly, if the end point of the first flight trajectory is located in the inactive area in 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 in the virtual scene. If the end point of the first flight trajectory is located in the movable area in 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 when the first virtual object is shot and the physical effect of gravity. That is, the 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 in the virtual scene, it is avoided that the virtual object shot is stuck in some immovable positions in the virtual scene.
[0137] 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, if 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 to match 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 hitting.
[0138] In some embodiments, the virtual scene includes virtual objects that are allowed to be knocked away and virtual objects that are not allowed to be knocked away. Optionally, the virtual objects that are not allowed to be knocked away are marked with a first tag, and the first tag indicates that the virtual object is not allowed to be knocked away. Optionally, when the controlled virtual object hits the first virtual object, it is detected whether the first virtual object carries the first tag. If 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 knock-away value is not accumulated, and accordingly, the knock-away is not triggered to fly.
[0139] 404. In response to the first virtual object hitting the target part during flight and the virtual object hitting the first virtual object meets a preset condition, the terminal displays in the virtual scene interface that the first virtual object flies along a second flight trajectory after hitting the target part again.
[0140] In the embodiment of the present application, the virtual object in the flying process generally does not trigger a new knock-off. In order to increase the diversity of the gameplay in the virtual scene, through the additional (perk) correction, the first virtual object in the flying process is set to generate a second knock-off gameplay.
[0141] In an embodiment of the present application, the virtual object that hits the first virtual object satisfies a preset condition, which refers to at least one of the following: the ability value of the virtual object that hits the first virtual object satisfies the preset ability value; or, the virtual props used by the virtual object that hits the first virtual object are preset props. Among them, the preset energy value and the preset props can be set and changed as needed, and are not specifically limited here. In an embodiment of the present application, by setting a restriction condition for triggering a second knock-off, users can be encouraged to improve the ability value of the controlled virtual object and to obtain preset props, thereby promoting participation in virtual scenes.
[0142] In other embodiments, in response to the first virtual object being hit at a target part during flight, and the virtual object that hits the first virtual object meets a preset condition, and the first virtual object is a virtual object that is allowed to be knocked away a second time, the terminal displays in the virtual scene interface that the first virtual object is flying along a second flight trajectory after being hit again. In this way, different knock-away gameplay can be set for different virtual objects, thereby increasing gameplay diversity and further increasing interaction diversity.
[0143] In an embodiment of the present application, the second flight trajectory is determined based on the relative position relationship between the first virtual object and the virtual object that hits the first virtual object. In some embodiments, the process of determining the second flight trajectory is the same as the process of determining the first flight trajectory in step 402, and will not be repeated here. In other embodiments, the second flight trajectory is determined based on the extension line of the line between the root bone point of the first virtual object and the virtual prop that hits the first virtual object. The process is the same as step 302 and will not be repeated here.
[0144] In some embodiments, if the end point of the second flight trajectory is located in an inactive area in the virtual scene, the terminal adjusts the end point of the second flight trajectory so that the adjusted end point is located in an active area in the virtual scene. The process of adjusting the end point of the second flight trajectory is the same as the process of adjusting the end point of the first flight trajectory in step 403, and will not be repeated here.
[0145] In some embodiments, in response to a first virtual object being hit at a target part during flight and the virtual object that hits the first virtual object meets a preset condition, the terminal determines a life adjustment ratio of the first virtual object based on the ability value of the virtual object that hits the first virtual object and the type of the first virtual object, and adjusts the life of the first virtual object based on the life adjustment ratio of the first virtual object, where the life adjustment ratio of the first virtual object is positively correlated with the ability value of the virtual object that hits the first virtual object.
[0146] 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. Wherein, 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 between the health value of the first virtual object and the health value adjustment ratio, and taking the difference between the health value of the first virtual object and the product as the adjusted health value.
[0147] 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 flies along the second flight trajectory after being hit again; 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.
[0148] In the embodiment of the present application, the threshold value refers to a zero value. Displaying the first object being eliminated in the virtual scene interface may be displaying the first virtual object disappearing instantly, or disappearing gradually, or becoming larger and then disappearing in the virtual scene interface, so as to improve the display effect.
[0149] 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 and triggers the virtual object to be knocked away for the first time, the life value of the virtual object is slightly reduced or not reduced. By hitting the first virtual object in the flying process, not only the second knock-away is triggered, but also the life value of the first virtual object can be reduced by a large margin, that is, the adjustment amount of the life value by the second knock-away is much greater than the adjustment amount of the life value by the first knock-away. Therefore, it can promote the interaction between the controlled virtual object and the flying virtual object, so as to achieve a rapid reduction of the life value of the virtual object by hitting the virtual object in the flying process, improve the interaction efficiency with the first virtual object, and then improve the human-computer efficiency.
[0150] In the embodiment of the present application, the second knock-off must 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 the first knock-off, the difficulty of the second knock-off is increased, and the threshold of the second knock-off is raised; accordingly, the amount of health adjustment during the second knock-off is increased so that the difficulty matches the amount of health adjustment, thereby promoting the controlled virtual object to trigger the second knock-off and improving the efficiency of human-computer interaction.
[0151] An embodiment of the present application provides an interactive control method for virtual objects, which controls a controlled virtual object to hit a first virtual object, triggering the first virtual object to be knocked away, and triggering a second knock-away after the first virtual object is hit by a virtual object that meets preset conditions at a target location during flight; the method enables the controlled virtual object to interact with the virtual object during flight, so that the controlled virtual object can interact with the first virtual object multiple times in a short period of time, thereby improving the interaction efficiency with the first virtual object and thereby improving human-computer efficiency.
[0152] Above Figure 4 The interactive process of a virtual object being knocked away twice during flight is used as an example to illustrate that a virtual object can also collide with other virtual objects during flight. Figure 7 This process is described in detail. Figure 7 , Figure 7 It 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 a terminal as an example for explanation. The method includes the following steps.
[0153] 701. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0154] 702. In response to the controlled virtual object hitting the first virtual object and the knock-off value of the first virtual object reaching the knock-off threshold, the terminal determines 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, the controlled virtual object being a virtual object controlled by the terminal, and the knock-off value being adjusted after the first virtual object is hit.
[0155] 703. Based on the first flight trajectory, the terminal displays in the virtual scene interface that the first virtual object flies along the first flight trajectory after being hit.
[0156] In the embodiment of the present application, steps 701-703 are the same as steps 401-403 and are not described again here.
[0157] 704. In response to the first virtual object colliding with the second virtual object during flight, the terminal displays in the virtual scene interface that the second virtual object is collided.
[0158] In the embodiment of the present application, the second virtual object is an NPC type virtual object. The first virtual object collides with at least one second virtual object, that is, the first virtual object can collide with at least one second virtual object during one collision.
[0159] In the embodiment of the present application, the position where the first virtual object hits the second virtual object can be in the air or on the ground. For example, the first virtual object hits the second virtual object in flight in the air, and hits the second virtual object on the ground on the ground.
[0160] In an embodiment of the present application, a first virtual object may collide with multiple second virtual objects during a collision. Optionally, the multiple second virtual objects are virtual objects that have physical contact with the first virtual object; or, the multiple second virtual objects are virtual objects within a preset range, the preset range being centered on the first second virtual object collided with by the first virtual object and having a preset distance as a radius; that is, after any virtual object is collided, a chain reaction of collision 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 , Figure 8 Schematic diagram of a virtual object collision provided by an embodiment of the present application. A first virtual object is triggered to fly after being hit by a controlled virtual object, and the first virtual object can hit multiple second virtual objects at one time during the flight.
[0161] 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 second identifier, and the second identifier indicates that the virtual object is not allowed to be hit. Optionally, when the terminal hits the second virtual object, it detects whether the second virtual object carries the second identifier. If the second virtual object does not carry the second identifier, the above step 704 is executed. If the second virtual object carries the second identifier, it will not be displayed that the second virtual object is hit, and the health value will not be adjusted. Only the health value of the first virtual object is adjusted.
[0162] An embodiment of the present application provides an interactive control method for virtual objects, which controls a controlled virtual object to hit a first virtual object. When the knock-off value of the first virtual object reaches a knock-off threshold, the first virtual object is triggered to be knocked off, and the first virtual object can collide with other virtual objects during flight. That is, the interactive method provided by the method can cause a chain reaction of knocking off and colliding virtual objects through a single attack by the controlled virtual object, thereby making the actual effect of a single attack greater than the effect of the attack itself, thereby expanding the attack range and further improving the efficiency of human-computer interaction.
[0163] 705. The terminal adjusts the health values of the first virtual object and the second virtual object respectively.
[0164] 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 in which the terminal adjusts the life values of the first virtual object and the second 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 and the type of the first virtual object, and 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 second virtual object based on the ability value of the controlled virtual object and the type of the second virtual object, and adjusts the life value of the second virtual object based on the life value adjustment ratio of the second virtual object, and the life value adjustment ratio of the second virtual object is positively correlated with the ability value of the controlled virtual object.
[0165] In the embodiment of the present application, adjusting the health values of the first virtual object and the second virtual object refers to reducing the health values of the first virtual object and the second virtual object. Wherein, for any virtual object of the first virtual object and the second 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 between the health value of the virtual object and the health value adjustment ratio, and taking the difference between the health value of the virtual object and the product as the adjusted health value.
[0166] In an 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 life value adjustment ratio of the virtual object. Accordingly, for any virtual object of the first virtual object and the second virtual object, the terminal determines the life value adjustment ratio of the first 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 corresponding relationship corresponding to the type from multiple corresponding relationships based on the type of the virtual object, and the multiple corresponding relationships 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 corresponding relationship, and the target corresponding relationship 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, and a flexible and dynamic adjustment ratio of the life value is realized, so that the determined life value adjustment ratio is more accurate, and then the accurate adjustment of the life value can be achieved.
[0167] 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 life value of the virtual object is slightly reduced or not reduced. However, the life value of the virtual object can be greatly reduced by colliding with the virtual object. Therefore, the controlled virtual object can be promoted to knock the virtual object away, so that the virtual object can collide with other virtual objects during flight, thereby achieving a rapid reduction in the life value of the virtual object.
[0168] Optionally, the terminal not only adjusts the life value of the first virtual object after the first virtual object collides with the second virtual object during flight, but also adjusts the life value of the first virtual object 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 collides with the wall, and adjusts the life value of the first virtual object.
[0169] In some embodiments, the hit second virtual object will not hit other virtual objects again to improve the simplicity of the collision gameplay. In other embodiments, the hit second virtual object can also hit other surrounding virtual objects to generate a collision chain reaction and improve the collision interaction effect.
[0170] 706. When the health values of the first virtual object and the second 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 second virtual object moving along the target moving trajectory after being hit.
[0171] 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 the flight trajectory at the impact location and falls to the ground along the changed flight trajectory. After the first virtual object hits the second virtual object, the kinetic energy is consumed and the first virtual object falls vertically to the ground. When the first virtual object acquires new kinetic energy during the impact of the second virtual object, the flight trajectory is changed. Optionally, the direction of the changed flight trajectory is opposite to the direction of the first flight trajectory.
[0172] If the position where the first virtual object hits the second virtual object is in the air, the second virtual object moves along the target moving trajectory after being hit, which means that the second virtual object falls vertically to the ground at the position of the impact; or, the second virtual object changes the flight trajectory at the position of the impact, the target moving trajectory refers to the changed flight trajectory, and the second virtual object moves along the target moving 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.
[0173] If the position where the first virtual object hits the second virtual object is the ground, the second virtual object moves along the target moving trajectory after being hit means that the second virtual object moves along the target moving trajectory on the ground after being hit. Accordingly, the process of determining the target moving trajectory includes the following steps: the terminal determines the target moving trajectory of the second virtual object after being hit based on the flight direction of the first virtual object relative to the second virtual object. The flight direction is obtained based on the direction from which the first virtual object flies toward the second virtual object; for example, if the first virtual object flies toward the second virtual object from the left of the second virtual object, the flight direction of the first virtual object relative to the second virtual object is from left to right.
[0174] In some embodiments, the process of determining the target moving trajectory based on the flight direction by the terminal includes the following steps: the terminal takes the position where the second virtual object is hit as the starting point, and extends a preset distance along the flight direction to obtain the target moving trajectory. The preset distance can be set and changed as needed, and can be a fixed distance. The target moving trajectory is determined in this way, so that when the second virtual object moves along the target moving trajectory, it can show the effect of the second virtual object staggering a few steps after being hit, thereby improving the impact display effect; and the moving trajectory is directly determined by a preset distance, without prejudging the landing point, and directly driving the displacement, thereby improving the impact display efficiency. Optionally, the moving trajectory is determined by the root motion model of the terminal itself, thereby improving the determination efficiency.
[0175] In some embodiments, after the second virtual object is hit and the health value is not adjusted to the threshold, the second virtual object is displayed to move after being hit. In other embodiments, the second virtual object has an impact value, and accordingly, after the first virtual object hits the second virtual object on the ground, and the impact value of the second virtual object reaches the impact threshold, the second 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 second virtual object is hit. If the impact value of the second virtual object does not reach the impact threshold, the second virtual object is displayed to be hit, and the second virtual object is not displayed to move after being hit. Optionally, the impact value is the cumulative impact value of the second virtual object after being hit by at least one first virtual object.
[0176] The impact value may be 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 second virtual object is impacted, the impact value of the second virtual object is adjusted.
[0177] If the impact value is the number of impacts, optionally, the preset number of impacts is associated with one of the weight of the second 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 second 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. If the impact value is the impact score, optionally, the adjustment amplitude of the impact score is associated with one of the weight of the second 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 second 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.
[0178] In some embodiments, the terminal displays in the virtual scene interface the process of the second virtual object moving along the target moving trajectory after being hit on the ground, including the following steps: the terminal determines the target collision shape matching the second direction from multiple collision shapes based on the second direction in which the second virtual object is hit, the multiple collision shapes corresponding to multiple directions, and the collision shape refers to the body shape of the virtual object after being hit; based on the target collision shape, the terminal displays in the virtual scene interface that the second virtual object moves along the moving trajectory in the target collision shape. In this embodiment, the collision shape matching the collision direction is selected from multiple collision shapes, which improves the diversity and efficiency of displaying the collision process, thereby improving the display effect of the collision process.
[0179] In the embodiment of the present application, the multiple directions refer to the front, back, left, right, etc. where the second virtual object is hit, and can be set and changed as needed. For example, the multiple directions are front, back, left, and right, and 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 second direction is front, then the target collision form can be the form of the second virtual object's body leaning backward, and accordingly, the second virtual object moving along the target moving trajectory in the target collision form means that the second virtual object moves backward along the target moving trajectory with its body leaning backward. For example, see Fig. 9 , Fig. 9 1 is a schematic diagram of a virtual object collision provided by an embodiment of the present application. In which, the controlled virtual object hits the front of the first virtual object, and the first virtual object is displaced backward; the second virtual object is hit to the right, and the second virtual object is displaced to the left.
[0180] In the embodiment of the present application, when the life value of the second virtual object has not dropped to the threshold, the target movement trajectory is determined, and the second virtual object is shown to move along the target movement trajectory after being hit. Correspondingly, when the life value of the second virtual object drops to the life threshold, the second virtual object is shown to be eliminated after the collision.
[0181] 707. When the health values of the first virtual object and the second virtual object are adjusted to a threshold, the terminal displays in the virtual scene interface that the first virtual object and the second virtual object are eliminated.
[0182] Wherein, when the life value of the first virtual object is adjusted to the threshold value, and the life value of the second virtual object is not adjusted to the threshold value, the terminal displays in the virtual scene interface that the first virtual object is eliminated, and displays that the second virtual object moves along the target moving trajectory after being hit. When the life value of the first virtual object is not adjusted to the threshold value, and the life value of the second virtual object is adjusted to the threshold value, the terminal displays in the virtual scene interface that the second virtual object is eliminated, and displays that the first virtual object falls to the ground.
[0183] In the embodiment of the present application, the threshold value refers to a zero value. The elimination of the first virtual object and the second virtual object in the virtual scene interface may be displayed as the first virtual object and the second virtual object disappearing instantly, or disappearing gradually, or becoming larger and then disappearing in the virtual scene interface, so as to improve the display effect.
[0184] It should be noted that if the first virtual object does not collide with other virtual objects during flight, the first virtual object is displayed along the first flight trajectory and lands at the end of 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. Among them, if the life value of the first virtual object is adjusted to the threshold, the first virtual object is displayed in the virtual scene interface as being eliminated at the end; if the life value of the first virtual object is not adjusted to the threshold, the first virtual object is displayed in the virtual scene interface as climbing up after landing at the end and resuming walking form.
[0185] It should be noted that the first virtual object can collide with at least one second virtual object during flight. Since the health of the virtual objects collided is adjusted, the controlled virtual object can gather multiple virtual objects together by moving, and then hit a first virtual object to make the first virtual object collide with multiple second virtual objects gathered together at once. In this way, it can interact with multiple virtual objects at the same time and reduce the health of multiple virtual objects at the same time, thereby improving the interaction efficiency and creating a refreshing gameplay experience. For example, see Fig.10 , Fig.10 This 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 hits multiple second virtual objects during the flight, so that a chain reaction of hitting and colliding is achieved by controlling the controlled virtual object, thereby improving the diversity and efficiency of interactive gameplay.
[0186] See also Fig.11 , Fig.11 It is a flow chart of an interactive control method of a virtual object provided in an embodiment of the present application. In an embodiment of the present application, the two kinds of data, namely the probability of a virtual object being knocked away each time it is hit and the life value adjustment ratio, can be packaged and named as a "pinball table" for use in subsequent knocking away. Correspondingly, if a "pinball man" corresponding to the "pinball table" is included in a single game, the knock-away state is triggered after the first virtual object is hit, and then it is detected whether it collides with the second virtual object during the flight. If not, the first virtual object is shown to have landed normally. If so, the collision effects of the first virtual object and the second virtual object are displayed, and the life values of the first virtual object and the second virtual object are adjusted to determine whether the adjusted life values have dropped to the threshold; if not, the first virtual object and the second virtual object are shown to have landed normally, and if so, the first virtual object and the second virtual object are shown to be eliminated.
[0187] An embodiment of the present application provides an interactive control method for virtual objects, which controls a controlled virtual object to hit a first virtual object. When the knock-off value of the first virtual object reaches a knock-off threshold, the first virtual object is triggered to be knocked off, and the first virtual object can collide with other virtual objects during flight. That is, the interactive method provided by the method can cause a chain reaction of knocking off and colliding virtual objects through a single attack by the controlled virtual object, thereby making the actual effect of a single attack greater than the effect of the attack itself, thereby expanding the attack range and further improving the efficiency of human-computer interaction.
[0188] Above Figure 7 The embodiment of the present invention only takes the interactive process of a virtual object colliding with other virtual objects during flight as an example for explanation. The virtual object during flight can also interact with other virtual objects during flight. Fig.12 This process is described in detail. Fig.12 , Fig.12 It 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 a terminal as an example for explanation. The method includes the following steps.
[0189] 1201. The terminal displays a virtual scene interface, where the virtual scene interface displays a first virtual object.
[0190] 1202. In response to the controlled virtual object hitting the first virtual object and the knock-off value of the first virtual object reaching the knock-off threshold, the terminal determines a first flight trajectory of the first virtual object based on a relative position relationship between the controlled virtual object and the first virtual object. The controlled virtual object is a virtual object controlled by the terminal.
[0191] 1203. Based on the first flight trajectory, the terminal displays in the virtual scene interface the first virtual object flying along the first flight trajectory after being hit.
[0192] In the embodiment of the present application, the above steps 1201-1203 are the same as steps 401-403 and are not described again here.
[0193] 1204. In response to the first virtual object being hit by the third virtual object during flight, the terminal displays in the virtual scene interface that the first virtual object is hit, and the third virtual object is a virtual object during flight.
[0194] In this embodiment, after the first virtual object is hit by the third virtual object, the terminal adjusts the health values of the first virtual object and the third virtual object. If the health values of the two objects do not drop to the threshold, the terminal displays the first virtual object being hit in the virtual scene interface, including the following steps: the terminal displays the first virtual object and the third virtual object falling to the ground after the collision in the virtual scene interface. The implementation process of falling to the ground is the same as step 706 and will not be repeated here. If the health values of the two objects drop to the threshold, the terminal displays the first virtual object being hit in the virtual scene interface, including the following steps: the terminal displays the first virtual object and the third virtual object being eliminated after the collision in the virtual scene interface, 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.
[0195] In the embodiment of the present application, since two virtual objects in the flight process can produce collision interaction and reduce the health value, it can promote the controlled virtual object to hit multiple virtual objects and trigger multiple virtual objects to be knocked away. Through the collision interaction of virtual objects in the flight process, the health values of multiple virtual objects can be reduced at the same time, the interaction efficiency can be improved, and a refreshing gameplay experience can be produced.
[0196] In the embodiment of the present application, the state of the virtual object includes a flying state, a collision state, a startled state (startle), a hit state, a dizzy state (weak stun), a state where the health value drops to a threshold, etc. The collision state includes the moment of being hit and the state of movement after the collision (hit reaction). The startled state refers to the state in which the virtual object is frightened by some virtual props, such as the state of being frightened by sound and light props. The dizzy state refers to the state after the virtual object is hit. The flying state includes the flying state in a single hit and the flying state in a secondary hit (perk). Among them, any state can interrupt other states or be interrupted by other states. For example, in response to the first virtual object being hit in the first state, the hit value reaches the hit threshold, and the terminal displays the first virtual object flying along the first flight trajectory after the hit in the virtual scene interface. The first state includes the collision state, the flying state and the fright state; the terminal responds to the first virtual object reaching the second state during the flight process, and stops the flight process. The second state includes the hit state, the dizzy state and the state where the health value drops to a threshold. In the embodiment of the present application, multiple states can be set to interrupt each other, and the occurrence of a state is generally due to the interaction between virtual objects. In this way, multiple interaction situations can be achieved, thereby improving the diversity of interactions between virtual objects and improving interaction efficiency.
[0197] 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 priorities among the multiple states. The higher the priority, the more states that can be interrupted. The above-mentioned states and the interruption priorities among the states are only an exemplary description. In different virtual scenes, virtual objects can have different states, and the priorities among the states can be set and changed as needed, which is not specifically limited here. Fig.13 , Fig.13 This is a schematic diagram of interruption priorities between multiple states provided in an embodiment of the present application.
[0198] 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 knocking away and hitting virtual objects, so that the actual effect of an attack is greater than the effect of the attack itself, thereby expanding the attack range and improving the efficiency of human-computer interaction.
[0199] Fig.14 is a block diagram of a virtual object interactive control device provided 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, see Fig.14 , the device comprises:
[0200] The interface display module 1401 is used to display a virtual scene interface, where the virtual scene interface displays a first virtual object;
[0201] The flight display module 1402 is used for displaying, in response to the controlled virtual object hitting the first virtual object, in the virtual scene interface that the first virtual object is flying along the first flight trajectory after hitting the first virtual object, wherein the controlled virtual object is a virtual object controlled by the terminal;
[0202] The flight display module 1402 is also used to display in the virtual scene interface that the first virtual object is flying along a second flight trajectory after hitting the target part again in response to the first virtual object being hit by the target part during the flight and the virtual object that hits the first virtual object meets the preset conditions.
[0203] In some embodiments, the virtual object hitting the first virtual object satisfies a preset condition, which refers to at least one of the following:
[0204] The ability value of the virtual object hitting the first virtual object satisfies a preset ability value; or,
[0205] The virtual props used by the virtual object that hits the first virtual object are preset props.
[0206] In some embodiments, the device further comprises a life value adjustment module, configured to:
[0207] Based on the ability value of the virtual object that hits the first virtual object and the type of the first 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 virtual object that hits the first virtual object.
[0208] In some embodiments, the flight display module 1402 is used to:
[0209] Based on a first direction in which the first virtual object is hit, determining a target flight form that matches the first direction from a plurality of flight forms, wherein the plurality of flight forms correspond to a plurality of directions, and the flight form refers to a body form of the virtual object during flight;
[0210] Based on the target flight form, a first virtual object is displayed in the virtual scene interface flying along a first flight trajectory in the target flight form.
[0211] In some embodiments, the apparatus further comprises an impact display module for:
[0212] In response to the first virtual object colliding with the second virtual object during flight, the second virtual object is displayed in the virtual scene interface as being collided.
[0213] In some embodiments, the impact display module is used to:
[0214] Determining a target movement trajectory of the second virtual object after being hit based on a flight direction of the first virtual object relative to the second virtual object;
[0215] Based on the target movement trajectory, the second virtual object is displayed in the virtual scene interface moving along the target movement trajectory after the collision.
[0216] In some embodiments, the collision display module is used to: take the position where the second virtual object is hit as the starting point, extend a preset distance along the flight direction, and obtain a target movement trajectory.
[0217] In some embodiments, the impact display module is used to: determine a target impact shape matching the second direction from a plurality of impact shapes based on a second direction in which the second virtual object is impacted, the plurality of impact shapes corresponding to a plurality of directions, the impact shape referring to a body shape of the virtual object after being impacted;
[0218] Based on the target collision form, the second virtual object is displayed in the virtual scene interface moving along the target movement trajectory in the target collision form.
[0219] In some embodiments, the life value adjustment module is further used to:
[0220] Determine a life value adjustment ratio of the first virtual object based on the ability value of the controlled virtual object and the type of the first virtual object, and adjust 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;
[0221] Based on the ability value of the controlled virtual object and the type of the second virtual object, a life value adjustment ratio of the second virtual object is determined; based on the life value adjustment ratio of the second virtual object, the life value of the second virtual object is adjusted, and the life value adjustment ratio of the second virtual object is positively correlated with the ability value of the controlled virtual object.
[0222] In some embodiments, the impact display module is further used to:
[0223] In response to the first virtual object being hit by the third virtual object during flight, it is displayed in the virtual scene interface that the first virtual object is hit, and the third virtual object is a virtual object during flight.
[0224] In some embodiments, the apparatus further comprises a trajectory determination module for:
[0225] 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.
[0226] In some embodiments, the trajectory determination module is used to:
[0227] Determine the extension line of the line between the controlled virtual object and the first virtual object, take the position of the first virtual object when it is hit as the starting point of the first flight trajectory, and take the extension direction of the extension line as the direction of the first flight trajectory at the starting point.
[0228] In some embodiments, the apparatus further comprises an endpoint adjustment module, configured to:
[0229] If 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.
[0230] In some embodiments, the flight display module 1402 is used to:
[0231] In response to the controlled virtual object hitting the first virtual object and the knock-off value of the first virtual object reaching the knock-off threshold, the first virtual object is displayed in the virtual scene interface flying along the first flight trajectory after the hit, and the knock-off value is adjusted after the first virtual object is hit.
[0232] In some embodiments, the apparatus further comprises a state adjustment module, configured to:
[0233] In response to the first virtual object being hit in the first state and the knock-off value reaching the knock-off 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 a collision state, a flight state, and a frightened state;
[0234] In response to the first virtual object reaching a second state during the flight process, the flight process is stopped, the second state comprising a hit state, a dizzy state, and a state where the health value drops to a threshold value.
[0235] An embodiment of the present application provides an interactive control method for virtual objects, which controls a controlled virtual object to hit a first virtual object, triggering the first virtual object to be knocked away, and triggering a second knock-away after the first virtual object is hit by a virtual object that meets preset conditions at a target location during flight; the method enables the controlled virtual object to interact with the virtual object during flight, so that the controlled virtual object can interact with the first virtual object multiple times in a short period of time, thereby improving the interaction efficiency with the first virtual object and thereby improving human-computer efficiency.
[0236] Fig.15 is a block diagram of a virtual object interactive control device provided 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, see Fig.15 , the device comprises:
[0237] A first trajectory determination module 1501 is used for determining a first hit direction of the first virtual object based on 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 in response to the controlled virtual object in the virtual scene hitting 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 hitting, wherein the controlled virtual object is a virtual object controlled by the terminal;
[0238] The second trajectory determination module 1502 is used for determining a second hit direction of the first virtual object based on an extension line of a line between a virtual prop hitting the first virtual object and a root bone point of the first virtual object in response to the first virtual object being hit on a target part during flight, and determining a second flight trajectory based on the second 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 again;
[0239] The first speed is the speed of the first virtual object in the direction of the first impact, and the second speed is the speed of the first virtual object in the direction of the second impact.
[0240] In some embodiments, the first trajectory determination module 1501 is used to:
[0241] Determine a first horizontal speed and a first vertical speed of the first virtual object based on the first impact direction and the first speed, where the first horizontal speed and the first vertical speed are speeds of the first virtual object in a horizontal direction and a vertical direction, respectively;
[0242] 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, and the multiple first time points include a time point when the first virtual object reaches an end point of the first flight trajectory and a time point before reaching the end point.
[0243] In some embodiments, the second trajectory determination module 1502 is configured to:
[0244] Determine 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;
[0245] 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.
[0246] In the embodiment of the present application, the first flying direction is determined based on the extension line of the line between the root bone points of the two virtual objects, and then the first flight trajectory is determined in combination with the speed and virtual weight in the direction. The first flight trajectory determined in this way conforms to the physical principles and has high accuracy, so that the first virtual object can display a realistic flying effect when flying along the first flight trajectory. Similarly, the second flight trajectory determined conforms to the physical principles and has high accuracy, so that the first virtual object can display a realistic flying effect when flying along the second flight trajectory.
[0247] In the embodiments of the present application, the computer device may be 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.
[0248] Fig.16 A structural block diagram of a terminal 1600 provided by an exemplary embodiment of the present application is shown.
[0249] Typically, the terminal 1600 includes a processor 1601 and a memory 1602 .
[0250] The processor 1601 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1601 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1601 may also include 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, the processor 1601 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1601 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0251] The memory 1602 may include one or more computer-readable storage media, which may be non-transitory. The memory 1602 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1602 is used to store at least one computer program, which is executed by the processor 1601 to implement the interactive control method of the virtual object provided in the method embodiment of the present application.
[0252] In some embodiments, the terminal 1600 may further optionally include: a peripheral device interface 1603 and at least one peripheral device. The processor 1601, the memory 1602 and the peripheral device interface 1603 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1603 via a bus, a signal line or a circuit board. 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.
[0253] The peripheral device interface 1603 may be used to connect at least one peripheral device related to I / O (Input / Output) 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 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0254] The radio frequency circuit 1604 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1604 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1604 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency 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. The radio frequency circuit 1604 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: the World Wide Web, a metropolitan area network, an intranet, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1604 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0255] The display screen 1605 is used to display a UI (User Interface). The UI may include graphics, text, icons, multimedia resources, and any combination thereof. When the display screen 1605 is a touch display screen, 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 can be input to the processor 1601 as a control signal for processing. At this time, the display screen 1605 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1605 can be one, set on the front panel of the terminal 1600; in other embodiments, the display screen 1605 can be at least two, respectively set on different surfaces of the terminal 1600 or in a folding design; in other embodiments, the display screen 1605 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1600. Even, the display screen 1605 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1605 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0256] The camera component 1606 is used to collect images or multimedia resources. Optionally, the camera component 1606 includes a front camera and a rear camera. Usually, 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 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0257] The audio circuit 1607 may include 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 may be multiple microphones, which are respectively arranged at different parts of the terminal 1600. The microphone may also be 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 may be a traditional 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 may also include a headphone jack.
[0258] The power supply 1608 is used to power various components in the terminal 1600. The power supply 1608 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 1608 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery charged through a wired line, and a wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery can also be used to support fast charging technology.
[0259] 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 .
[0260] The acceleration sensor 1610 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal 1600. For example, the acceleration sensor 1610 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 1601 can control the display screen 1605 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 1610. The acceleration sensor 1610 can also be used for collecting game or user motion data.
[0261] The gyro sensor 1611 can detect the body direction and rotation angle of the terminal 1600, and the gyro sensor 1611 can cooperate with the acceleration sensor 1610 to collect the user's 3D actions on the terminal 1600. The processor 1601 can implement the following functions based on the data collected by the gyro sensor 1611: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0262] The pressure sensor 1612 can be set on the side frame of the terminal 1600 and / or the lower layer of the display screen 1605. When the pressure sensor 1612 is set on the side frame of the terminal 1600, it can detect the user's holding signal of the terminal 1600, and the processor 1601 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 1612. When the pressure sensor 1612 is set on the lower layer of the display screen 1605, the processor 1601 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 1605. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0263] The optical sensor 1613 is used to collect the ambient light intensity. In one embodiment, the processor 1601 can control the display brightness of the display screen 1605 according to the ambient light intensity collected by the optical sensor 1613. Specifically, when the ambient light intensity is high, the display brightness of the display screen 1605 is increased; when the ambient light intensity is low, the display brightness of the display screen 1605 is reduced. In another embodiment, the processor 1601 can also dynamically adjust the shooting parameters of the camera component 1606 according to the ambient light intensity collected by the optical sensor 1613.
[0264] The proximity sensor 1614, also called a distance sensor, is usually arranged 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.
[0265] Those skilled in the art will understand that Fig.16 The structure shown in the figure does not constitute a limitation on the terminal 1600, and the terminal 1600 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0266] Fig.17It is a structural diagram of a server provided according to an embodiment of the present application. The server 1700 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1701 and one or more memories 1702, wherein the memory 1702 is used to store computer programs, and the processor 1701 is configured to execute the above computer programs to implement the interactive control methods of virtual objects provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be repeated here.
[0267] 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-mentioned implementation methods.
[0268] An embodiment of the present application also provides a computer program product, which includes a computer program, 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 in any of the above-mentioned implementation methods.
[0269] In some embodiments, the computer program product involved in the embodiments of the present application may be deployed and executed on a computer device, or on multiple computer devices located at one location, or on multiple computer devices distributed at multiple locations and interconnected by a communication network. Multiple computer devices distributed at multiple locations and interconnected by a communication network may constitute a blockchain system.
[0270] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for interactive control of a virtual object, characterized in that: The method comprises: 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 hitting the first virtual object, the controlled virtual object being a virtual object controlled by the terminal; In response to the first virtual object colliding with the second virtual object during flight, the second virtual object is displayed in the virtual scene interface as being hit and the life value of the second virtual object is adjusted.
2. The method according to claim 1, characterized in that The displaying in the virtual scene interface that the second virtual object is hit includes: determining a target movement trajectory of the second virtual object after being hit based on a flight direction of the first virtual object relative to the second virtual object; Based on the target movement trajectory, the second virtual object is displayed in the virtual scene interface moving along the target movement trajectory after the collision.
3. The method according to claim 2, characterized in that The determining, based on the flight direction of the first virtual object relative to the second virtual object, a target movement trajectory of the second virtual object after being hit, includes: The target movement trajectory is obtained by taking the position of the second virtual object when it is hit as the starting point and extending a preset distance along the flight direction.
4. The method according to claim 2, characterized in that: The step of displaying in the virtual scene interface that the second virtual object moves along the target movement trajectory after the collision comprises: Based on a second direction in which the second virtual object is hit, determining a target impact shape matching the second direction from a plurality of impact shapes, the plurality of impact shapes corresponding to a plurality of directions, the impact shape referring to a body shape of the virtual object after being hit; Based on the target collision form, the second virtual object is displayed in the virtual scene interface moving along the target movement trajectory in the target collision form.
5. The method according to claim 1, characterized in that 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 the type of the first 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; The adjusting the life value of the second virtual object includes: Based on the ability value of the controlled virtual object and the type of the second virtual object, a life value adjustment ratio of the second virtual object is determined; based on the life value adjustment ratio of the second virtual object, the life value of the second virtual object is adjusted, and the life value adjustment ratio of the second virtual object is positively correlated with the ability value of the controlled virtual object.
6. The method according to claim 1, characterized in that The method further comprises: In response to the first virtual object hitting the target part during flight, and the virtual object that hits the first virtual object meets a preset condition, the first virtual object is displayed in the virtual scene interface flying along a second flight trajectory after hitting again.
7. The method according to claim 6, characterized in that The virtual object hitting the first virtual object satisfies a preset condition, which refers to at least one of the following: The capability value of the virtual object hitting the first virtual object satisfies a preset capability value; or, The virtual props used by the virtual object that hits the first virtual object are preset props.
8. The method according to claim 6, characterized in that The method further comprises: Based on the ability value of the virtual object that hits the first virtual object and the type of the first 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 virtual object that hits the first virtual object.
9. The method according to claim 1, characterized in that: The step of displaying in the virtual scene interface that the first virtual object flies along a first flight trajectory after hitting the target includes: Based on a first direction in which the first virtual object is hit, determining a target flight form that matches the first direction from a plurality of flight forms, the plurality of flight forms corresponding to a plurality of directions, the flight form referring to a body form of the virtual object during flight; Based on the target flight form, the first virtual object is displayed in the virtual scene interface flying along the first flight trajectory in the target flight form.
10. The method according to claim 1, characterized in that The method further comprises: In response to the first virtual object being hit by a third virtual object during flight, the first virtual object being hit is displayed in the virtual scene interface, and the third virtual object is a virtual object during flight.
11. The method according to claim 1, characterized in that: 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, characterized in that 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 an extension 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, characterized in that The method further comprises: If 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, characterized in that 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 hitting the first virtual object, comprises: In response to the controlled virtual object hitting the first virtual object and the knock-off value of the first virtual object reaching the knock-off threshold, the first virtual object is displayed in the virtual scene interface flying along a first flight trajectory after being hit, and the knock-off value is adjusted after the first virtual object is hit.
15. The method according to claim 1, characterized in that The method further comprises: In response to the first virtual object being hit in a first state and the knock-off value reaching a knock-off 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 a collision state, a flight state, and a frightened state; In response to the first virtual object reaching a second state during the flight process, the flight process is stopped, the second state comprising a hit state, a dizzy state, and a state where the health value drops to a threshold.
16. A method for interactive control of a virtual object, characterized in that: The method comprises: 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 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 determining a first flight trajectory based on the first hit direction, a first speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the first flight trajectory after hitting, the controlled virtual object being a virtual object controlled by a terminal, and the first speed being a speed of the first virtual object in the first hit direction; In response to the first virtual object colliding with the second virtual object during flight, a target movement trajectory of the second virtual object after being collided is determined based on the flight direction of the first virtual object relative to the second virtual object, so that the second virtual object moves along the target movement trajectory after the collision.
17. An interactive control device for a virtual object, characterized in that: The device comprises: 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 hitting the first virtual object, wherein the controlled virtual object is a virtual object controlled by the terminal; The flight display module is further used for displaying the collision of the second virtual object in the virtual scene interface and adjusting the life value of the second virtual object in response to the collision of the first virtual object with the second virtual object during flight.
18. An interactive control device for a virtual object, characterized in that: The device comprises: 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 hit direction of the first virtual object based on 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 determining a first flight trajectory based on the first hit direction, a first speed of the first virtual object, and a virtual weight, so that the first virtual object flies along the first flight trajectory after hitting, the controlled virtual object being a virtual object controlled by a terminal, and the first speed being a speed of the first virtual object in the first hit direction; The second trajectory determination module is used to determine, in response to the first virtual object colliding with the second virtual object during flight, a target movement trajectory of the second virtual object after being hit based on the flight direction of the first virtual object relative to the second virtual object, so that the second virtual object moves along the target movement trajectory after the collision.
19. A computer device, characterized in that: The computer device includes a processor and a memory, 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 the virtual object according to any one of claims 1 to 16.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store at least one computer program, and 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, characterized in that The computer program product includes a computer program, which 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.