Virtual object control method and device, equipment, storage medium and program product
By responding to the trigger operation of the target control in the virtual scene, the virtual object is controlled to perform actions that get rid of defense. The action direction is determined by the relative position relationship, which solves the problem of incomplete or failure of virtual actions caused by user unproficient operation, and improves the execution efficiency of virtual actions and the interaction effect between the user and the virtual scene.
Patent Information
- Application Number
- CN202311560574.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-21
- Publication Date
- 2025-05-23
AI Technical Summary
In a virtual scene, the user needs to complete the virtual action through multiple keys, which leads to the incomplete or failure of the virtual action when the operation is not proficient, which affects the realization efficiency of the virtual action and the interaction effect between the user and the virtual scene.
A method for controlling a virtual object is provided. By displaying a battle interface of a virtual scene, in response to receiving a trigger operation of the target control, the first virtual object is controlled to perform a first action to get rid of the second virtual object defense, and the action direction is determined by the relative position relationship between the first virtual object and the second virtual object in the virtual scene.
The user completes the execution of virtual actions with one click through the target control, which improves the execution efficiency of virtual actions, expands the way the virtual objects affect virtual actions, and thus improves the interaction effect between the user and the virtual scene.
Smart Images

Figure CN120022600A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of virtual world technology, and in particular to a method, device, equipment, storage medium and program product for controlling a virtual object. Background Art
[0002] In an application program including a virtual scene, virtual actions are usually provided, through which target tasks can be achieved.
[0003] In the related art, virtual actions can be completed by cooperating with multiple keys to achieve target tasks in the virtual scene.
[0004] However, in the above scheme, the user needs to determine the appropriate button control method and perform the operation in a timely manner. For some users, the lack of proficiency in operation will lead to prolonged operation time, and ultimately cause the virtual action to be incomplete or fail to complete, affecting the efficiency of the virtual action and thus affecting the interaction effect between the user and the virtual scene. Summary of the invention
[0005] The present application provides a control method, device, equipment, storage medium and program product of a virtual object, and the technical solution is as follows:
[0006] According to one aspect of the present application, a method for controlling a virtual object is provided, the method comprising:
[0007] Displaying a battle interface of a virtual scene, wherein the battle interface includes a target control; the virtual scene includes a first virtual object and one or more second virtual objects;
[0008] Displaying a first scene screen in the battle interface, where the first scene screen is a screen in which at least one of the second virtual objects defends the first virtual object;
[0009] In response to receiving a trigger operation on the target control, the first virtual object is controlled to perform a first action, wherein the first action is an action to break away from the defense of the second virtual object; the action direction of the first action is determined by the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene.
[0010] According to another aspect of the present application, a control device for a virtual object is provided, the device comprising:
[0011] The interface display module is used to display a battle interface of a virtual scene, wherein the battle interface includes a target control; the virtual scene includes a first virtual object and one or more second virtual objects.
[0012] The screen display module is used to display a first scene screen in the battle interface, where the first scene screen is a screen in which at least one of the second virtual objects defends the first virtual object.
[0013] An action execution module is used to control the first virtual object to perform a first action in response to receiving a trigger operation on the target control, wherein the first action is an action to break away from the defense of the second virtual object; and the action direction of the first action is determined by the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene.
[0014] In some embodiments, the apparatus further comprises:
[0015] An action direction acquisition module is used to, in response to receiving a trigger operation on the target control, obtain the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene; query the correspondence between the relative position relationship and the action direction through the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene, and obtain the action direction of the first virtual object; based on the action direction, control the first virtual object to perform the first action.
[0016] In some embodiments, the motion direction acquisition module is used to:
[0017] In response to the relative position relationship indicating that the single second virtual object is located on the left side of the first virtual object, querying the correspondence between the relative position relationship and the motion direction through the relative position relationship to obtain that the motion direction is the right side of the first virtual object;
[0018] In response to the relative position relationship indicating that the single second virtual object is located on the right side of the first virtual object, querying the correspondence between the relative position relationship and the motion direction through the relative position relationship to obtain that the motion direction is the left side of the first virtual object;
[0019] In response to the relative position relationship indicating that the single second virtual object is located within a preset distance in front of the first virtual object, querying a correspondence between the relative position relationship and the action direction through the relative position relationship, and obtaining that the action direction is a random direction of a left side and a right side of the first virtual object;
[0020] In response to the relative position relationship indicating that the single second virtual object is located outside a preset distance in front of the first virtual object, the correspondence between the relative position relationship and the action direction is queried through the relative position relationship to obtain the action direction as the rear of the first virtual object.
[0021] In some embodiments, the motion direction acquisition module is used to:
[0022] In response to receiving a trigger operation on the target control, acquiring information on a relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene;
[0023] Inputting information about the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene into an action direction prediction model to obtain the action direction output by the action direction prediction model;
[0024] Based on the motion direction, controlling the first virtual object to perform the first motion;
[0025] Among them, the action direction prediction model is a machine learning model obtained by training the relative position relationship samples of the first virtual object and at least one of the second virtual objects in the virtual scene, and the labeled action directions corresponding to the relative position relationship samples.
[0026] In some embodiments, the apparatus further comprises:
[0027] an action mode acquisition module, configured to acquire, in response to receiving a trigger operation on the target control, a dominant attribute among the various object attributes, wherein the dominant attribute is an object attribute whose attribute value corresponding to the first virtual object is superior to the attribute value corresponding to a single second virtual object;
[0028] Acquire the action mode corresponding to the advantageous attribute and the technical feature of the first virtual object;
[0029] Based on the motion direction, the first virtual object is controlled to perform the first motion.
[0030] In some embodiments, the action mode acquisition module is used to:
[0031] In response to receiving a trigger operation on the target control, inputting the object information into an action mode prediction model to obtain the action mode output by the action mode prediction model;
[0032] Based on the action mode, controlling the first virtual object to perform the first action;
[0033] Among them, the action mode prediction model is a machine learning model trained through object information samples of the first virtual object and at least one of the second virtual objects in the virtual scene, and the labeled action modes corresponding to the object information samples.
[0034] According to another aspect of the present application, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the control method of the virtual object as described above.
[0035] According to another aspect of the present application, a computer-readable storage medium is provided, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the control method of the virtual object as described above.
[0036] According to another aspect of the present application, a computer program product is provided, which includes computer instructions stored in a computer-readable storage medium, and a processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of the virtual object described above.
[0037] The beneficial effects of the technical solution provided by this application include at least:
[0038] A battle interface of a virtual scene including a first virtual object and one or more second virtual objects is displayed, wherein the battle interface includes a target control; when at least one second virtual object defends the first virtual object, in response to receiving a trigger operation on the target control, the first virtual object is controlled to perform a first action of getting rid of the defense of the second virtual object, wherein the action direction of the first action is determined by the relative position relationship between the first virtual object and the at least one second virtual object in the virtual scene; in the above scheme, the user performs a trigger operation on the target control, that is, the first virtual object can be controlled to perform an action of getting rid of the defense of the second virtual object with one click, and the direction of the action is determined by the relative position relationship between the first virtual object and the second virtual object in the virtual scene, without the need for the user to control the direction of the action himself, thereby improving the execution efficiency of the virtual action, expanding the way in which the virtual object affects the virtual action, and further expanding the way in which the user controls the virtual object to interact with the virtual scene, and improving the interaction effect between the user and the virtual scene. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] 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.
[0040] Figure 1 is a structural block diagram of a computer system provided by an exemplary embodiment of the present application;
[0041] Figure 2 is an interface diagram of a virtual scene provided by an exemplary embodiment of the present application;
[0042] Figure 3 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
[0043] Figure 4 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
[0044] Figure 5 is a schematic diagram of the position of a virtual object provided by an exemplary embodiment of the present application;
[0045] Figure 6 is a schematic diagram of the position of a virtual object provided by an exemplary embodiment of the present application;
[0046] Figure 7 is a schematic diagram of the position of a virtual object provided by an exemplary embodiment of the present application;
[0047] Figure 8 is a schematic diagram of the position of a virtual object provided by an exemplary embodiment of the present application;
[0048] Fig. 9 is a flow chart of a method for controlling a virtual object provided by an exemplary embodiment of the present application;
[0049] Fig.10 is an interface diagram of a virtual scene involved in an exemplary embodiment of the present application;
[0050] Fig.11 is a flowchart of an exemplary embodiment of the present application involving the implementation of manipulating a virtual object;
[0051] Fig.12 is a block diagram of a control device for a virtual object provided by an exemplary embodiment of the present application;
[0052] Fig.13 It is a structural block diagram of a computer device provided by an exemplary embodiment of the present application.
[0053] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application. DETAILED DESCRIPTION
[0054] 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.
[0055] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0056] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. The singular forms of "a", "said" and "the" used in this disclosure and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0057] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data 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 the relevant countries and regions. For example, the object behaviors such as attack operations involved in this application are all obtained with full authorization.
[0058] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0059] For ease of understanding, several terms involved in this application are explained below.
[0060] 1) Virtual scene
[0061] A virtual scene is a virtual scene displayed (or provided) when an application is running on a terminal. The virtual scene can be a simulated environment scene of the real world, a semi-simulated and semi-fictitious three-dimensional environment scene, or a purely fictitious three-dimensional environment scene. The virtual scene can be any one of a two-dimensional virtual scene, a 2.5-dimensional virtual scene, and a three-dimensional virtual scene. The following embodiments are illustrated by taking the virtual scene as a three-dimensional virtual scene, but are not limited to this. Optionally, the virtual scene can also be used for a virtual scene battle / competition between at least two virtual characters. Optionally, the virtual scene can also be used for a battle / competition between at least two virtual characters using virtual props. Optionally, the virtual scene can also be used for a battle between at least two virtual characters using virtual props within a target area.
[0062] The virtual scene is usually generated by an application in a computer device such as a terminal and displayed based on the hardware in the terminal (such as a screen). The terminal can be a mobile terminal such as a smart phone, tablet computer or e-book reader; or, the terminal can also be a personal computer device such as a laptop or a fixed computer.
[0063] 2) Virtual Objects
[0064] A virtual object refers to an object that can be moved in a virtual scene. The movable object can be at least one of a virtual person, a virtual character, a virtual animal, and a virtual vehicle. Optionally, when the virtual scene is a three-dimensional virtual scene, the virtual object is a three-dimensional stereoscopic model created based on animation skeleton technology. Each virtual object has its own shape, volume, and orientation in the three-dimensional virtual scene, and occupies a part of the space in the three-dimensional virtual scene.
[0065] 3) Virtual Action
[0066] Virtual actions refer to the actions that virtual objects can perform in a virtual environment, including walking, running, jumping, defending, jump shots, passing, shooting, and other actions.
[0067] 4) Sports games
[0068] Sports games refer to games in which users can play sports from a first-person perspective or a third-person perspective. The screen of the virtual environment in the game is a screen of observing the virtual environment from the perspective of the first virtual object or the third-person perspective. In the game, at least two virtual objects can compete in the virtual environment. For example, a virtual object can score a goal by avoiding the defense of other virtual objects and shooting / shooting. Optionally, the battle starts at the moment when the first client joins the battle and ends at the moment when the last client exits the battle. Each client can control one or more virtual objects in the virtual environment. The embodiment of the present application does not limit the mode of competitive confrontation.
[0069] 5) Mobile Games
[0070] Short for mobile game.
[0071] 6) Mental Model
[0072] The user's fixed process and procedure for thinking about problems. This "model" is influenced by various factors such as their own culture and quality.
[0073] Figure 1 The structure block diagram of a computer system provided by an exemplary embodiment of the present application is shown. The computer system 100 includes: a first terminal 110, a server 120, and a second terminal 130.
[0074] The first terminal 110 is installed and runs a client 111 that supports virtual scenes, and the client 111 can be a multiplayer online battle program. When the first terminal runs the client 111, the user interface of the client 111 is displayed on the screen of the first terminal 110. The client 111 can be any one of a simulation program, a virtual reality (VR) application, an augmented reality (AR) program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person sports game, and a third-person sports game. In this embodiment, the client 111 is an example of a third-person sports game. The first terminal 110 is a terminal used by the first user 112. The first user 112 uses the first terminal 110 to control the first virtual object located in the virtual scene to perform activities. The first virtual object can be called a virtual object of the first user 112. The activities of the first virtual object include, but are not limited to: at least one of moving, jumping, releasing skills, using props, adjusting body posture, walking, running, defending, stealing, passing, jump shots, and shooting. Illustratively, the first virtual object is a first virtual object, such as a simulated human character or an animated human character.
[0075] The second terminal 130 is installed and runs a client 131 that supports virtual scenes. The client 131 can be a multiplayer online battle program. When the second terminal 130 runs the client 131, the user interface of the client 131 is displayed on the screen of the second terminal 130. The client can be any one of a simulation program, a VR application, an AR program, a three-dimensional map program, a virtual reality game, an augmented reality game, a first-person sports game, and a third-person sports game. In this embodiment, the client is a third-person sports game. The second terminal 130 is a terminal used by the second user 132. The second user 132 uses the second terminal 130 to control the second virtual object located in the virtual scene to carry out activities. The second virtual object can be called a virtual object of the second user 132. Schematically, the second virtual object is a second virtual object, such as a simulation character or an animation character.
[0076] Optionally, the first virtual object and the second virtual object are in the same virtual scene. Optionally, the first virtual object and the second virtual object may belong to different camps, different teams, different organizations, or have a hostile relationship. Optionally, the first virtual object and the second virtual object may belong to the same camp, the same team, the same organization, or have a friend relationship or have temporary communication permissions.
[0077] Optionally, the client installed on the first terminal 110 and the second terminal 130 is the same, or the client installed on the two terminals is the same type of client on different operating system platforms (Android or IOS). The first terminal 110 may refer to one of a plurality of terminals, and the second terminal 130 may refer to another of a plurality of terminals. This embodiment is only illustrated by taking the first terminal 110 and the second terminal 130 as examples. The device types of the first terminal 110 and the second terminal 130 are the same or different, and the device type includes at least one of: a smart phone, a tablet computer, an e-book reader, an MP3 player, an MP4 player, a laptop portable computer, and a desktop computer.
[0078] Figure 1 Only two terminals are shown, but in different embodiments, there are multiple other terminals 140 that can access the server 120. Optionally, there are one or more terminals 140 corresponding to the developer, and a development and editing platform for the client supporting the virtual scene is installed on the terminal 140. The developer can edit and update the client on the terminal 140, and transmit the updated client installation package to the server 120 via a wired or wireless network. The first terminal 110 and the second terminal 130 can download the client installation package from the server 120 to update the client.
[0079] The first terminal 110 , the second terminal 130 , and the other terminals 140 are connected to the server 120 via a wireless network or a wired network.
[0080] The server 120 includes at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. The server 120 is used to provide background services for clients that support three-dimensional virtual scenes. Optionally, the server 120 undertakes the main computing work, and the terminal undertakes the secondary computing work; or, the server 120 undertakes the secondary computing work, and the terminal undertakes the main computing work; or, the server 120 and the terminal adopt a distributed computing architecture for collaborative computing.
[0081] In an illustrative example, the server 120 includes a processor 122, a user account database 123, a battle service module 124, and a user-oriented input / output interface (I / O interface) 125. The processor 122 is used to load instructions stored in the server 120 and process data in the user account database 123 and the battle service module 124; the user account database 123 is used to store data of user accounts used by the first terminal 110, the second terminal 130, and other terminals 140, such as the user account's avatar, the user account's nickname, the user account's combat power index, and the service area where the user account is located; the battle service module 124 is used to provide multiple battle rooms for users to fight, such as 1V1 battle, 3V3 battle, 5V5 battle, etc.; the user-oriented I / O interface 125 is used to establish communication and exchange data with the first terminal 110 and / or the second terminal 130 through a wireless network or a wired network.
[0082] The method provided in the present application can be applied to, but is not limited to, at least one of the following scenarios: virtual reality applications, three-dimensional map programs, simulation programs, first-person sports games, third-person sports games, multiplayer online tactical competitive games, etc. The following embodiments are illustrated by using applications in games.
[0083] Figure 2 An interface diagram of a virtual scene provided by an exemplary embodiment of the present application is provided;
[0084] Exemplarily, in the battle interface 210 , a first virtual object 212 and a second virtual object 214 are displayed, wherein the second virtual object 214 and the first virtual object 212 may be in a hostile relationship or a teammate relationship.
[0085] For example, in the first interface 210 , the first virtual object 212 may hold a virtual ball and break through the second virtual object 214 . Correspondingly, the second virtual object 214 may also defend the first virtual object 212 .
[0086] Figure 3 A flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application is shown. The method may be executed by a computer device. The computer device may be Figure 1 The first terminal 110 and the second terminal 130 in the system shown in the figure, or the computer device can also be Figure 1 The server 120 in the system shown, or the computer device may also include the above Figure 1 In the system shown, a first terminal 110, a server 120 and a second terminal 130; the method includes:
[0087] Step 310: Displaying a battle interface of a virtual scene, wherein the battle interface includes a target control; the virtual scene includes a first virtual object and one or more second virtual objects.
[0088] The computer device can display a battle interface in a virtual scene interface, wherein the battle interface includes a target control, and a first virtual object and one or more second virtual objects are displayed in the virtual scene.
[0089] Exemplarily, the battle interface is an interface for the first virtual object and the second virtual object to battle, and the battle interface includes a target control, wherein the target control is a single control.
[0090] Exemplarily, the target control is used to trigger the first virtual object to perform a corresponding action, such as a breakthrough, a shot, a shot, etc.
[0091] The target control may be displayed when the first virtual object enters the screen and until the battle screen ends, or it may be displayed when the second virtual object approaches the first virtual object and is within a certain range of the first virtual object; the display form may be at least one of graphics, patterns, and designs, or it may be presented in at least one of text, voice, and pictures.
[0092] In some embodiments, the target control may also be displayed on the battle interface when the first virtual object and the second virtual object appear simultaneously in the virtual scene.
[0093] In other embodiments, when the second virtual object in the virtual scene is within a certain range of the first virtual object, a target control may be displayed on the battle interface. For example, when the second virtual object appears within the distance covered by a circle with a radius of 60 cm and the first virtual object as the center, a target control appears on the battle interface.
[0094] In other embodiments, when the first virtual object is the offensive party, a target control may be displayed on the battle interface. For example, when the first virtual object or other virtual objects on the same team as the first virtual object are attacking with the ball, a target control may be displayed on the battle interface.
[0095] Exemplarily, the first virtual object is a virtual object controlled by a user account currently logged into the terminal, and the virtual scene is used to provide virtual competition between different virtual objects.
[0096] Exemplarily, the above virtual scene includes a first virtual object and one or more second virtual objects. At this time, the computer device can display the perspective of the first virtual object or any other virtual object, for example, it can display the third-person perspective of the first virtual object.
[0097] Optionally, the virtual scene may further include one or more third virtual objects, where the third virtual object may be a teammate / object in the same camp of the first virtual object, that is, the first virtual object and the third virtual object may be in a cooperative relationship.
[0098] Exemplarily, the first virtual object and the second virtual object may belong to different teams / camps; the team / camp to which the second virtual object belongs and the team / camp to which the first virtual object belongs may be in an adversarial relationship, which is not limited in the present application.
[0099] In one implementation, the second virtual object may defend the first virtual object, and correspondingly, the first virtual object may break through the defense of the second virtual object.
[0100] The user corresponding to the first virtual object can control the first virtual object to perform a virtual action to break through the defense of the second virtual object (ie, get rid of the defense).
[0101] Optionally, the user corresponding to the first virtual object can also control the first virtual object to perform other actions besides breaking through, such as passing, shooting, and shooting.
[0102] Exemplarily, the user corresponding to the first virtual object can control the first virtual object to perform a virtual action in a manner including but not limited to at least one of the following: clicking, sliding, and rotating; for example, clicking a touch screen or a button, touching and sliding on the touch screen, rotating a terminal or a handle, etc.
[0103] In a possible implementation, the virtual scene is a virtual scene based on basketball or football.
[0104] In an embodiment of the present application, a user controls a first virtual object to compete with a second virtual object in a virtual scene based on basketball or football, thereby enhancing the authenticity of sports games, and controls the first virtual object through a target control to complete virtual actions, thereby ensuring the efficiency of interaction between the user and the virtual scene.
[0105] Step 320: Displaying a first scene screen in the battle interface, where the first scene screen is a screen in which at least one second virtual object defends the first virtual object.
[0106] In the embodiment of the present application, when the first virtual object is in an offensive state, at least one second virtual object in the virtual scene may defend the first virtual object.
[0107] Exemplarily, the first scene screen may be a screen in which a second virtual object performs one-on-one defense on the first virtual object, or the first scene screen may be a screen in which multiple second virtual objects perform collaborative defense on the first virtual object. When multiple second virtual objects perform collaborative defense on the first virtual object, the multiple second virtual objects may include a main defense object and one or more collaborative defense objects.
[0108] Step 330: In response to receiving a trigger operation on a target control, controlling the first virtual object to perform a first action, the first action being an action to escape from the defense of a second virtual object; the action direction of the first action is determined by the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene.
[0109] That is, when the user of the first virtual object performs a trigger operation (such as a click operation, a double-click operation, a long press operation, etc.) on the target control, the computer device controls the first virtual object to perform a first action to break free from the defense of the second virtual object.
[0110] Exemplarily, the first action may be a breakthrough action.
[0111] To summarize, in the embodiments of the present application, the user performs a trigger operation on the target control, and through the target control, controls the first virtual object to perform a first action to get rid of the defense of the second virtual object, and the direction of the action is determined by the relative position relationship between the first virtual object and the second virtual object in the virtual scene. The user does not need to perform other operations and it can be completed with one click, which improves the execution efficiency of virtual actions, expands the ways in which virtual objects affect virtual actions, and further expands the ways in which users control virtual objects to interact with virtual scenes, thereby improving the interaction effect between users and virtual scenes.
[0112] Based on the above Figure 3In the embodiment shown, in a possible implementation manner, the action mode of the first action is determined by object information, and the object information includes at least one of the following information:
[0113] information on various object attributes of the first virtual object and various object attributes of at least one second virtual object;
[0114] information on technical characteristics of the first virtual object;
[0115] and information about the relative positional relationship between the first virtual object and at least one second virtual object in the virtual scene.
[0116] Exemplarily, the above-mentioned object attributes include at least one of height, weight, and speed.
[0117] In this embodiment, the object attribute may be a built-in attribute of the virtual object controlled by the user, or may be an attribute obtained by setting the attribute parameters by the developer during development.
[0118] Exemplarily, the above technical characteristics include: at least one of speed, shooting accuracy, and defensive ability.
[0119] In an embodiment of the present application, the computer device can automatically determine the action mode of the first action through at least one of the object properties, technical characteristics and relative position relationship of the virtual object, without the user manually selecting a specific way to get rid of the defense, thereby expanding the method of determining the virtual action mode, and further expanding the method of users controlling virtual objects to interact with virtual scenes, simplifying the user's operating steps, and improving the interaction effect between the user and the virtual scene.
[0120] In a possible implementation, when the at least one second virtual object defending the first virtual object is a single second virtual object,
[0121] In response to receiving a trigger operation on a target control, the computer device controls the first virtual object to perform a first action, including:
[0122] In response to receiving a trigger operation on a target control, the computer device obtains a dominant attribute among various object attributes, where the dominant attribute is an object attribute whose attribute value corresponding to the first virtual object is superior to the attribute value corresponding to a single second virtual object;
[0123] Acquire an action mode corresponding to the advantageous attribute and the technical feature of the first virtual object;
[0124] Based on the motion direction, the first virtual object is controlled to perform a first motion.
[0125] Exemplarily, the advantageous attribute may be at least one of strength, height, defense, speed, and other attributes involved in other sports.
[0126] Exemplarily, the technical feature of the first virtual object may be at least one of fast speed, high shooting accuracy, and other exclusive skills.
[0127] Exemplarily, the action mode may be at least one of forced breakthrough, fake dribble to create space, step back, jump step, and other action modes.
[0128] In some embodiments, each advantageous attribute may correspond to one or more action modes of the first action. When the computer device determines an advantageous attribute of the first virtual object, it may query one or more action modes corresponding to the advantageous attribute and use one of them as the action mode of the first action.
[0129] In some embodiments, when a computer device obtains multiple advantageous attributes, the computer device can compare the attribute values of the multiple advantageous attributes, and select the action mode corresponding to the advantageous attribute with the largest attribute value as the action mode of the first action. The size of the attribute value corresponds to the strength of the attribute capability. The larger the attribute value, the stronger the attribute capability corresponding to the attribute value.
[0130] In some embodiments, when a computer device obtains multiple advantageous attributes, it can also take action methods corresponding to the multiple advantageous attributes, sort the execution order of the action methods according to at least one of the difficulty and execution time of these action methods, and determine the action method of the first action according to the sorting result.
[0131] For example, when the height of the first virtual object is higher than that of the second virtual object, the back-to-back squeeze breakthrough corresponding to the height advantage attribute is adopted; when the height of the first virtual object is higher than that of the second virtual object, and the speed of the first virtual object is faster than that of the second virtual object, the attribute values corresponding to the back-to-back squeeze breakthrough corresponding to the height advantage attribute and the cross-over dribbling method corresponding to the speed advantage attribute are compared. Assuming that the attribute value of the height advantage attribute is "3" and the attribute value of the speed advantage attribute is "6", the cross-over dribbling method is adopted.
[0132] In some embodiments, assuming that the computer device does not obtain the advantageous attribute, but obtains the action mode corresponding to the technical feature of the first virtual object, the computer device first identifies the technical feature of the player, and then selects the action mode corresponding to the technical feature as the action mode of the first action based on the technical feature.
[0133] For example, the first virtual object is player 1, whose technical feature is a backward step, and the corresponding action mode is a three-point shot after a crossover dribble in front of the body followed by two backward steps. At this time, the computer device can, according to the technical feature of player 1, adopt the crossover dribble in front of the body in this set of technical combos, or the crossover dribble in front of the body followed by two backward steps, as the action mode of the first action.
[0134] In some embodiments, when the computer device does not obtain the advantage attribute and the first virtual object has no corresponding technical feature, a general breakthrough method can be adopted. The general breakthrough method can be at least one of multiple action modes that each virtual object comes with, and each virtual object can initiate it. For example, the computer device can randomly select a method from the general breakthrough methods as the action mode of the first action.
[0135] For example, the above general breakthrough methods can include: dribble penetration offense, feint, fake attack and change of direction, spin breakthrough, and strong attack under the basket and other action modes.
[0136] In some embodiments, when the computer device obtains the advantage attribute and the technical feature corresponding to the first virtual object, it can compare the action modes corresponding to the advantage attribute and the technical feature respectively. For example, each breakthrough action mode has a default execution time, action difficulty, or breakthrough success rate. The computer device can compare the execution time, action difficulty, or breakthrough success rate of the action modes corresponding to the advantage attribute and the technical feature respectively, and select an action mode with a shorter execution time, a higher / lower action difficulty, or a higher breakthrough success rate as the action mode of the first action. The values of the above execution time, action difficulty, or breakthrough success rate can be set by developers during development.
[0137] In some embodiments, when the computer device determines the action mode of the first action by combining the advantage attribute and the technical feature, it can also query the pre-set corresponding relationship between the combination of the advantage attribute and the technical feature and the action mode, and determine the action mode corresponding to the combination of the advantage attribute and the technical feature as the action mode of the first action.
[0138] In summary, in the embodiments of the present application, after receiving the trigger operation on the target control, the computer device obtains the advantage attribute in each object attribute and the technical feature of the first virtual object, and according to the advantage attribute and the technical feature, judges and determines the action mode of the first action to be executed by the first virtual object, expands the method for determining the action mode, and combines the actual common sense in the multiple processes of determining the action mode, which is closer to reality, enhances the authenticity of the operation effect, and improves the interactivity between the user and the virtual object.
[0139] In a possible implementation, in response to receiving a trigger operation on a target control, inputting object information into an action mode prediction model to obtain an action mode output by the action mode prediction model;
[0140] Based on the action mode, controlling the first virtual object to perform a first action;
[0141] Among them, the action mode prediction model is a machine learning model trained through object information samples of the first virtual object and at least one second virtual object in the virtual scene, and the labeled action modes corresponding to the object information samples.
[0142] For example, in response to a computer device receiving a trigger operation on a target control, object information can be extracted and input into an action mode prediction model. The information can be at least one of the advantageous attributes, technical features, and other information of the virtual object. After the computer device inputs the information into a trained action mode prediction model, the action mode prediction model predicts the input information and outputs a discrete label or probability distribution, or at least one other form of representation, indicating the probability of the first action corresponding to various action modes after the trigger operation. The computer device can select the action mode with the highest probability as the action mode of the first action.
[0143] The above-mentioned action mode prediction model is a machine learning model, such as a neural network model.
[0144] For example, the above-mentioned trained action prediction model is a machine learning model obtained by training object information samples of the first virtual object and at least one second virtual object in the virtual scene, and the annotated action modes corresponding to the object information samples. For example, the above-mentioned model training process can be as follows:
[0145] First, object information samples including a first virtual object and at least one second virtual object in a virtual scene are collected by computer or manually, and these samples include various attributes of the virtual objects or technical features corresponding to the first virtual object, as well as their corresponding labeled action modes; then the collected data samples are preprocessed, including data cleaning, standardization, feature engineering and other steps, and the data are divided into a training set and a test set; then the data samples (object information samples) in the training set are input into the model to predict the action mode, and a loss function is calculated according to the difference between the predicted result and the labeled action mode, and the parameters of the action mode prediction model are updated according to the loss function until the parameters of the action mode prediction model converge, for example, the accuracy of the action mode prediction model is verified by the verification set to reach an accuracy threshold, and the training of the action mode prediction model is completed.
[0146] In an embodiment of the present application, by inputting object information into an action mode prediction model, the action mode corresponding to the first action is obtained. Based on the machine learning model, the accuracy of the action mode judgment is greatly improved, and the execution efficiency of the first action is ensured.
[0147] Figure 4 A flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. Figure 3 In the illustrated embodiment, step 330 may be implemented as steps 330a, 330b, and 330c:
[0148] Step 330a: In response to receiving a trigger operation on a target control, obtaining a relative position relationship between a first virtual object and at least one second virtual object in a virtual scene.
[0149] In an embodiment of the present application, when the computer device detects that the user corresponding to the first virtual object triggers the above-mentioned target control, the position of the first virtual object and at least one second virtual object in the virtual scene can be obtained, and the relative position relationship between the first virtual object and the at least one second virtual object can be determined based on the obtained position of the first virtual object and the at least one second virtual object in the virtual scene.
[0150] In some embodiments, the relative position relationship between the first virtual object and the second virtual object may include the distance between the first virtual object and the second virtual object, and the relative direction between the first virtual object and the second virtual object. For example, the relative direction may be the angle of the second virtual object relative to the position of the first virtual object. For example, the direction directly facing the first virtual object is 0°. If the second virtual object is located directly in front of the first virtual object, the angle of the second virtual object relative to the position of the first virtual object is 0°. If the second virtual object is located directly behind the first virtual object, the angle of the second virtual object relative to the position of the first virtual object is 180°.
[0151] Alternatively, the above-mentioned relative direction may also include the rough direction in which the second virtual object is located at the first virtual object, for example, the second virtual object is located at the front side, back side, left side, right side, left front side, left back side, right front side, or right back side of the first virtual object.
[0152] Step 330b: query the correspondence between the relative position relationship and the motion direction through the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene, and obtain the motion direction of the first virtual object.
[0153] In a possible implementation, the correspondence between the relative position relationship and the action direction is designed by developers during development.
[0154] The above-mentioned action direction can represent the direction of movement of the first virtual object when performing the first action, and the action direction includes but is not limited to the front, back, left, right, left front, left back, right front, right back, etc.
[0155] In a possible implementation, when the at least one second virtual object defending the first virtual object is a single second virtual object, querying a correspondence between a relative position relationship and a motion direction through a relative position relationship between the first virtual object and the at least one second virtual object in a virtual scene to obtain the motion direction of the first virtual object includes:
[0156] In response to the relative position relationship indicating that the single second virtual object is located on the left side of the first virtual object, querying the correspondence between the relative position relationship and the action direction through the relative position relationship to obtain the action direction is the right side of the first virtual object;
[0157] For example, please refer to Figure 5 , which shows a schematic diagram of the positions of virtual objects provided by an exemplary embodiment of the present application. In the battle interface 510, the second virtual object 214 is located on the left side of the first virtual object 212. When the relative position relationship is on the left side, its corresponding action direction is on the right side. The first virtual object 212 moves to the right when performing the first action.
[0158] In response to the relative position relationship indicating that the single second virtual object is located on the right side of the first virtual object, querying the correspondence between the relative position relationship and the action direction through the relative position relationship to obtain the action direction as the left side of the first virtual object;
[0159] For example, please refer to Figure 6 , which shows a schematic diagram of the positions of virtual objects provided by an exemplary embodiment of the present application. In the battle interface 610, the second virtual object 214 is located on the right side of the first virtual object 212. When the relative position relationship is on the right side, its corresponding action direction is on the left side. When the first virtual object 212 performs the first action, it moves to the left side.
[0160] In response to the relative position relationship indicating that the single second virtual object is located within a preset distance in front of the first virtual object, querying the correspondence between the relative position relationship and the action direction through the relative position relationship, and obtaining the action direction as a random direction of the left side and the right side of the first virtual object;
[0161] In response to the relative position relationship indicating that the single second virtual object is located outside the preset distance of the front side of the first virtual object, the corresponding relationship between the relative position relationship and the action direction is queried through the relative position relationship to obtain the action direction as the back side of the first virtual object.
[0162] For example, the preset distance represents the straight-line distance from the first virtual object to the second virtual object, and the value of the preset distance is 50.
[0163] For example, please refer to Figure 7 , which shows a schematic diagram of the positions of virtual objects provided by an exemplary embodiment of the present application. In the battle interface 710, the second virtual object 214 is located in front of the first virtual object 212. The straight-line distance from the second virtual object 214 to the first virtual object 212 is 40 centimeters, which is less than the preset distance, indicating that the second virtual object 214 is relatively close to the first virtual object 212. At this time, the first virtual object 212 can choose to perform the first action in either the left or right direction.
[0164] For example, please refer to Figure 8 , which shows a schematic diagram of the positions of virtual objects provided by an exemplary embodiment of the present application. In the battle interface 810, the second virtual object 214 is located in front of the first virtual object 212. The straight-line distance from the second virtual object 214 to the first virtual object 212 is 60 cm, which is greater than the preset distance, indicating that the second virtual object 214 is far away from the first virtual object 212. At this time, the first virtual object 212 can choose to move backward to perform the first action.
[0165] In an embodiment of the present application, when the first virtual object is defended as a single second virtual object, the correspondence between the relative position relationship and the action direction is queried through the relative position relationship between the first virtual object and the second virtual object in the virtual scene, and the action direction of the first virtual object is obtained, so that less time is spent on determining the action direction, the speed of determining the first action is accelerated, and the execution efficiency of the first action is improved.
[0166] In another possible implementation, when the at least one second virtual object defending the first virtual object is a plurality of second virtual objects, querying a correspondence between a relative position relationship and a motion direction through a relative position relationship between the first virtual object and the plurality of second virtual objects in a virtual scene to obtain the motion direction of the first virtual object includes:
[0167] In response to the relative position relationship indicating that the plurality of second virtual objects are located on the left side of the first virtual object, querying the correspondence between the relative position relationship and the motion direction through the relative position relationship to obtain the motion direction as the right side of the first virtual object;
[0168] In response to the relative position relationship indicating that the plurality of second virtual objects are located on the right side of the first virtual object, querying the correspondence between the relative position relationship and the motion direction through the relative position relationship to obtain the motion direction as the left side of the first virtual object;
[0169] In response to the relative position relationship indicating that the plurality of second virtual objects are located within a preset distance in front of the first virtual object, querying a correspondence between the relative position relationship and the action direction through the relative position relationship, and obtaining the action direction as a random direction of a left side and a right side of the first virtual object;
[0170] In response to the relative position relationship indicating that the plurality of second virtual objects are located outside a preset distance in front of the first virtual object, a correspondence between the relative position relationship and the action direction is queried through the relative position relationship to obtain the action direction as the rear of the first virtual object.
[0171] Step 330c: Based on the motion direction, control the first virtual object to perform a first motion.
[0172] To summarize, in an embodiment of the present application, in response to receiving a trigger operation on a target control, the computer device obtains the relative position relationship between a first virtual object and at least one second virtual object in a virtual scene, and can directly obtain the corresponding action direction based on the relative position relationship. Based on the action direction, the first virtual object is controlled to directly execute the first action, and the first action is efficiently completed, thereby expanding the way in which users control virtual objects to interact with virtual scenes and improving the interaction effect between users and virtual scenes.
[0173] Fig. 9 A flowchart of a method for controlling a virtual object provided by an exemplary embodiment of the present application is shown. The method can be executed by a computer device. Figure 3 In the illustrated embodiment, step 330 may also be implemented as steps 330a, 330d, and 330c:
[0174] Step 330a: In response to receiving a trigger operation on a target control, obtaining information on a relative position relationship between a first virtual object and at least one second virtual object in a virtual scene.
[0175] Step 330d: input information about the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene into the motion direction prediction model to obtain the motion direction output by the motion direction prediction model.
[0176] Exemplarily, in response to the computer device receiving a trigger operation on a target control, information on the relative positional relationship between a first virtual object and at least one second virtual object in a virtual scene can be extracted and input into a motion direction prediction model. The motion direction prediction model predicts the input information and outputs a discrete label or a probability distribution, or at least one other form of representation, representing the probability of each motion direction corresponding to the first action after the trigger operation. The computer device can select an motion direction with the highest probability as the motion direction of the first action.
[0177] The above motion direction prediction model is a machine learning model, such as a neural network.
[0178] Exemplarily, the above-mentioned action direction prediction model is a machine learning model obtained by training the relative position relationship samples of the first virtual object and at least one second virtual object in the virtual scene, and the annotated action directions corresponding to the relative position relationship samples. For example, the above-mentioned model training process can be as follows:
[0179] First, information samples including the relative position relationship between a first virtual object and at least one second virtual object in a virtual scene, and their corresponding annotated action directions are collected by computer or manually; then, the collected data samples are preprocessed, including data cleaning, standardization, feature engineering and other steps, and the data are divided into a training set and a test set; then, the data samples in the prepared training set are input into the model to predict the action direction, and a loss function is calculated according to the difference between the prediction result and the corresponding annotated action direction, and the parameters of the action direction prediction model are updated according to the loss function until the parameters of the action direction prediction model converge, for example, the accuracy of the action direction prediction model is verified by the verification set to reach an accuracy threshold, and the training of the action direction prediction model is completed.
[0180] In a possible implementation, when the at least one second virtual object defending the first virtual object includes a plurality of second virtual objects,
[0181] The information about the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene includes direction information and distance information of the plurality of second virtual objects relative to the first virtual object.
[0182] The direction information may include the relative direction between the first virtual object and the second virtual object, and the distance information may include the distance between the first virtual object and the second virtual object.
[0183] In some embodiments, when multiple second virtual objects are defending the first virtual object, the computer device can obtain the direction information with the highest frequency of occurrence among the direction information of the first virtual object and the multiple second virtual objects, and obtain the average value of the distance information between the first virtual object and the multiple second virtual objects.
[0184] Exemplarily, when three second virtual objects are defending the first virtual object, the relative position relationship information includes direction information and distance information of the three second virtual objects relative to the first virtual object. For example, the direction information of the three second virtual objects relative to the first virtual object is left, left, and right, and the distance information of the three second virtual objects relative to the first virtual object is 30 centimeters, 34 centimeters, and 40 centimeters. At this time, the direction information obtained by the computer device is left, and the distance information is 35 centimeters.
[0185] Alternatively, the computer device may also obtain the center position of the plurality of second virtual objects, and obtain direction information and distance information between the center position and the position of the first virtual object as the orientation information and distance information of the plurality of second virtual objects as a whole relative to the first virtual object.
[0186] In an embodiment of the present application, when at least one second virtual object defending the first virtual object includes multiple second virtual objects, the predicted action direction is determined based on the direction information and distance information of the multiple second virtual objects. The action direction is determined by information of different dimensions, thereby ensuring the accuracy of the reverse judgment of the action, thereby improving the execution efficiency of the first action.
[0187] Step 330c: Based on the motion direction, control the first virtual object to perform a first motion.
[0188] To summarize, in an embodiment of the present application, in response to receiving a trigger operation on a target control, the computer device obtains information on the relative positional relationship between a first virtual object and at least one second virtual object in a virtual scene, and obtains action direction information corresponding to the first action by inputting the object information into an action direction prediction model. Based on the machine learning model, the accuracy of action direction judgment is greatly improved, thereby ensuring the execution efficiency of the first action.
[0189] For example, the above virtual scene is a virtual scene based on basketball, and this solution is applied to the scene. Fig.10 , which shows an interface diagram of a virtual scene involved in an exemplary embodiment of the present application.
[0190] In the embodiment of the present application, in the battle interface 101, the first virtual object corresponds to the ball-holding player 212 in this embodiment, and the second virtual object corresponds to the defensive player 214 in this embodiment.
[0191] After the user holds down the breakthrough button, the computer device will start to calculate which method will be more efficient to break through the opponent. In this embodiment, several situations will affect the breakthrough selection:
[0192] First: based on their own characteristics and combos, that is, the characteristics and combos of the player with the ball. Each player has different technical characteristics and combos. For example, the combo of player 1 is a change of direction in front of the body followed by a double step back and a three-point shot. The offensive efficiency is very high. Player 2 will be more agile. The combo is a fake dribble to create space and then a direct layup or mid-range shot. Each player's speed, strength, shooting preference and accuracy will be different. Then the players' own characteristics use their predetermined technical combos.
[0193] Of course, there are also some common breakthrough action designs that every player can initiate, such as:
[0194] 1. Break through to the left side, hold the ball and launch a breakthrough attack to the left side, which is more suitable for players with good strength and speed.
[0195] 2. Breaking through to the right and feinting are more suitable for players with good strength and speed.
[0196] 3. Feint and change direction, feint to the left or right, make decisions based on the ball holder or characteristics, suitable for fast and tall players.
[0197] 4. Breakthrough techniques such as turning, attacking from the left or right side, and attacking the other side by turning around, suitable for fast speed.
[0198] 5. Create space, suitable for players with accurate shooting and height advantages.
[0199] 6. Attack the basket forcefully, suitable for players with good strength.
[0200] These skills are also possessed by other players, and different players have the same general skills.
[0201] Second: According to the position, there are generally four types of positions for defensive players: front, back, left, and right. The method of determining these four positions is: compare the defensive players with the straight line from the player with the ball to the basket. If most of the defensive players are on the left side of this straight line, then they will be positioned to the left. If most of the defensive players are on the right side of the straight line, then they will be positioned to the right. In this way, you can choose a breakthrough route with a higher success rate. If the defensive player is within 60cm of the offensive player, he will be positioned in the front. If the defensive player is outside 60cm, he will be positioned in the back.
[0202] If the defensive player is in front, choose the fake-dance + one-step pass method when choosing a breakthrough method, because the defensive player is too close to the offensive player and it is difficult to keep up with the speed, so it is easier to start a breakthrough quickly. If the defensive player is behind, you can choose to step back or directly open up space. If it is on the left, you can break through more in the direction of the larger space on the right. If it is on the right, you can break through more in the direction of the larger space on the left.
[0203] Third: Based on the opponent's weaknesses and characteristics, that is, the characteristics and combos of the defensive players, mainly based on the following points:
[0204] 1. Height. Tall players move relatively slowly, so quick breakthroughs from the left or right are better choices.
[0205] 2. Strength. Players with stronger strength have better physical confrontation ability, which will affect their efficiency in breakthrough.
[0206] 3. Speed. Players with faster speed are more difficult to get rid of. They are very flexible and usually use physical confrontation to break through.
[0207] 4. Defensive ability. Players with strong defensive ability have a strong ability to predict and will stand in a reasonable position, making it more difficult to break through the defense. At this time, compare the player with the ball with the opponent. For example, if there is a height advantage, then breaking through and creating space to shoot are both good choices; if the player with the ball is stronger than the opponent, it will be more efficient to play inside and force a breakthrough through physical confrontation; if the player with the ball is faster, then faking a sway to create space and break through inside would be a good choice.
[0208] Please refer to Fig.11 , which shows a flowchart of implementing the manipulation of virtual objects involved in an exemplary embodiment of the present application.
[0209] When the user presses the breakthrough button, the server of the computer device will compare and calculate three aspects of information.
[0210] In step S1, the player with the ball will first predict the opponent's weaknesses and characteristics under the calculation of AI (Artificial Intelligence). For example, the player with the ball will compare the various values of the player with the defensive player, such as strength, height, defense and speed. When there are 1-2 advantages, the computer device will record the items of this advantage in the server. If there is no advantage and all are at a disadvantage, the current status will also be recorded.
[0211] Step S2, judging the characteristics and strengths of the ball-handling player. For example, if the ball-handling player is fast, has a high shooting accuracy, and has some exclusive skills, these characteristics will be used, and it will be judged which breakthrough method will be better, such as forced breakthrough or fake dribble to open up space, etc.
[0212] Step S3, calculating the distance and position relationship between the ball-holding player and the defensive player, and determining the final breakthrough route. For example, if the defensive player stands to the left, the ball-holding player will break through to the right.
[0213] Through three steps of screening, the final selection is made, and the most efficient breakthrough method helps users attack.
[0214] To sum up, in the embodiments of the present application, by calculating the characteristics of the defensive player and the offensive player with the ball, a breakthrough method can be selected more intelligently to improve the efficiency and success rate of the breakthrough, and the user's gaming experience will not be poor due to some shortcomings in the mechanism or operation. The user can be more focused on the fun of the game itself and the fun of the game can be improved. On the other hand, it can help the user learn basketball knowledge, learn some technical points and characteristics of breakthroughs, and promote the user's understanding of the sport of basketball.
[0215] Fig.12 A block diagram of a virtual object control device provided by an exemplary embodiment of the present application is shown.
[0216] The device includes:
[0217] The interface display module 1201 is used to display a battle interface of a virtual scene, wherein the battle interface includes a target control; the virtual scene includes a first virtual object and one or more second virtual objects;
[0218] The screen display module 1202 is used to display a first scene screen in the battle interface, where the first scene screen is a screen in which at least one second virtual object defends the first virtual object;
[0219] The action execution module 1203 is used to control the first virtual object to perform a first action in response to receiving a trigger operation on a target control, where the first action is an action to break away from the defense of the second virtual object; the action direction of the first action is determined by the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene.
[0220] In some embodiments, the device also includes: an action direction acquisition module, which is used to obtain the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene in response to receiving a trigger operation on the target control; query the correspondence between the relative position relationship and the action direction through the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene, and obtain the action direction of the first virtual object; based on the action direction, control the first virtual object to perform a first action.
[0221] In some embodiments, the action direction acquisition module is used, when at least one of the second virtual objects defending the first virtual object is a single second virtual object,
[0222] In response to the relative position relationship indicating that the single second virtual object is located on the left side of the first virtual object, querying the correspondence between the relative position relationship and the action direction through the relative position relationship to obtain the action direction is the right side of the first virtual object;
[0223] In response to the relative position relationship indicating that the single second virtual object is located on the right side of the first virtual object, querying the correspondence between the relative position relationship and the action direction through the relative position relationship to obtain the action direction as the left side of the first virtual object;
[0224] In response to the relative position relationship indicating that the single second virtual object is located within a preset distance in front of the first virtual object, querying the correspondence between the relative position relationship and the action direction through the relative position relationship, and obtaining the action direction as a random direction of the left side and the right side of the first virtual object;
[0225] In response to the relative position relationship indicating that the single second virtual object is located outside the preset distance in front of the first virtual object, the corresponding relationship between the relative position relationship and the action direction is queried through the relative position relationship to obtain the action direction as the rear of the first virtual object.
[0226] In some embodiments, the action direction acquisition module is used to:
[0227] In response to receiving a trigger operation on a target control, obtaining information about a relative position relationship between a first virtual object and at least one second virtual object in a virtual scene;
[0228] Inputting information about the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene into an action direction prediction model to obtain an action direction output by the action direction prediction model;
[0229] Based on the motion direction, controlling the first virtual object to perform a first motion;
[0230] Among them, the action direction prediction model is a machine learning model obtained by training the relative position relationship samples of the first virtual object and at least one second virtual object in the virtual scene, and the labeled action directions corresponding to the relative position relationship samples.
[0231] In some embodiments, when at least one of the second virtual objects defending the first virtual object includes a plurality of the second virtual objects,
[0232] The information about the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene includes direction information and distance information of the plurality of second virtual objects relative to the first virtual object.
[0233] In some embodiments, the action mode of the first action is determined by object information, and the object information includes at least one of the following information:
[0234] information about various object attributes of the first virtual object and various object attributes of at least one of the second virtual objects;
[0235] information on technical characteristics of the first virtual object;
[0236] And, information about the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene.
[0237] In some embodiments, the object attributes include at least one of height, weight, and speed.
[0238] In some embodiments, the technical characteristics include: at least one of speed, shooting accuracy, and defensive ability.
[0239] In some embodiments, the device further comprises: a first action mode acquisition module, configured to, when at least one of the second virtual objects defending the first virtual object is a single second virtual object,
[0240] In response to receiving a trigger operation on a target control, obtaining a dominant attribute among various object attributes, where the dominant attribute is an object attribute whose attribute value corresponding to the first virtual object is superior to the attribute value corresponding to a single second virtual object;
[0241] Acquire an action mode corresponding to the advantageous attribute and the technical feature of the first virtual object;
[0242] Based on the motion direction, the first virtual object is controlled to perform a first motion.
[0243] In some embodiments, the device further includes: a second action mode acquisition module, which is used to:
[0244] In response to receiving a trigger operation on a target control, inputting object information into an action mode prediction model to obtain an action mode output by the action mode prediction model;
[0245] Based on the action mode, controlling the first virtual object to perform a first action;
[0246] Among them, the action mode prediction model is a machine learning model trained through object information samples of the first virtual object and at least one second virtual object in the virtual scene, and the labeled action modes corresponding to the object information samples.
[0247] In some embodiments, the virtual scene is a virtual scene based on basketball or football.
[0248] To sum up, in the solution provided in the embodiment of the present application, the user performs a trigger operation on the target control, and through the target control, controls the first virtual object to perform a first action to get rid of the defense of the second virtual object, and the direction of the action is determined by the relative position relationship between the first virtual object and the second virtual object in the virtual scene. The user does not need to perform other operations and it can be completed with one click, which improves the execution efficiency of virtual actions, expands the way in which virtual objects affect virtual actions, and further expands the way in which users control virtual objects to interact with virtual scenes, thereby improving the interaction effect between users and virtual scenes.
[0249] One point that needs to be explained is that the device provided in the above embodiment only uses the division of the above-mentioned functional modules as an example to implement its functions. In actual applications, the above-mentioned functions can be assigned to different functional modules according to actual needs, that is, the content structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0250] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method; the technical effects achieved by each module performing operations are the same as those in the embodiment of the method, and will not be elaborated here.
[0251] Fig.13 The block diagram of the structure of a computer device 1300 provided by an exemplary embodiment of the present application is shown. The computer device 1300 may be a portable mobile terminal, such as a smart phone or a tablet computer. The computer device 1300 may also be called a user device, a portable terminal, or other names.
[0252] Typically, the computer device 1300 includes a processor 1301 and a memory 1302 .
[0253] The processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1301 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 1301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1301 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 1301 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0254] The memory 1302 may include one or more computer-readable storage media, which may be tangible and non-transitory. The memory 1302 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 1302 is used to store at least one instruction, which is used to be executed by the processor 1301 to implement the control method of the virtual object provided in the embodiment of the present application.
[0255] In some embodiments, the computer device 1300 may further include: a peripheral device interface 1303 and at least one peripheral device. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1304 , a touch display screen 1305 , a camera 1306 , an audio circuit 1307 and a power supply 1308 .
[0256] In some embodiments, the computer device 1300 further includes one or more sensors 1309 , including but not limited to: an acceleration sensor 1310 , a gyroscope sensor 1311 , a pressure sensor 1312 , an optical sensor 1313 , and a proximity sensor 1314 .
[0257] Those skilled in the art will appreciate that the structure shown above does not constitute a limitation on the computer device 1300 , and may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.
[0258] In an exemplary embodiment, a chip is also provided. The chip includes a programmable logic circuit and / or program instructions. When the chip runs on a computer device, it is used to implement the control method of the virtual object described in the above aspects.
[0259] In an exemplary embodiment, a computer program product is also provided, the computer program product includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the control method of the virtual object provided by the above-mentioned method embodiments.
[0260] In an exemplary embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the virtual object control method provided by the above-mentioned method embodiments.
[0261] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0262] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.
[0263] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for controlling a virtual object, It is characterized in that The method comprises: Displaying a battle interface of a virtual scene, wherein the battle interface includes a target control; the virtual scene includes a first virtual object and one or more second virtual objects; Displaying a first scene screen in the battle interface, where the first scene screen is a screen in which at least one of the second virtual objects defends the first virtual object; In response to receiving a trigger operation on the target control, the first virtual object is controlled to perform a first action, wherein the first action is an action to break away from the defense of the second virtual object; the action direction of the first action is determined by the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene.
2. The method according to claim 1, It is characterized in that In response to receiving a trigger operation on the target control, controlling the first virtual object to perform a first action includes: In response to receiving a trigger operation on the target control, obtaining a relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene; According to the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene, query the corresponding relationship between the relative position relationship and the action direction to obtain the action direction of the first virtual object; Based on the motion direction, the first virtual object is controlled to perform the first motion.
3. The method according to claim 2, It is characterized in that In a case where at least one second virtual object defending the first virtual object is a single second virtual object, querying a correspondence between the relative position relationship and the action direction based on the relative position relationship between the first virtual object and at least one second virtual object in the virtual scene to obtain the action direction of the first virtual object includes: In response to the relative position relationship indicating that the single second virtual object is located on the left side of the first virtual object, querying the correspondence between the relative position relationship and the motion direction through the relative position relationship to obtain that the motion direction is the right side of the first virtual object; In response to the relative position relationship indicating that the single second virtual object is located on the right side of the first virtual object, querying the correspondence between the relative position relationship and the motion direction through the relative position relationship to obtain that the motion direction is the left side of the first virtual object; In response to the relative position relationship indicating that the single second virtual object is located within a preset distance in front of the first virtual object, querying a correspondence between the relative position relationship and the action direction through the relative position relationship, and obtaining that the action direction is a random direction of a left side and a right side of the first virtual object; In response to the relative position relationship indicating that the single second virtual object is located outside a preset distance in front of the first virtual object, the correspondence between the relative position relationship and the action direction is queried through the relative position relationship to obtain the action direction as the rear of the first virtual object.
4. The method according to claim 1, It is characterized in that In response to receiving a trigger operation on the target control, controlling the first virtual object to perform a first action includes: In response to receiving a trigger operation on the target control, acquiring information on a relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene; Inputting information about the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene into an action direction prediction model to obtain the action direction output by the action direction prediction model; Based on the motion direction, controlling the first virtual object to perform the first motion; Among them, the action direction prediction model is a machine learning model obtained by training the relative position relationship samples of the first virtual object and at least one of the second virtual objects in the virtual scene, and the labeled action directions corresponding to the relative position relationship samples.
5. The method according to claim 4, It is characterized in that In the case where at least one of the second virtual objects defending the first virtual object includes a plurality of the second virtual objects, The information about the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene includes direction information and distance information of the plurality of second virtual objects relative to the first virtual object.
6. The method according to claim 1, It is characterized in that The action mode of the first action is determined by object information, and the object information includes at least one of the following information: information about various object attributes of the first virtual object and various object attributes of at least one of the second virtual objects; information on technical characteristics of the first virtual object; And, information about the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene.
7. The method according to claim 6, It is characterized in that The object attributes include at least one of height, weight, and speed.
8. The method according to claim 6, It is characterized in that The technical characteristics include: at least one of speed, shooting accuracy, and defensive ability.
9. The method according to claim 6, It is characterized in that In the case where at least one of the second virtual objects defending the first virtual object is a single second virtual object, In response to receiving a trigger operation on the target control, controlling the first virtual object to perform a first action includes: In response to receiving a trigger operation on the target control, obtaining a dominant attribute among the various object attributes, the dominant attribute being an object attribute whose attribute value corresponding to the first virtual object is superior to an attribute value corresponding to a single second virtual object; Acquire the action mode corresponding to the advantageous attribute and the technical feature of the first virtual object; Based on the motion direction, the first virtual object is controlled to perform the first motion.
10. The method according to claim 6, It is characterized in that In response to receiving a trigger operation on the target control, controlling the first virtual object to perform a first action includes: In response to receiving a trigger operation on the target control, inputting the object information into an action mode prediction model to obtain the action mode output by the action mode prediction model; Based on the action mode, controlling the first virtual object to perform the first action; Among them, the action mode prediction model is a machine learning model trained through object information samples of the first virtual object and at least one of the second virtual objects in the virtual scene, and the labeled action modes corresponding to the object information samples.
11. The method according to any one of claims 1 to 10, It is characterized in that The virtual scene is a virtual scene based on basketball or football.
12. A control device for a virtual object, It is characterized in that The device comprises: An interface display module, used to display a battle interface of a virtual scene, wherein the battle interface includes a target control; the virtual scene includes a first virtual object and one or more second virtual objects; A screen display module, configured to display a first scene screen in the battle interface, wherein the first scene screen is a screen in which at least one of the second virtual objects defends the first virtual object; An action execution module is used to control the first virtual object to perform a first action in response to receiving a trigger operation on the target control, wherein the first action is an action to break away from the defense of the second virtual object; and the action direction of the first action is determined by the relative position relationship between the first virtual object and at least one of the second virtual objects in the virtual scene.
13. A computer device, It is characterized in that The computer device includes a processor and a memory, wherein the memory stores at least one computer instruction, and the at least one computer instruction is loaded and executed by the processor to implement the control method of the virtual object according to any one of claims 1 to 12.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one computer instruction, and the computer instruction is loaded and executed by a processor to implement the virtual object control method according to any one of claims 1 to 12.
15. A computer program product, It is characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; the computer instructions are read and executed by a processor of a computer device to implement the control method of a virtual object as described in any one of claims 1 to 12.