Direction control method and device, computer readable storage medium and computer equipment
By adjusting the limbs of virtual objects in the virtual game to align with the target teammate, the problem of teammates having difficulty aiming at enemy virtual objects was solved, thus improving the gaming experience.
Patent Information
- Application Number
- CN202210333871.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-30
- Publication Date
- 2026-11-03
- Estimated Expiration
- 2042-03-30
AI Technical Summary
In virtual games, when a player-controlled virtual object grabs an enemy virtual object while in a certain skill state, it becomes difficult for teammate virtual objects to aim and attack the enemy virtual object, affecting the game experience.
By detecting when an enemy virtual object in the virtual game screen is controlled, the directional control command of the virtual limb is obtained and adjusted to the direction of the target teammate virtual object, locking that direction to facilitate the teammate's attack.
It enables accurate targeting and attack of enemy virtual objects even when teammates' virtual objects are moving or turning, thus improving the gaming experience.
Smart Images

Figure CN116920367B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, specifically to a directional control method, device, computer-readable storage medium, and computer equipment. Background Technology
[0002] In a certain virtual game, when the player-controlled virtual object is in a certain skill state, it can use one hand to grab an enemy virtual object and hold it in its hand. Teammate virtual objects can then attack the enemy virtual object held by the player. However, if the player moves or changes direction, it becomes difficult for teammate virtual objects to aim at the enemy virtual object held by the player, thus hindering their ability to attack it and impacting the gameplay experience. Summary of the Invention
[0003] This application provides a direction control method, device, computer-readable storage medium, and computer equipment, which can adjust the virtual limb control of the current virtual object to the direction of the target teammate virtual object, solve the above problems, and improve the player's gaming experience.
[0004] This application provides a direction control method, including:
[0005] When it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, the directional control command of the virtual limb is obtained, wherein the virtual game screen is displayed through a graphical user interface;
[0006] The virtual limb is adjusted to the target direction and locked according to the direction control command. The target direction is the direction of the target teammate virtual object in the virtual game screen.
[0007] This application embodiment also provides a direction control device, including:
[0008] The first acquisition module is used to acquire the direction control command of the virtual limb when it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, wherein the virtual game screen is displayed through a graphical user interface;
[0009] The adjustment module is used to adjust and lock the virtual limb part to the target direction according to the direction control command, wherein the target direction is the direction of the target teammate virtual object in the virtual game screen.
[0010] This application also provides a computer-readable storage medium storing a computer program adapted for loading by a processor to perform the steps in the direction control method as described in any of the above embodiments.
[0011] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the steps of the direction control method described in any of the above embodiments by calling the computer program stored in the memory.
[0012] The directional control method, apparatus, computer-readable storage medium, and computer device provided in this application, when detecting that an enemy virtual object in a virtual game screen displayed on a graphical user interface is controlled by the virtual limbs of the current virtual object, acquires directional control instructions for the virtual limbs and adjusts the virtual limbs to the direction of the target teammate virtual object in the virtual game screen according to the directional control instructions. This application embodiment adjusts the virtual limbs controlling the enemy virtual object to the direction of the target teammate virtual object, thus ensuring that the enemy virtual object controlled by the virtual limbs of the current virtual object is always in the direction of the target teammate virtual object, facilitating virtual gameplay and improving the gaming experience. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a schematic diagram illustrating an application scenario of the directional control method provided in the embodiments of this application.
[0015] Figure 2 This is a flowchart illustrating the directional control method provided in an embodiment of this application.
[0016] Figure 3 and Figure 4 This is a schematic diagram of a virtual game screen provided in an embodiment of this application.
[0017] Figure 5 This is a schematic diagram of a sub-process of the directional control method provided in an embodiment of this application.
[0018] Figure 6 and Figure 7 Another schematic diagram of a virtual game screen provided in an embodiment of this application.
[0019] Figure 8 and Figure 9 This is another schematic diagram of a virtual game screen provided in an embodiment of this application.
[0020] Figure 10 This is a schematic diagram of a virtual game screen provided in an embodiment of this application.
[0021] Figure 11 This is a schematic diagram of the direction control device provided in an embodiment of this application.
[0022] Figure 12 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0023] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0024] This application provides a direction control method, apparatus, computer-readable storage medium, and computer device. Specifically, the direction control method of this application can be executed by a computer device, which can be a terminal or a server. The terminal can be a smartphone, tablet computer, laptop computer, touch screen, game console, personal computer (PC), or other terminal device. The server can be a standalone physical server, a server cluster consisting of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services and cloud databases.
[0025] For example, when this directional control method is used on a terminal device, the terminal device stores a game application and is used to render a virtual game scene in a virtual game screen. The terminal device is used to interact with the user through a graphical user interface, such as downloading, installing, and running the game application on the terminal device. The terminal device can provide the graphical user interface to the user in various ways, such as rendering it on the terminal device's display screen or presenting the graphical user interface through holographic projection.
[0026] For example, when this directional control method runs on a server, it can be used for cloud gaming. Cloud gaming refers to a gaming method based on cloud computing. In cloud gaming, the game application and the game screen presentation are separate. The storage and execution of the directional control method are completed on the cloud gaming server. The game screen presentation is completed on the cloud gaming client, which is mainly used for receiving and sending game data and displaying the game screen. When playing the game, the user sends operation commands to the cloud gaming server through the cloud gaming client. The cloud gaming server runs the game application according to the operation commands, encodes and compresses the game screen and other data, returns it to the cloud gaming client via the network, and finally decodes and outputs the game screen through the cloud gaming client. This reduces the terminal's computing resource consumption and improves the image quality displayed on the terminal.
[0027] The following will provide a detailed description of a direction control method, apparatus, computer-readable storage medium, and computer device provided in the embodiments of this application. It should be noted that the sequence numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0028] Figure 1 This is a schematic diagram illustrating an application scenario of the directional control method provided in this application embodiment. In this scenario, the current virtual object and the teammate virtual object participate in the game as one side of a battle, while enemy virtual object 1 and enemy virtual object 2 participate as the other side. The current virtual object, teammate virtual object, enemy virtual object 1, and enemy virtual object 2 perform operations through the corresponding virtual game client and send the corresponding operations to the clients of other players through the server. The current virtual object, teammate virtual object, enemy virtual object 1, and enemy virtual object 2 are all virtual character objects created through the virtual game client. The directional control method in this application embodiment can be applied to any terminal device capable of running the virtual game; the example given is the terminal device of the current player corresponding to the current virtual object.
[0029] It is important to note that Figure 1 The application scenario shown is merely an example to facilitate understanding of the technical solution of this application and does not constitute a limitation on the embodiments of this application. For example, in other embodiments, there can be multiple virtual teammates participating in the game, and there can also be multiple virtual opponents. Generally, for game balance, the number of virtual character objects on both sides is the same.
[0030] Figure 2 This is a flowchart illustrating the direction control method provided in an embodiment of this application. The direction control method includes the following steps.
[0031] 101. When it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, the directional control command of the virtual limb is obtained. The virtual game screen is displayed through a graphical user interface.
[0032] In this application's embodiments, the enemy virtual object can be a virtual character object of the other side participating in the game battle, or it can be other virtual objects in the virtual game that do not participate in the game battle, such as animal objects in a forest / cave in the virtual game. The virtual character object can be a person or an animal, etc. Virtual limb parts can be any limb part of the virtual character object participating in the game. Generally, when the virtual character object is a person, virtual limb parts include hands or feet, etc., which can be understood as being able to grab enemies / animals with hands or step on animals with feet, etc.; when the virtual character object is an animal, virtual limb parts include claws, fox tails, etc.
[0033] To achieve game simulation, when the virtual character is a person, the corresponding number of virtual limbs is two, which can be either hands or feet. However, this is not a limitation; for example, a virtual character can have nine hands, all of which can be used to grab enemies.
[0034] In this embodiment, the virtual character objects corresponding to the current virtual object, the enemy virtual object, and the teammate virtual object are all human, and the virtual limbs are the two hands of the virtual character object, as an example for illustration.
[0035] In one embodiment, when the current virtual object in the virtual game screen is in a preset skill state, the virtual limbs of the current virtual object can be used to control enemies, such as grabbing enemy virtual objects.
[0036] like Figure 3 The current virtual object (me) is in a preset skill state, such as when using a powerful ultimate skill. In this state, the virtual object transforms into a Buddha-like state, increasing its number of hands from two to four. It's important to note that while the virtual object has four hands in the Buddha state, only two hands can be used to control enemies (enemy virtual objects). Of course, depending on the game's design, enemies can be controlled by one, three, or four hands. Each enemy can be controlled by one hand. At any given time, one enemy can be controlled by one hand; alternatively, two enemies can be controlled by their respective hands. For example... Figure 3 In the game, the enemy virtual object is controlled by the left hand of the current virtual object.
[0037] When it is detected that an enemy virtual object in the virtual game screen displayed on the graphical user interface is controlled by the virtual limbs of the current virtual object, such as by grabbing, the directional control command of the virtual limbs is obtained.
[0038] The acquisition of directional control commands for virtual limbs can be achieved in various ways. For example, whenever an enemy virtual object is detected to be controlled by a virtual limb of the current virtual object, directional control commands for the virtual limbs are automatically generated and acquired. Alternatively, directional control commands can be generated and acquired by triggering a preset directional control control. Triggering operations can include clicking, touching, pressing, and even voice commands. Understandably, the preset directional control control can be triggered by clicking, touching, or pressing, or by voice commands, or by other methods, which will not be elaborated further below.
[0039] In one embodiment, the step of obtaining directional control instructions for virtual limb parts includes: generating directional control instructions for virtual limb parts in response to a trigger operation on a preset directional control control. The preset directional control control can be any physical control, such as a switch button, or a virtual control on the current player's terminal device corresponding to the current virtual object; it can also be a shortcut control displayed on a graphical user interface.
[0040] In one embodiment, the step of generating directional control instructions for virtual limb parts in response to a trigger operation on a preset directional control control includes: displaying the preset directional control control on a graphical user interface; and generating directional control instructions for virtual limb parts in response to a trigger operation on the preset directional control control on the graphical user interface. For example, when it is detected that an enemy virtual object is controlled by the virtual limb parts of the current virtual object, the preset directional control control is displayed on the graphical user interface displaying the virtual game screen, and the preset directional control control is triggered to generate directional control instructions.
[0041] In the above embodiments, when generating directional control commands, the directional control commands do not carry the target teammate identifier; alternatively, before generating directional control commands, if it is detected that there is only one virtual teammate object in the virtual game screen currently displayed on the graphical user interface, the identifier of that virtual teammate object is obtained, and the identifier of that virtual teammate object is used as the target teammate identifier. In this case, the directional control commands carry the target teammate identifier. The target teammate identifier can be an identifier that can uniquely identify a virtual teammate object in the virtual game screen, such as the virtual teammate object's nickname and / or ID and / or image, etc.
[0042] In one embodiment, the step of generating a directional control command for a virtual limb in response to a trigger operation of a preset directional control control includes: displaying the preset directional control control on a graphical user interface; displaying a teammate identifier for a virtual teammate object on the graphical user interface; and generating a directional control command carrying the target teammate identifier in response to a sliding operation of the preset directional control control on the graphical user interface to the target teammate identifier. In this embodiment, the sliding operation of the preset directional control control triggers the preset directional control control to achieve directional control functionality and simultaneously selects a target virtual teammate object.
[0043] like Figure 3 As shown, a "Direction Control" control is displayed on the right side of the graphical user interface. Since a virtual teammate object corresponding to "Teammate 1" is detected on the current virtual game screen, the teammate identifier "Teammate 1" is displayed on the right side of the graphical user interface. Sliding the "Direction Control" control to "Teammate 1" generates a direction control command in response to this operation. This command carries the target teammate identifier, "Teammate 1".
[0044] It should be noted that, due to Figure 3 If only the virtual teammate object "Teammate 1" is displayed on the graphical user interface, then the right side of the current graphical user interface will display the teammate icon for "Teammate 1". If multiple virtual teammate objects are displayed on the graphical user interface, then the right side of the current graphical user interface will display the corresponding number of teammate icons. Slide the "Direction Control" control to one of the teammate icons among the multiple teammate icons to use that teammate icon as the target teammate icon.
[0045] In some cases, regardless of whether or not virtual teammate objects are displayed in the virtual game screen on the graphical user interface, and regardless of how many virtual teammate objects are displayed, the teammate icons of all virtual teammate objects in the virtual game are displayed on the right side of the graphical user interface. By sliding the "direction control" control to one of the teammate icons, that teammate icon is selected as the target teammate icon.
[0046] Understandably, the aforementioned directional control commands for obtaining virtual limb parts can be obtained in various ways, and in different embodiments, the obtained directional control commands may or may not carry a target teammate identifier.
[0047] 102. Adjust the virtual limb part to the target direction and lock it according to the direction control command. The target direction is the direction of the target teammate virtual object in the virtual game screen.
[0048] Regardless of whether the directional control command includes a target teammate identifier, identify the target teammate virtual object in the virtual game screen displayed on the graphical user interface; adjust the virtual limbs to the direction of the target teammate virtual object according to the directional control command.
[0049] The direction of the target teammate virtual object can be the angle between the point corresponding to the current virtual object and the point corresponding to the target teammate virtual object, which is the method used in this embodiment; or it can be the angle between a point within a certain range of the target teammate virtual object and the point corresponding to the current virtual object, where the angle corresponds to an angle range.
[0050] When the virtual limb is a hand, the hand of the current virtual object is adjusted and locked to the direction of the target teammate virtual object based on directional control commands. After locking the direction, the orientation of the hand controlling the enemy virtual object by the current virtual object will be dynamically adjusted in real time according to the movement and direction of both the current virtual object and the target teammate virtual object. This ensures that no matter how the current virtual object moves or turns, the hand controlling the enemy virtual object by the current virtual object always faces the target teammate virtual object. Since the hand is holding an enemy virtual object, the enemy virtual object controlled by the current virtual object is also adjusted to the direction of the target teammate virtual object, making it easier for the target teammate virtual object to attack the enemy virtual object held in the hand, thus facilitating the virtual game for players and improving the gaming experience.
[0051] like Figure 4 As shown, in the virtual game screen displayed on the graphical user interface, if the target teammate virtual object (target teammate identifier: teammate 1) is to the left of the current virtual object, then the current virtual object will grab the enemy virtual object's hand and move it towards the direction of the target teammate virtual object. If the hand can be considered a stick, the angle between the stick and the point corresponding to the current virtual object can be adjusted to the angle between the target teammate virtual object and the point corresponding to the current virtual object.
[0052] In one embodiment, such as Figure 5 As shown, the above step 102 includes the following steps 1021-1023.
[0053] 1021. Based on the direction control command, obtain the first coordinate information and first orientation of the current virtual object in the virtual game screen, as well as the second coordinate information of the target teammate virtual object.
[0054] The first and second coordinate information can be global coordinates based on the global coordinate system within the virtual game screen, or relative coordinates based on a specific virtual scene, etc., without any specific limitations. The first orientation refers to the direction the current virtual object is facing. Since the virtual limb is a part of the current virtual object, it has a corresponding range of movement angles. This range of movement angles can be determined based on the first orientation, which will be described in detail later.
[0055] In one embodiment, step 1021 above includes: determining the target teammate virtual object in the virtual game screen based on the direction control command; obtaining the first coordinate information and first orientation of the current virtual object, and the second coordinate information of the target teammate virtual object.
[0056] Upon receiving a directional control command, the target teammate virtual object in the virtual game screen is determined based on the directional control command. In one embodiment, the step of determining the target teammate virtual object in the virtual game screen based on the directional control command includes: when the directional control command carries a target teammate identifier, determining the corresponding target teammate virtual object based on the target teammate identifier; when the directional control command does not carry a target teammate identifier, acquiring the teammate virtual objects displayed on the graphical user interface, as well as the attack ability information and / or health information of the teammate virtual objects; and determining the target teammate virtual object from the teammate virtual objects based on the attack ability information and / or health information.
[0057] The cases where the directional control command carries the target teammate identifier and the cases where it does not have the target teammate identifier have been described above and will not be repeated here.
[0058] When the directional control command carries a target teammate identifier, the corresponding virtual teammate object is determined based on the target teammate identifier, such as the target teammate ID, and that virtual teammate object is identified as the target teammate virtual object.
[0059] When the directional control command does not carry a target teammate identifier, the virtual teammate object currently displayed in the virtual game screen on the graphical user interface is retrieved; that is, the virtual teammate object currently displayed in the game screen is retrieved, such as... Figure 3 As shown, there is only one virtual teammate displayed in the current game screen.
[0060] Once a virtual teammate is identified in the current game screen, their attack ability information and / or stamina information are retrieved. Attack ability information includes the teammate's equipment, magic items, mounts, level, and other attack-related attributes; stamina information includes current health and other stamina-related attributes.
[0061] The system can determine the target virtual teammate from among virtual teammates based on their attack power and / or stamina information. For example, it can select the virtual teammate with the strongest attack power, the virtual teammate with both the strongest attack power and the highest stamina, or simply the virtual teammate with the highest stamina. Alternatively, it can configure attack power and stamina in a certain ratio, multiply the two values according to the corresponding ratio, add them together, and select the virtual teammate with the highest sum as the target virtual teammate. It can also select a preset number of virtual teammates as target virtual teammates based on their attack power and / or stamina information.
[0062] In one embodiment, when the directional control command does not carry a target teammate identifier, the system acquires the teammate virtual objects in the virtual game screen displayed on the graphical user interface, as well as the attack ability information and / or stamina information of the teammate virtual objects. It also acquires the number of enemies of the enemy virtual objects and the number of teammates of the teammate virtual objects. Based on the number of enemies, the number of teammates, the attack ability information and / or stamina information, the system determines the target teammate virtual object from the teammate virtual objects.
[0063] For example, when both hands are holding enemy virtual objects, there are two enemies. If there is only one teammate, that teammate's virtual object is the target teammate virtual object. If there are two enemies and two teammates, both teammate virtual objects can be used as target teammate virtual objects. When one hand is holding an enemy virtual object, there is one enemy. If there is only one teammate, that teammate's virtual object is the target teammate virtual object. If there are two teammates, the target teammate virtual object can be determined from among the teammate virtual objects based on attack ability information and / or health information. The steps for determining the target teammate virtual object from among the teammate virtual objects based on attack ability information and / or health information are described in the corresponding section above and will not be repeated here.
[0064] Once the target teammate virtual object is identified, the first coordinate information and first orientation of the current virtual object, as well as the second coordinate information of the target teammate virtual object, are obtained. When there are multiple target teammate virtual objects, the corresponding second coordinate information also includes multiple values, with each target teammate virtual object corresponding to one value in the second coordinate information.
[0065] 1022. Determine the target direction based on the first coordinate information, the first orientation, and the second coordinate information.
[0066] The target direction refers to the direction in which the virtual teammate object is located in the virtual game screen.
[0067] In one embodiment, the steps of 1022 above include: determining the angle direction of the target teammate virtual object based on the current virtual object according to the first orientation, the first coordinate information, and the second coordinate information; and determining the angle direction as the target direction.
[0068] In this embodiment, the angular direction of the target teammate virtual object relative to the current virtual object can be determined based on the first orientation and first coordinate information of the current virtual object. It should be noted that this angular direction can correspond to an angular range or a specific angular value. For example, when determining the angular direction of the target teammate virtual object relative to the current virtual object, it can be determined using points within a certain range of the second coordinate information corresponding to the target teammate virtual object; thus, the obtained angular direction is an angular range.
[0069] In this embodiment, an angle direction is used as an example for illustration. For instance, assuming the current virtual object is located at the center of a clock, and the first orientation points to the 12 o'clock angle, the target teammate virtual object can be located at any angle direction of the clock, such as the 10 o'clock angle; or assuming the current virtual object is located at the origin of a coordinate system, and a coordinate system is determined based on the first orientation, the target teammate virtual object can be located at any angle direction in that coordinate system, such as the 120-degree angle direction in the second quadrant of the coordinate system. After determining the angle direction, it is defined as the target direction.
[0070] In one embodiment, the step of determining the angle direction of the target teammate virtual object based on the current virtual object according to the first orientation and the first coordinate information and the second coordinate information includes: constructing a coordinate system with the current virtual object as the origin based on the first orientation and the first coordinate information; and determining the angle direction of the target teammate virtual object based on the coordinate system according to the first coordinate information and the second coordinate information.
[0071] For example, a coordinate system is constructed with the first coordinate information as the origin, the straight line containing the shoulder of the current virtual object as the x-axis, the direction of the right hand as the positive x-axis, and the direction the current virtual object is pointing as the positive y-axis. Then, based on the first and second coordinate information, the relative position information of the target teammate virtual object relative to the origin of the coordinate system is determined. Based on this relative position information, the angular direction of the target teammate virtual object based on the coordinate system is calculated. This angular direction can be located at any point within the coordinate system; this angular direction is the target direction.
[0072] In other embodiments, the target direction of the target teammate virtual object in the virtual game screen can also be determined by other methods.
[0073] 1023, Adjust the virtual limb part to the target direction and lock it.
[0074] Once the target direction is determined, the virtual limb part of the current virtual object is adjusted to the target direction and locked. When the virtual limb part is a hand, the arm is adjusted to the target direction and locked; when the virtual limb part is a head, the head is turned to the target direction and locked; when the virtual limb part is a leg, the leg is adjusted to the target direction and locked, and so on. Understandably, any adjustable virtual limb part of the current virtual object can be adjusted.
[0075] Specifically, when the target direction is an angle value, the virtual limb part is directly adjusted to that angle value. When the target direction is an angle range, the virtual limb part is directly adjusted to any angle value within the angle range, such as the angle value corresponding to the smallest adjustment range of the virtual limb part.
[0076] In one embodiment, step 1023 above includes: obtaining the range of movement angles of the virtual limb part; adjusting the virtual limb part according to the range of movement angles and the target direction, so that the direction of the adjusted virtual limb part is the target direction and locking it.
[0077] Each virtual limb part corresponds to a range of movement angles. Taking the direction of the current virtual object's right hand as the positive x-axis and the direction the current virtual object's first facing direction as the positive y-axis, we will illustrate this with an example. For instance, the left hand (arm) has a movement angle range of 90-180 degrees in the second quadrant, and the right hand (arm) has a movement angle range of 0-90 degrees in the first quadrant. The left leg has a movement angle range of 180-360 degrees, and the right leg has a movement angle range of 0-180 degrees. It should be noted that this is merely an example.
[0078] After obtaining the range of movement angles of the virtual limb parts, the virtual limb parts are adjusted according to the range of movement angles and the target direction.
[0079] In one embodiment, the step of adjusting the virtual limb part according to the range of movement angles and the target direction so that the direction of the adjusted virtual limb part is the target direction and locked includes: when the target direction is within the range of movement angles of the virtual limb part, moving the virtual limb part to adjust the direction of the virtual limb part to the target direction and locking it; when the target direction is not within the range of movement angles of the virtual limb part, adjusting the first orientation of the current virtual object, or adjusting the first orientation of the current virtual object and moving the virtual limb part to adjust the direction of the virtual limb part to the target direction and locking it.
[0080] For example, if the current virtual object's right hand (arm) has a movement angle range of 0-90 degrees, and the target direction is a 30-degree angle in the first quadrant, then the target direction is within the movement angle range of the virtual limb, and the right hand (arm) can be moved directly to the target direction. If the target direction is a 230-degree angle in the third quadrant, and neither the left nor right hand (arm) has a movement angle range, then the current virtual object's first orientation should be adjusted. For example, the first orientation of the current virtual object can be adjusted by 90 degrees, while simultaneously moving the virtual limb, such as moving the left and right arms to the original 230-degree direction; or the first orientation of the current virtual object can be adjusted by 180 degrees, while simultaneously moving the right hand (arm) to the original 230-degree direction.
[0081] The number of virtual limbs corresponds to the number of enemy virtual objects. Some situations will be briefly explained below.
[0082] When there is only one virtual limb part, and this virtual limb part is used to grab a corresponding enemy virtual object, and the determined target direction is one (the corresponding target teammate virtual object includes one), the adjustment is made according to the method described above.
[0083] When there is only one virtual limb part, and this virtual limb part is used to grab a corresponding enemy virtual object, and there are multiple determined target directions (including multiple target teammate virtual objects), if one of the target directions is within the movement angle range of the virtual limb part, then the target direction is determined to be within the movement angle range of the virtual limb part. The virtual limb part is then moved to adjust its direction to that target direction, so that the target teammate virtual object corresponding to that target direction attacks the enemy virtual object. In other embodiments, other methods can also be used for adjustment.
[0084] When there are two virtual limbs used to grab two corresponding enemy virtual objects (e.g., one hand grabbing one enemy virtual object), and the target direction is singular (including one target teammate virtual object), if the target teammate virtual object's target direction is within the movement angle range of the two virtual limbs (e.g., if the target direction is 90 degrees), then move both virtual limbs to the target direction (e.g., both hands move to the 90-degree direction). Otherwise, adjust the current virtual object's first orientation so that it points towards the target direction, and then move the virtual limbs to the target direction; for example, if the target direction is 135 degrees, adjust the current virtual object's first orientation to point towards 135 degrees, and then move the virtual limbs to the 135-degree direction.
[0085] like Figure 6 and Figure 7 The image shown is another schematic diagram of a virtual game screen provided in an embodiment of this application. Wherein, as... Figure 6 As shown, when both hands are holding enemies, and teammate 1 is at a 90-degree angle, the movement angle of both hands should be adjusted to 90 degrees so that the enemies in both hands are aligned with teammate 1, making it easier for teammate 1 to attack the enemies in both hands. Figure 7 As shown.
[0086] When there are two virtual limbs used to grab two corresponding enemy virtual objects (e.g., one hand grabbing one enemy virtual object), and there are two target directions (corresponding to two target teammate virtual objects), if the two target directions are within the movement angle range corresponding to the two virtual limbs, move the two virtual limbs to adjust their orientation to the corresponding target direction. Otherwise, connect the points corresponding to the target teammate virtual objects for the two target directions to form a line segment, adjust the current virtual object's first orientation to point to the midpoint of the line segment, and then adjust the two virtual limbs so that the adjusted directions they point to are the target directions.
[0087] like Figure 8 and Figure 9 The image shown is another schematic diagram of a virtual game screen provided in an embodiment of this application. Wherein, as... Figure 8 As shown, when both hands are holding enemies, if teammate 1 is in the upper right corner of the virtual game screen and teammate 2 is in the upper left corner, then the movement angles of both hands are adjusted so that the right hand corresponds to the direction of teammate 1 and the left hand corresponds to the direction of teammate 2. Figure 9 As shown.
[0088] In some embodiments, when there are two virtual limb parts and more than two determined target directions, two points with the largest angular range can be selected from the points corresponding to the target teammate virtual objects corresponding to the multiple target directions. These two points are connected to form a line segment. The first orientation of the current virtual object is adjusted so that it points to the midpoint of the line segment. Then, the two virtual limb parts are adjusted so that the direction pointed to by the adjusted two virtual limb parts is the target direction corresponding to the two points.
[0089] In the above embodiments, by adjusting the virtual limbs of the enemy virtual object, the virtual limbs are adjusted to be in the direction of the target teammate virtual object. In this way, the enemy virtual object controlled by the virtual limbs of the current virtual object is always in the direction of the target teammate virtual object, which makes it easier for players to play virtual games and improves the game experience.
[0090] The above embodiments relate to the situation where there are virtual teammates in the currently displayed virtual game screen. If there are no virtual teammates in the currently displayed virtual game screen, the third coordinate information of the virtual teammate closest to the current virtual object in the virtual game scene is obtained, and the current virtual object is controlled to move towards the point corresponding to the third coordinate information.
[0091] In one embodiment, the above-described direction control method further includes: obtaining a direction cancellation control command for a virtual limb part; and stopping the adjustment of the virtual limb part according to the direction cancellation control command.
[0092] In one embodiment, the step of obtaining the direction cancellation control command for a virtual limb part includes: generating a direction cancellation control command for a virtual limb part in response to a trigger operation on a preset direction cancellation control control; or generating a direction cancellation control command for a virtual limb part when the duration of a preset skill state of the current virtual object is detected to have expired.
[0093] The preset direction cancellation control can be any physical control on the current player's terminal device corresponding to the current virtual object, such as sound + button, or a virtual control; it can also be a shortcut control displayed on the graphical user interface.
[0094] The preset skill state can be an ultimate skill state, a berserk mode, or other similar special character states. For example, if the duration of the preset skill state is 30 seconds, when the duration of the preset skill state is detected to reach 30 seconds, the current virtual object changes from the Buddha state to the normal state, and a direction cancellation control command for canceling the virtual limb parts is generated.
[0095] In one embodiment, the step of generating a direction cancellation control instruction for a virtual limb part in response to a triggering operation of a preset direction cancellation control control includes: displaying a preset direction cancellation control control on a graphical user interface; and generating a direction cancellation control instruction for a virtual limb part in response to a triggering operation of the preset direction cancellation control control on the graphical user interface. For example, after detecting that the preset direction control control on the graphical user interface has been triggered, the preset direction cancellation control control is displayed on the graphical user interface.
[0096] In one embodiment, the step of generating a direction cancellation control command for a virtual limb part in response to a trigger operation of a preset direction cancellation control includes: displaying a preset direction cancellation control on a graphical user interface, and simultaneously displaying a target teammate identifier of a determined target teammate virtual object on the graphical user interface; generating a direction cancellation control command in response to a sliding operation of the preset direction cancellation control on the graphical user interface to the target teammate identifier. Figure 10 The "Direction Cancellation Control" in the text is a preset direction cancellation control.
[0097] All of the above technical solutions can be combined in any way to form optional embodiments of this application, and will not be described in detail here.
[0098] To facilitate better implementation of the direction control method of this application embodiment, this application embodiment also provides a direction control device. Please refer to... Figure 11 , Figure 11 This is a schematic diagram of the structure of a direction control device provided in an embodiment of this application. The direction control device 200 may include a first acquisition module 201 and an adjustment module 202.
[0099] The first acquisition module 201 is used to acquire the direction control command of the virtual limb when it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, wherein the virtual game screen is displayed through a graphical user interface.
[0100] The adjustment module 202 is used to adjust and lock the virtual limb part to the target direction according to the direction control command, wherein the target direction is the direction of the target teammate virtual object in the virtual game screen.
[0101] In one embodiment, the adjustment module 202 includes a coordinate acquisition unit, a direction determination unit, and a direction adjustment unit. The coordinate acquisition unit is used to acquire, based on the direction control command, the first coordinate information and first orientation of the current virtual object in the virtual game screen, and the second coordinate information of the target teammate virtual object. The direction determination unit is used to determine a target direction based on the first coordinate information, the first orientation, and the second coordinate information. The direction adjustment unit is used to adjust the virtual limb part to the target direction and lock it.
[0102] In one embodiment, the coordinate acquisition unit is specifically used to determine the target teammate virtual object in the virtual game screen based on the direction control command; acquire the first coordinate information and first orientation of the current virtual object, and the second coordinate information of the target teammate virtual object.
[0103] In one embodiment, when the coordinate acquisition unit performs the step of determining the target teammate virtual object in the virtual game screen based on the direction control command, it specifically performs the following: when the direction control command carries a target teammate identifier, it determines the corresponding target teammate virtual object based on the target teammate identifier; when the direction control command does not carry a target teammate identifier, it acquires the teammate virtual object in the virtual game screen displayed on the graphical user interface, as well as the attack ability information and / or stamina information of the teammate virtual object; and determines the target teammate virtual object from the teammate virtual objects based on the attack ability information and / or the stamina information.
[0104] In one embodiment, when the coordinate acquisition unit performs the step of determining the target direction based on the first coordinate information, the first orientation, and the second coordinate information, it specifically performs the following: based on the first orientation, and according to the first coordinate information and the second coordinate information, determines the angle direction of the target teammate virtual object based on the current virtual object; and determines the angle direction as the target direction.
[0105] In one embodiment, when the coordinate acquisition unit performs the step of determining the angle direction of the target teammate virtual object based on the current virtual object according to the first orientation and the first coordinate information and the second coordinate information, it specifically performs the following: constructing a coordinate system with the current virtual object as the origin based on the first orientation and the first coordinate information; and determining the angle direction of the target teammate virtual object based on the coordinate system according to the first coordinate information and the second coordinate information.
[0106] In one embodiment, the direction adjustment unit is specifically used to obtain the range of movement angles of the virtual limb part; and to adjust the virtual limb part according to the range of movement angles and the target direction, so that the direction of the adjusted virtual limb part is the target direction and locked.
[0107] In one embodiment, when the direction adjustment unit performs the step of adjusting the virtual limb part according to the movement angle range and the target direction so that the direction of the adjusted virtual limb part is the target direction, it specifically performs the following: when the target direction is within the movement angle range of the virtual limb part, it moves the virtual limb part to adjust the direction of the virtual limb part to the target direction; when the target direction is not within the movement angle range of the virtual limb part, it adjusts the first orientation of the current virtual object, or adjusts the first orientation of the current virtual object and moves the virtual limb part to adjust the direction of the virtual limb part to the target direction.
[0108] In one embodiment, when the first acquisition module 201 performs the step of acquiring the direction control command of the virtual limb part, it specifically performs the following: in response to the triggering operation of the preset direction control control, it generates the direction control command of the virtual limb part.
[0109] In one embodiment, the first acquisition module 201, in performing the step of generating a direction control instruction for the virtual limb part in response to a trigger operation on a preset direction control control, includes: displaying the preset direction control control on the graphical user interface; and generating a direction control instruction for the virtual limb part in response to a trigger operation on the preset direction control control on the graphical user interface.
[0110] In one embodiment, the first acquisition module 201, in performing the step of generating a directional control instruction for the virtual limb part in response to a trigger operation of a preset directional control control, includes: displaying the preset directional control control on the graphical user interface; detecting a virtual teammate object in the virtual game screen displayed on the graphical user interface and displaying a teammate identifier of the virtual teammate object on the graphical user interface; generating a directional control instruction in response to a sliding operation of the preset directional control control on the graphical user interface sliding to a target teammate identifier among the teammate identifiers, wherein the directional control instruction carries the target teammate identifier.
[0111] In one embodiment, such as Figure 11 As shown, the direction control device 200 may include a second acquisition module 203 and a stop module 204. The second acquisition module 203 is used to acquire a direction cancellation control command for the virtual limb part. The stop module 204 is used to stop adjusting the virtual limb part according to the direction cancellation control command.
[0112] In one embodiment, the second acquisition module 203 is specifically used to generate a direction cancellation control instruction for the virtual limb part in response to a trigger operation of a preset direction cancellation control control; or to generate a direction cancellation control instruction for the virtual limb part when the duration of the preset skill state of the current virtual object is detected to have expired.
[0113] In one embodiment, when the second acquisition module 203 performs the step of generating a direction cancellation control instruction for the virtual limb part in response to a trigger operation of the preset direction cancellation control, it specifically performs the following: displaying the preset direction cancellation control on the graphical user interface, and simultaneously displaying the target teammate identifier of the determined target teammate virtual object on the graphical user interface; generating a direction cancellation control instruction in response to a sliding operation of the preset direction cancellation control on the graphical user interface sliding to the target teammate identifier.
[0114] All the above technical solutions can be combined in any way to form optional embodiments of this application, and the beneficial effects achieved can be referred to the beneficial effects described above, which will not be repeated here.
[0115] Accordingly, embodiments of this application also provide a computer device, which can be a terminal or a server. For example... Figure 12 As shown, Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302.
[0116] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs (computer programs) and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby monitoring the computer device 300 as a whole.
[0117] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more applications into the memory 302 according to the following steps, and the processor 301 runs the applications stored in the memory 302 to achieve various functions:
[0118] When it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, the direction control command of the virtual limb is obtained, wherein the virtual game screen is displayed through a graphical user interface; the virtual limb is adjusted to the target direction and locked according to the direction control command, wherein the target direction is the direction of the target teammate virtual object in the virtual game screen.
[0119] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0120] Optional, such as Figure 12 As shown, the computer device 300 also includes: a touch screen display 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the touch screen display 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 12The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0121] The touch display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The touch display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. Optionally, the display panel can be configured using a liquid crystal display (LCD), an organic light-emitting diode (OLED), or other similar devices. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. The touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the data to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel based on the type of touch event. In this embodiment, the touch panel and display panel can be integrated into the touch display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the touch display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the touch display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0122] In this embodiment, the touch display screen 303 is used to present a graphical user interface and receive operation commands generated by the user interacting with the graphical user interface.
[0123] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0124] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0125] The input unit 306 can be used to receive input numbers, characters, or user characteristic information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0126] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0127] although Figure 12 As not shown in the diagram, computer equipment 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0128] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0129] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0130] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of computer programs that can be loaded by a processor to execute steps in any of the direction control methods provided in embodiments of this application. For example, the computer program can execute the following steps:
[0131] When it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, the direction control command of the virtual limb is obtained, wherein the virtual game screen is displayed through a graphical user interface; the virtual limb is adjusted to the target direction and locked according to the direction control command, wherein the target direction is the direction of the target teammate virtual object in the virtual game screen.
[0132] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0133] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0134] Since the computer program stored in the storage medium can execute the steps of any of the direction control methods provided in the embodiments of this application, the beneficial effects that any of the direction control methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0135] The foregoing has provided a detailed description of a direction control method, apparatus, storage medium, and computer device provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A direction control method, characterized in that, include: When it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, the directional control command of the virtual limb is obtained, wherein the virtual game screen is displayed through a graphical user interface; The virtual limb is adjusted to the target direction and locked according to the direction control command, where the target direction is the direction of the target teammate virtual object in the virtual game screen; The step of adjusting and locking the virtual limb part to the target direction according to the direction control command includes: Based on the direction control command, the first coordinate information and first orientation of the current virtual object in the virtual game screen, as well as the second coordinate information of the target teammate virtual object, are obtained; The target direction is determined based on the first coordinate information, the first orientation, and the second coordinate information; Adjust the virtual limb part to the target direction and lock it.
2. The direction control method according to claim 1, characterized in that, The step of obtaining the first coordinate information and first orientation of the current virtual object in the virtual game screen, and the second coordinate information of the target teammate virtual object based on the direction control command, includes: The target teammate virtual object in the virtual game screen is determined based on the direction control command; Obtain the first coordinate information and first orientation of the current virtual object, and the second coordinate information of the target teammate virtual object.
3. The direction control method according to claim 2, characterized in that, The step of determining the target teammate virtual object in the virtual game screen based on the direction control command includes: When the directional control command carries a target teammate identifier, the corresponding target teammate virtual object is determined based on the target teammate identifier; When the directional control command does not carry the target teammate identifier, the teammate virtual object in the virtual game screen displayed on the graphical user interface, as well as the attack ability information and / or stamina information of the teammate virtual object, are obtained. Based on the attack capability information and / or the physical strength information, the target teammate virtual object is determined from the teammate virtual objects.
4. The direction control method according to claim 1, characterized in that, The step of determining the target direction based on the first coordinate information, the first orientation, and the second coordinate information includes: Based on the first orientation, and according to the first coordinate information and the second coordinate information, the angle and direction of the target teammate virtual object relative to the current virtual object are determined; The angle direction is determined as the target direction.
5. The direction control method according to claim 4, characterized in that, The step of determining the angle and direction of the target teammate virtual object based on the current virtual object, according to the first orientation and the first and second coordinate information, includes: Based on the first orientation and the first coordinate information, a coordinate system is constructed with the current virtual object as the origin; Based on the first coordinate information and the second coordinate information, the angle and direction of the target teammate virtual object based on the coordinate system are determined.
6. The direction control method according to claim 1, characterized in that, The step of adjusting the virtual limb part to the target direction includes: Obtain the range of movement angles of the virtual limb parts; The virtual limb is adjusted according to the range of movement angles and the target direction, so that the direction of the adjusted virtual limb is the target direction.
7. The direction control method according to claim 6, characterized in that, The step of adjusting the virtual limb part according to the range of movement angles and the target direction so that the direction of the adjusted virtual limb part is the target direction includes: When the target direction is within the movement angle range of the virtual limb part, move the virtual limb part to adjust the direction of the virtual limb part to the target direction; When the target direction is not within the range of the movement angle of the virtual limb, adjust the first orientation of the current virtual object, or adjust the first orientation of the current virtual object and move the virtual limb to adjust the direction of the virtual limb to the target direction.
8. The direction control method according to claim 1, characterized in that, The step of obtaining the directional control commands for the virtual limb part includes: In response to a trigger operation on a preset direction control control, a direction control command for the virtual limb part is generated.
9. The direction control method according to claim 8, characterized in that, The step of generating directional control instructions for the virtual limb part in response to a trigger operation on a preset directional control control includes: A preset direction control control is displayed on the graphical user interface; In response to a trigger operation on a preset directional control control on the graphical user interface, directional control instructions for the virtual limb part are generated.
10. The direction control method according to claim 9, characterized in that, Prior to the step of responding to a trigger operation on a preset directional control control on the graphical user interface, the method further includes: The teammate identifier of the virtual teammate object is displayed on the graphical user interface. The step of responding to a trigger operation on a preset directional control control on the graphical user interface includes: responding to a sliding operation on the graphical user interface where the preset directional control control is slid to a target teammate identifier among the teammate identifiers, generating a directional control instruction, wherein the directional control instruction carries the target teammate identifier.
11. The direction control method according to claim 1, characterized in that, Also includes: Obtain the direction cancellation control command for the virtual limb part; The control command to cancel the direction will stop adjusting the virtual limb.
12. The direction control method according to claim 11, characterized in that, The direction cancellation control command for acquiring the virtual limb part includes: In response to a trigger operation that cancels the control control in a preset direction, a direction cancellation control command for the virtual limb part is generated; or When the duration of the preset skill state of the current virtual object is detected to have expired, a direction cancellation control command for the virtual limb part is generated.
13. A direction control device, characterized in that, include: The first acquisition module is used to acquire the direction control command of the virtual limb when it is detected that an enemy virtual object in the virtual game screen is controlled by the virtual limb of the current virtual object, wherein the virtual game screen is displayed through a graphical user interface; An adjustment module is used to adjust and lock the virtual limb part to a target direction according to the direction control command, wherein the target direction is the direction of the target teammate virtual object in the virtual game screen; Specifically, the adjustment module is used to: obtain the first coordinate information and first orientation of the current virtual object in the virtual game screen, and the second coordinate information of the target teammate virtual object, based on the direction control command; determine the target direction according to the first coordinate information, the first orientation, and the second coordinate information; and adjust the virtual limb part to the target direction and lock it.
14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the steps of the direction control method as described in any one of claims 1-12.
15. A computer device, characterized in that, The computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the steps of the direction control method as described in any one of claims 1-12 by calling the computer program stored in the memory.
Citation Information
Patent Citations
Game role control method and device
CN112190930A
Game device, and its storage medium
JP2007021235A
