Control method and device for virtual weapon in game and electronic equipment

By using the pre-specified elevation angle in the virtual game to correct the shooting direction of the virtual weapon, the precision shooting problem caused by ballistic droop is solved, the hit rate and game experience are improved, and effective shooting in real-time battles is ensured.

CN118526792APending Publication Date: 2024-08-23NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310161217.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-22
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

In virtual games, when using long-range weapons with ballistic droop, it is difficult for users to accurately hit the target, resulting in low hit rate and poor game experience. Especially in real-time combat games, manually adjusting the shooting angle is time-consuming and easy. Miss the best shooting opportunity.

Method used

By providing a graphical user interface, it responds to the aiming and shooting operations of the virtual weapon, corrects the aiming direction according to the pre-specified lifting angle, and automatically adjusts the shooting direction of the virtual weapon to offset ballistic droop to achieve precise shooting.

Benefits of technology

It improves the hit rate of virtual weapons, reduces the user's adjustment time when shooting, enhances the game experience, and ensures that users can hit the target in time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118526792A
    Figure CN118526792A
Patent Text Reader

Abstract

The invention discloses a control method and device for a virtual weapon in a game and electronic equipment, and the method comprises the steps that a graphical user interface displaying at least part of a virtual game scene is provided through terminal equipment, and the virtual game scene at least comprises the virtual weapon used for responding to shooting operation to launch a sub-weapon into the virtual game scene; the method comprises the steps that aiming operation for a virtual weapon is responded, and a first aiming direction used for indicating the shooting direction of the virtual weapon is determined in a virtual game scene; in response to shooting operation for the virtual weapon, correcting the first aiming direction according to a pre-specified lifting angle to obtain a target aiming direction for the virtual weapon; and the virtual weapon is controlled to launch the sub-weapon in the target aiming direction so as to shoot in the target aiming direction. According to the scheme provided by the invention, the hit rate of virtual weapon shooting can be improved, and the time for accurate shooting of the user is shortened, so that the game experience of the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and computer-readable storage medium for controlling virtual weapons in a game. Background Art

[0002] In virtual games, there are often scenes of shooting with weapons. In order to make the game scenes more realistic, medium and long-range shooting weapons are often set with ballistic droop to simulate the shooting trajectory of the weapon after it is fired in the real world. Therefore, in the game, when the user controls the long-range weapon to aim at the object being shot, the weapon does not shoot along a straight line composed of the shooting point and the aiming point after being fired. There is often a deviation between the point hit by the weapon and the point aimed at. For example, the point aimed at is the head of the object being shot, but the point hit may be the ground. In this way, the best opportunity to eliminate the opponent will be lost in real-time combat games. Therefore, in the game, it becomes extremely important to use a weapon with ballistic droop to accurately hit the aimed point.

[0003] In the related art, in order to improve the hit rate of long-range weapon shooting, users often need to manually adjust the weapon shooting angle according to game experience so that the weapon can hit the aimed point with a high probability.

[0004] However, the user's familiarity with the game often affects the choice of shooting angle, and manually adjusting the shooting angle will consume a lot of time, thereby missing the best shooting time, causing long-range weapons to often fail to accurately hit the aimed point, resulting in a poor gaming experience for the user. Summary of the invention

[0005] The present application provides a control method, device, electronic device and computer-readable storage medium for virtual weapons in a game, which can improve the hit rate of virtual weapon shooting and reduce the time spent by the user on accurate shooting, thereby improving the user's gaming experience. The specific scheme is as follows.

[0006] In a first aspect, an embodiment of the present application provides a method for controlling a virtual weapon in a game, wherein a graphical user interface is provided through a terminal device, wherein the graphical user interface displays at least a portion of a virtual game scene, wherein the virtual game scene includes at least a virtual weapon, and wherein the virtual weapon is used to fire a sub-weapon into the virtual game scene in response to a shooting operation, wherein the method includes:

[0007] In response to an aiming operation for the virtual weapon, determining a first aiming direction for indicating a shooting direction of the virtual weapon in the virtual game scene;

[0008] In response to a shooting operation directed to the virtual weapon, the first aiming direction is corrected according to a pre-specified elevation angle to obtain a target aiming direction directed to the virtual weapon;

[0009] The virtual weapon is controlled to launch the sub-weapon in the direction of the target aiming, so as to shoot in the direction of the target aiming.

[0010] In a second aspect, an embodiment of the present application provides a control device for a virtual weapon in a game, wherein a graphical user interface is provided through a terminal device, wherein the graphical user interface displays at least a portion of a virtual game scene, wherein the virtual game scene includes at least a virtual weapon, and wherein the virtual weapon is used to respond to a shooting operation to fire a sub-weapon into the virtual game scene, wherein the device includes:

[0011] a determining unit, configured to respond to an aiming operation on the virtual weapon and determine, in the virtual game scene, a first aiming direction for indicating a shooting direction of the virtual weapon;

[0012] a correction unit, configured to respond to a shooting operation directed to the virtual weapon and correct the first aiming direction according to a pre-specified lifting angle to obtain a target aiming direction directed to the virtual weapon;

[0013] The control unit is used to control the virtual weapon to launch the sub-weapon in the direction of the target aiming, so as to shoot in the direction of the target aiming.

[0014] In a third aspect, the present application further provides an electronic device, including:

[0015] Processor; and

[0016] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method described in any one of the first aspects is executed.

[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium storing a data processing program, which is executed by a processor to perform the method as described in any one of the first aspects.

[0018] Compared with the prior art, this application has the following advantages:

[0019] The control method of a virtual weapon in a game provided by the present application provides a graphical user interface through a terminal device, wherein at least part of a virtual game scene is displayed in the graphical user interface, and the virtual game scene includes at least a virtual weapon, and the virtual weapon is used to respond to a shooting operation to launch a sub-weapon into the virtual game scene; respond to an aiming operation for the virtual weapon, determine a first aiming direction for indicating the shooting direction of the virtual weapon in the virtual game scene; respond to a shooting operation for the virtual weapon, correct the first aiming direction according to a pre-specified lifting angle to obtain a target aiming direction for the virtual weapon; control the virtual weapon to launch the sub-weapon in the target aiming direction to shoot in the target aiming direction. Since when the virtual weapon is shot, the first aiming direction corresponding to the aiming operation is corrected to the target aiming direction according to a pre-set lifting angle, the sub-virtual weapon can launch the sub-weapon in the target aiming direction to offset the trajectory droop that occurs after the sub-weapon is fired.

[0020] It can be seen that the control method of the virtual weapon in the game provided by the present application can automatically correct the direction of the first aiming direction indicated by the aiming operation when the user triggers the aiming operation and shooting operation of the virtual weapon, without the user having to manually adjust the shooting direction of the virtual weapon before performing the shooting operation. This can improve the hit rate of the sub-weapon when the virtual weapon is performing the shooting operation, and at the same time avoid the user missing the best shooting time due to manual adjustment of the shooting direction, thereby improving the user's gaming experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 This is an application scenario architecture diagram of a method for controlling virtual weapons in a game provided by an embodiment of the present application;

[0022] Figure 2 is a flow chart of a method for controlling a virtual weapon in a game provided by an embodiment of the present application;

[0023] Figure 3 This is one of the schematic diagrams of the operation interface of the method for controlling a virtual weapon in a game provided by an embodiment of the present application;

[0024] Figure 4 This is the second schematic diagram of the operation interface of the method for controlling a virtual weapon in a game provided by an embodiment of the present application;

[0025] Figure 5 This is a structural block diagram of an example of a control device for a virtual weapon in a game provided by an embodiment of the present application;

[0026] Figure 6 It is a structural block diagram of an example of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0028] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0029] In virtual games, there are often scenes of shooting with weapons. In order to make the game scenes more realistic, medium and long-range shooting weapons are often set with ballistic droop to simulate the shooting trajectory of the weapon after it is fired in the real world. Therefore, in the game, when the user controls the long-range weapon to aim at the object being shot, the weapon does not shoot along a straight line composed of the shooting point and the aiming point after being fired. There is often a deviation between the point hit by the weapon and the point aimed at. For example, the point aimed at is the head of the object being shot, but the point hit may be the ground. In this way, the best opportunity to eliminate the opponent will be lost in real-time combat games. Therefore, in the game, it becomes extremely important to use a weapon with ballistic droop to accurately hit the aimed point.

[0030] In the related art, in order to improve the hit rate of long-range weapon shooting, users often need to manually adjust the weapon shooting angle according to game experience so that the weapon can hit the aimed point with a high probability.

[0031] However, the user's familiarity with the game often affects the choice of shooting angle, and manually adjusting the shooting angle will consume a lot of time, thereby missing the best shooting time, causing long-range weapons to often fail to accurately hit the aimed point, resulting in a poor gaming experience for the user.

[0032] Based on the above reasons, in order to improve the hit rate of virtual weapon shooting and thus improve the user's gaming experience, the first embodiment of the present application provides a method for controlling virtual weapons in a game. The method is applied to an electronic device, which can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, a server, a terminal device, etc., or other electronic devices capable of performing data statistics, which is not specifically limited in the embodiments of the present application.

[0033] It can be understood that in the following description of the technical solution provided in the embodiment of the present application, the server is used as an example of the execution subject. In other possible implementations, other electronic devices can also be used as execution subjects to execute the technical solution provided in the embodiment of the present application. The embodiment of the present application does not limit the type of execution subject.

[0034] In order to more clearly demonstrate the present application, the application scenarios of the control method of virtual weapons in the game provided in the embodiments of the present application are introduced below.

[0035] like Figure 1 As shown, it is an application scenario architecture diagram of the control method of virtual weapons in the game provided by the embodiment of the present application, and the application scenario may include at least one terminal 101, at least one server 102, and at least one database 103, and the terminal 101, the server 102 and the database 103 are connected through a network. The terminal 101 includes but is not limited to a desktop computer, a laptop computer, a mobile phone, a tablet computer, a server, a terminal device, etc., the server 102 may be a server device and other devices that provide computing, storage and other functions for the client, and the network may be a wireless network or a wired network, such as a wireless network such as a wireless local area network (WLAN), a local area network (LAN), a cellular network, a 2G network, a 3G network, a 4G network, a 5G network, etc., and the database 103 may provide data storage for the data or logs generated in the game. When the application scenario includes multiple terminals, multiple servers, and multiple networks, different terminals and different servers may be connected to each other through different networks.

[0036] Among them, the terminal 101 is any device with computing hardware that can support and execute software application products corresponding to the game. Game software application products include, but are not limited to, any one of a third-person shooter game application, a single-player game application, and a multiplayer online tactical competitive game (Multiplayer Online Battle Arena Games, Moba) application. The types of the above games may include, but are not limited to, at least one of the following: two-dimensional (Two Dimension, 2D) game application, three-dimensional (Three Dimension, 3D) game application, virtual reality (Virtual Reality, VR) game application, augmented reality (Augmented Reality, AR) game application, mixed reality (Mixed Reality, MR) game application. The above is just an example, and this embodiment does not impose any limitation on this.

[0037] One of the at least one terminals 101 is referred to as a first terminal. The first terminal may be a terminal used by a certain user. The user uses the first terminal to operate a virtual object in a virtual game scene to perform an activity, which includes but is not limited to: adjusting body posture, crawling, walking, running, jumping, driving, picking up, shooting, attacking, and throwing. In addition, the terminal may have one or more multi-touch screens for sensing and obtaining input of a user through a touch or sliding operation performed at multiple points on one or more touch-sensitive display screens. The terminal may also be connected to a keyboard and / or a mouse and / or a game controller, so that the user can perform interface operations through the keyboard and / or the mouse and / or the game controller. In addition, different terminals may also use their own Bluetooth network or hotspot network to connect to other terminals or to a server, etc. In addition, the system may include multiple databases, multiple databases are coupled to different servers, and information related to the game environment may be continuously stored in the database when different users play multi-user games online.

[0038] The embodiments of the present application are explained using weapons in a game as an example. The control method of virtual weapons in the above game is applied to a terminal (device) used by a game operator (current user). The user controls the virtual objects in the game scene to complete various actions through a touch display device on the terminal or a control device connected to the terminal, such as a smartphone touch screen, a PAD touch screen, other touch-type interactive display screens, a keyboard, a mouse, and a game controller.

[0039] Next, combine Figure 2, a method for controlling a virtual weapon in a game provided by an embodiment of the present application is described in detail, the method providing a graphical user interface through a terminal device, the graphical user interface displays at least part of a virtual game scene, the virtual game scene includes at least a virtual weapon, and the virtual weapon is used to respond to a shooting operation to fire a sub-weapon into the virtual game scene, Figure 2 This is a flowchart of a method for controlling a virtual weapon in a game provided in an embodiment of the present application.

[0040] like Figure 2 As shown, the control method of virtual weapons in the game provided by the present application includes steps S201 to S203.

[0041] Step S201: In response to an aiming operation on the virtual weapon, a first aiming direction for indicating a shooting direction of the virtual weapon is determined in the virtual game scene.

[0042] It is understandable that the virtual game scene includes a two-dimensional virtual game scene, a three-dimensional virtual game scene, etc. The scene can be displayed on the display (or display screen) of the terminal held by the user. The virtual game scene can include a virtual weapon for corresponding shooting operations to launch sub-weapons into the game scene. In addition, the virtual game scene can also include virtual objects. It should be noted that in a first-person virtual game, the virtual object displayed on the game interface held by the user is a virtual object operated by other users. In a third-person virtual game, the virtual object displayed on the game interface held by the user can include a first virtual object operated by the user, and a second virtual object in the virtual game scene. The second virtual object can be a virtual object operated by another user, or a virtual object set in the game that is not controlled by the user. When the first virtual object and the second virtual object are virtual objects operated by different users, the first virtual object and the second virtual object can be virtual objects in a competitive hostile relationship in the virtual game scene.

[0043] Among them, the virtual weapon in the virtual game includes a virtual cavity, which is used to accommodate the sub-weapons to be fired. For example, when the virtual weapon is a virtual gun, the virtual cavity is the virtual gun chamber for storing the virtual bullets to be fired in the virtual gun; when the virtual weapon is a virtual crossbow, the virtual cavity is the virtual arrow slot for storing the bow and arrow to be fired in the virtual crossbow. In the game props, a virtual weapon can correspond to at least one sub-weapon, which is used to match and perform corresponding shooting operations. Virtual objects in virtual games refer to objects that do not exist in reality, and can be fictional objects in creative works such as TV series, movies, comics, games, etc. Virtual objects can include but are not limited to virtual characters, virtual animals, etc. Virtual characters can be male, female, or elderly, children, etc. This application does not specifically limit this.

[0044] The displayed virtual game scene can be a virtual game scene of a shooting game, or a shooting scene in a battle game, including but not limited to a stand-alone battle game and a real-time battle game. In the displayed virtual game scene, the user can operate the virtual object to use the virtual weapon to perform a shooting operation. Before the shooting operation, the aiming operation can be performed in advance. The shooting object of the aiming operation can be any element existing in the virtual game scene, such as a person, an animal, a plant, a car, a house, etc. In order to more clearly demonstrate the control method of the virtual weapon in the game provided by the embodiment of the present application, in the subsequent steps, the shooting operation of the first virtual object at the second virtual object in the real-time battle game is used as an example for explanation.

[0045] In this virtual game scene, there is a second virtual object in the field of view of the first virtual object (that is, there is a second virtual object on the display of the terminal held by the user operating the first virtual object), and the position of the second virtual object is within the attackable range of the first virtual object, and the attackable range refers to a maximum range that is not greater than the first virtual object can attack with the help of virtual weapons.

[0046] In this step, a first aiming direction for indicating the shooting direction of the virtual weapon can be determined in the virtual game scene through an aiming operation on the virtual weapon. For example, when the first virtual object uses a virtual gun to aim at the head of the second virtual object, the first aiming direction is the straight line direction from the virtual gun to the head of the second virtual object. In actual applications, when a virtual weapon is used for aiming operation, the virtual weapon is usually provided with a crosshair, and the crosshair can be aimed at a certain part of the object to be shot indicated by the aiming operation for subsequent shooting operations, that is, the first aiming direction can be understood as the straight line direction from the virtual weapon to the crosshair in the virtual game.

[0047] Step S202: In response to a shooting operation directed at the virtual weapon, the first aiming direction is corrected according to a pre-specified lifting angle to obtain a target aiming direction for the virtual weapon.

[0048] In actual applications, aiming and shooting operations can be understood as two specific operations of a shooting action. After the aiming operation is completed, the user can click the corresponding control to trigger the first virtual object to use the virtual weapon to perform a shooting operation, and finally complete the shooting action. Specifically, when the user who operates the first virtual object plays a game on the terminal device he holds, he can perform a shooting operation on the second virtual object in the attackable range. The triggering of the shooting operation can include but is not limited to a game controller, a mouse, a keyboard, a display control on a touch-sensitive screen, and a specific action on the touch-sensitive screen.

[0049] Since virtual weapons in virtual games are often set with ballistic droop to simulate the shooting trajectory of weapons after being fired in the real world, when the user manipulates the virtual weapon to aim at the object being shot and shoots, the sub-weapon in the virtual weapon often experiences ballistic droop after leaving the virtual weapon, and the shooting trajectory is a parabola. Therefore, in this step, when the user triggers the shooting operation, the first aiming direction determined in step S201 can be corrected according to the pre-specified lifting angle to obtain the target aiming direction for the virtual weapon. The target aiming direction can be understood as the actual firing direction of the sub-weapon after the shooting operation, so that the sub-weapon can successfully hit the object being shot along the target aiming direction.

[0050] Typically, the target aiming direction is a first aiming direction with a lift angle added thereto, and the added lift angle can be used to offset the trajectory droop that occurs when the sub-weapon is fired from the virtual weapon, so that the first aiming direction aimed at by the virtual weapon can be corrected to a target aiming direction for offsetting the trajectory droop. The lift angle can be obtained based on historical data generated by the shooting operation performed by the user, or can be a lift angle that the user customizes for the virtual weapon when acquiring the virtual weapon, and this application does not specifically limit this.

[0051] Step S203: Control the virtual weapon to launch the sub-weapon in the direction of the target, so as to shoot in the direction of the target.

[0052] In this step, the direction aimed at by the virtual weapon is the direction of the line between the virtual weapon and the object being shot. That is to say, in the shooting operation of the present application, the user operating the first virtual object does not change the direction aimed at by the virtual weapon, but the system adjusts the firing direction of the sub-weapon after the sub-weapon is fired from the virtual weapon according to the aiming operation and shooting operation triggered by the user. Specifically, after the lifting angle used to offset the ballistic droop of the sub-weapon is determined according to the shooting information of the shooting operation, when the sub-weapon leaves the weapon to be fired, the lifting angle is automatically increased for the sub-weapon, so that the angle between the initial firing direction of the sub-weapon and the direction aimed at by the weapon is the lifting angle. In this way, the sub-weapon can be fired from the virtual weapon according to the target aiming direction and accurately hit the object being shot indicated in the aiming operation.

[0053] The control method of a virtual weapon in a game provided by the present application provides a graphical user interface through a terminal device, wherein at least part of a virtual game scene is displayed in the graphical user interface, and the virtual game scene includes at least a virtual weapon, and the virtual weapon is used to respond to a shooting operation to launch a sub-weapon into the virtual game scene, and respond to an aiming operation for the virtual weapon, and determine a first aiming direction for indicating the shooting direction of the virtual weapon in the virtual game scene; respond to the shooting operation for the virtual weapon, and correct the first aiming direction according to a pre-specified lifting angle to obtain a target aiming direction for the virtual weapon; and control the virtual weapon to launch the sub-weapon in the target aiming direction to shoot in the target aiming direction. Since when the virtual weapon is shot, the first aiming direction corresponding to the aiming operation is corrected to the target aiming direction according to a pre-set lifting angle, the sub-virtual weapon can launch the sub-weapon in the target aiming direction to offset the trajectory droop that occurs after the sub-weapon is fired.

[0054] It can be seen that the control method of the virtual weapon in the game provided by the present application can automatically correct the direction of the first aiming direction indicated by the aiming operation when the user triggers the aiming operation and shooting operation of the virtual weapon, without the user having to manually adjust the shooting direction of the virtual weapon before performing the shooting operation. This can improve the hit rate of the sub-weapon hitting the shot object when the virtual weapon is performing the shooting operation, and at the same time avoid the user missing the best shooting time due to manual adjustment of the shooting direction, thereby improving the user's gaming experience.

[0055] Optionally, before step S202, the method for controlling a virtual weapon in a game provided in the embodiment of the present application may also obtain a pre-specified lifting angle by any of the following steps S301 to S302.

[0056] Step S301: Determine a pre-specified lifting angle corresponding to the virtual weapon according to the shooting trajectory of the sub-weapon in the training data.

[0057] Step S302: Obtain a preset correction angle corresponding to the virtual weapon, and determine the preset correction angle as a pre-specified lifting angle.

[0058] In the method provided in step S301, the training data is the data generated by shooting with the virtual weapon in the training mode. In the virtual game, the game modes correspond to the training mode and the battle mode. The user can be familiar with the game skills and the operation of the virtual weapon in the training mode. In this application, the training data obtained after the user shoots the virtual weapon in the training mode includes the shooting trajectory of the sub-weapon. The shooting trajectory is a line composed of the moving position of the sub-weapon in the game scene from the time the sub-weapon leaves the virtual weapon to the time the sub-weapon hits the object being shot.

[0059] In step S301, the degree of ballistic droop of the sub-weapon after it leaves the virtual weapon can be determined based on the shooting trajectory of the sub-weapon, and the angle used to offset the ballistic droop can be determined based on the degree of ballistic droop. The angle used to offset the ballistic droop is used as a pre-specified lifting angle corresponding to the virtual weapon. When the virtual weapon is used to perform shooting operations in the combat mode, the first aiming direction of the virtual weapon can be corrected according to the pre-specified lifting angle determined in the training mode to obtain the target aiming direction used to offset the ballistic droop.

[0060] In the method provided in step S302, each virtual weapon in the virtual game scene is provided with a corresponding preset correction angle, and the preset correction angle is used to offset the ballistic droop of the sub-weapon when the virtual weapon is performing a shooting operation. Since the degree of ballistic droop of different virtual weapons may be different, for example, the degree of ballistic droop of the virtual bullet corresponding to the virtual gun may be less than the degree of ballistic droop of the virtual arrow corresponding to the virtual bow and arrow. Therefore, the preset correction angles corresponding to different virtual weapons may be different. When performing a shooting operation, the virtual weapon used in the shooting operation can be pre-identified, and the preset correction angle corresponding to the virtual weapon can be obtained, and the preset correction angle is determined as the pre-specified lifting angle of the virtual weapon in the shooting operation, so as to correct the first aiming direction of the virtual weapon to obtain the target aiming direction for offsetting the ballistic droop.

[0061] Specifically, step S301 can be implemented according to the following steps:

[0062] The initial firing direction of the sub-weapon when the sub-weapon leaves the virtual weapon and the final orientation direction of the sub-weapon in the firing trajectory of the sub-weapon in the training data are obtained; and a pre-specified lifting angle corresponding to the virtual weapon is determined according to the angle between the initial firing direction and the final orientation direction.

[0063] It can be understood that in the shooting trajectory of the sub-weapon, the initial firing direction of the sub-weapon is the orientation of the sub-weapon when the sub-weapon leaves the virtual weapon, and the final orientation of the sub-weapon is the orientation of the sub-weapon when the sub-weapon hits the object being shot. The angle of the sub-weapon's trajectory droop can be obtained according to the changes in the initial firing direction and the final orientation of the sub-weapon. The angle of the trajectory droop is determined as the pre-specified lifting angle corresponding to the virtual weapon, so as to correct the first aiming direction of the virtual weapon, and the target aiming direction can be obtained to offset the trajectory droop that occurs after the sub-weapon leaves the virtual weapon.

[0064] In this application, the angle of the sub-weapon trajectory droop is the angle between the initial launch direction and the final orientation direction. Since the training data is training data in big data, the angle between the initial launch direction and the final orientation direction obtained for the same virtual weapon may be different. In this application, the average value or median of the obtained angles or the angle with the most occurrences can be determined as the pre-specified lifting angle corresponding to the virtual weapon, and this application does not specifically limit this.

[0065] Optionally, step S201 can be implemented according to the following steps S303 to S304:

[0066] Step S303: In response to the aiming operation on the virtual weapon, shooting information is obtained, the shooting information including: the launch point position of the sub-weapon in the virtual game scene, and the position to be shot aimed at by the aiming operation.

[0067] Step S304: Determine the straight line direction from the launch point position to the to-be-shot position as a first aiming direction for indicating the shooting direction of the virtual weapon.

[0068] In actual applications, when the user operating the first virtual object triggers a shooting operation on the second virtual object, shooting information of the shooting operation can be obtained. The shooting information may include but is not limited to the launch point position of the sub-weapon in the virtual game scene, and the position to be shot by the aiming operation.

[0069] The launch point position may be the current position of the first virtual object operated by the user, or the position where the sub-weapon leaves the weapon when the first virtual object uses the virtual weapon to perform a shooting operation. For example, when the user operates the first virtual object to use a gun to shoot the second virtual object, the launch point position may be the position of the first virtual object or the position of the bullet launch point. In the subsequent steps of the embodiment of the present application, the position where the sub-weapon is fired is used as the launch point position for explanation, which is not intended to limit the present application.

[0070] The position to be shot is the position of the point at which the weapon is aimed when the user operates the first virtual object to perform the aiming operation. For example, when the second virtual object is a virtual character, the position to be shot can be the position of the head of the second virtual object at which the user operates the first virtual object to use the weapon to aim. In actual applications, the position to be shot selected for the shooting operation is to better shoot the second virtual object, thereby defeating the opponent to a greater extent. When the sub-weapon hits the position to be shot, it can be considered that the user has successfully completed the shooting operation by operating the first virtual object.

[0071] In a virtual game, a position can be represented by coordinates (x, y, z) or longitude and latitude, so each point in the virtual game scene has a unique position identifier, and the positions of the first virtual object and the second virtual object can be obtained in real time.

[0072] It can be understood that the launch point position is the firing point position of the sub-weapon, and the to-be-hit position is the expected hitting point position of the sub-weapon (also called the impact point position). Therefore, based on the launch point position and the to-be-hit position, the lifting angle used to offset the ballistic sag of the sub-weapon can be determined. In this way, when the sub-weapon is fired from the launch point position according to the determined lifting angle, it can accurately hit the to-be-hit position.

[0073] Through this step, the lifting angle of the sub-weapon when it is fired can be determined based on the initial shooting position and the final impact position of the sub-weapon, and this lifting angle can offset the ballistic droop of the sub-weapon during the shooting process.

[0074] Optionally, the shooting information in step S303 also includes the weapon category.

[0075] It is understandable that in virtual games, there are various virtual shooting weapons, such as guns, bows and arrows, bird guns, etc., among which there are multiple types of guns, such as sniper rifles, shotguns, rifles, etc., and the shooting distances corresponding to different weapons are not the same. The virtual object has at least one virtual weapon in the virtual game scene. In the process of playing the game, the virtual object can use at least one virtual weapon to attack the enemy object at the same time. Therefore, for different game scenes, users who operate virtual objects can choose different weapons for shooting operations. For example, for the position to be shot far away from the virtual object, a long-range bow and arrow can be used for shooting, and for the position to be shot close to the virtual object, a rifle can be used for shooting.

[0076] As an implementation mode, in the embodiment of the present application, virtual weapons can also be intelligently recommended to users. At least one virtual weapon can be intelligently recommended based on the position of the first virtual object and the position of the second virtual object operated by the user in the current scene. The recommended virtual weapon is the virtual weapon in the prop backpack of the virtual object operated by the user.

[0077] In virtual games, different weapon types have different speeds of trajectory droop, which is usually related to the initial velocity of the sub-weapon when it is fired from the weapon. Different types of weapons may have different initial velocities, so the speed of trajectory droop is also different. The speed of trajectory droop will cause the deviation between the point where the weapon is shot and the point where it hits to be different. The faster the initial velocity of the weapon, the slower the trajectory droop, and vice versa. Therefore, for different weapon types, the lifting angle used to offset the trajectory droop of the sub-weapon is different.

[0078] Accordingly, before step S202, the method for controlling a virtual weapon in a game provided by the embodiment of the present application further includes the following steps S305 to S306:

[0079] Step S305: Calculate the target distance between the launch point position and the position to be shot.

[0080] Step S306: Based on the correspondence between the preset distance and the lifting angle, determine the lifting angle corresponding to the target distance, and use the determined lifting angle as the pre-specified lifting angle.

[0081] Since the shooting information also includes the weapon category, step S306 can be implemented according to the following steps: based on the corresponding relationship between the preset distance and the lifting angle corresponding to the weapon category, determine the lifting angle corresponding to the target distance.

[0082] In a specific embodiment, the difference in distance between the launch point position and the position to be hit will result in different degrees of trajectory droop, that is, different degrees of deviation between the point hit by the sub-weapon and the point aimed at by the weapon. Generally, the smaller the distance between the launch point position and the position to be hit, the smaller the deviation between the point aimed at by the weapon and the point hit by the sub-weapon, and vice versa, the greater the deviation between the point aimed at by the weapon and the point hit by the sub-weapon. Therefore, in step S301, the target distance between the launch point position and the position to be hit can be calculated, and the lifting angle can be determined according to the target distance.

[0083] It can be understood that the distance between the launch point position and the position to be hit includes a horizontal distance and a vertical distance, and the horizontal distance and the vertical distance between the launch point position and the position to be hit can be calculated based on the coordinates of the launch point position and the coordinates of the position to be hit, or the longitude and latitude of the launch point position and the longitude and latitude of the position to be hit. The lifting angle used to offset the trajectory droop of the sub-weapon can be determined based on the horizontal distance and the vertical distance.

[0084] Generally, the horizontal distances between the launch point position and the position to be shot in different situations in the virtual game scene are quite different, and the launch point position and the position to be shot are often on the same horizontal line (the ground in the game scene), so the vertical distances between the launch point position and the position to be shot in different situations are relatively small. In the subsequent steps of the embodiment of the present application, the lifting angle is determined by taking the horizontal distance as an example for explanation, which is not intended to limit the present application.

[0085] In step S306, the corresponding lifting angle is determined according to the target distance based on the preset correspondence between the distance and the lifting angle. In addition to the distance and the lifting angle, the preset correspondence also includes the weapon category, that is, the preset correspondence is the correspondence between the distance and the lifting angle under a certain weapon category, which can be preset by the user in advance, and the preset correspondence between the distance and the lifting angle can be customized in advance by the user based on the game experience. At the end of each real-time battle game, the data of the shooting operation performed by the user in this game can be obtained, and the correspondence between the distance and the lifting angle can be set according to the obtained data.

[0086] Specifically, for a shooting operation that successfully hits the corresponding position to be shot, the lifting angle of the sub-weapon when it is initially fired is obtained, and the corresponding relationship between the distance between the launch point position and the position to be shot and the lifting angle is recorded; for a shooting operation that fails to successfully hit the position to be shot, the user can view the deviation between the final hit point and the position to be shot in the shooting operation, and customize the lifting angle corresponding to the distance in the shooting operation based on this deviation. For example, if the final hit point is below the position to be shot, the customized lifting angle can be the lifting angle of the sub-weapon when it is initially fired in the shooting operation plus a certain angle; if the final hit point is above the position to be shot, the customized lifting angle can be the lifting angle of the sub-weapon when it is initially fired in the shooting operation minus a certain angle, and the adjustment of the specific angle can be customized based on the user's gaming experience. This application does not specifically limit this.

[0087] Through this technical means, the distance between the launch point position and the position to be hit is calculated, and then the lifting angle of the sub-weapon when it is fired is determined according to the corresponding relationship between the preset distance and the lifting angle. Since the preset corresponding relationship is the corresponding data that can successfully hit the position to be hit, the lifting angle that can offset the trajectory droop of the sub-weapon and hit the position to be hit can be accurately obtained through the preset corresponding relationship, thereby improving the hit rate of the sub-weapon hitting the object to be shot when the virtual weapon is performing a shooting operation.

[0088] Optionally, before step S306, the corresponding relationship between the distance and the lifting angle may be obtained in the training mode, so the control method of the virtual weapon in the game provided in the embodiment of the present application further includes steps S307 to S309:

[0089] Step S307: acquiring a first distance between the launch point position of the sub-weapon and the bull's eye when the sub-weapon hits the bull's eye during shooting training using the virtual weapon in the training mode.

[0090] Step S308: Determine the preset lifting angle corresponding to the first distance according to the angle between the first straight line and the second straight line when the bull's eye is hit, the first straight line is a straight line formed by the launch point position of the sub-weapon and the bull's eye when the bull's eye is hit, and the second straight line is a straight line formed by the launch point position of the sub-weapon and the aimed point when the bull's eye is hit.

[0091] Step S309: determining a correspondence between preset distances and lifting angles based on the preset lifting angles corresponding to the first distances.

[0092] In the training mode, the user can select training information, which includes: the distance between the bull's eye and the training virtual object, the weapon category, and conduct different shooting training according to different training information. Specifically, multiple shooting trainings are conducted for the same training information, that is, multiple shooting trainings are conducted for the same distance and the same weapon. For example, the user operates the training virtual object to use weapon A to directly aim at the bull's eye to shoot, so as to know the degree of trajectory droop corresponding to the weapon category and distance, and then aim weapon A at a position above the bull's eye to shoot at an angle, etc., until the sub-weapon hits the bull's eye, and the angle between the first straight line and the second straight line is recorded, wherein the first straight line is the straight line formed by the launch point position and the bull's eye when hitting the bull's eye, and the second straight line is the straight line formed by the launch point position and the aimed point when hitting the bull's eye, and the angle is used as the preset lifting angle under the current first distance and the current weapon category. In this way, the preset lifting angle corresponding to different distances under the same weapon category can be obtained.

[0093] For the same weapon type, you can train multiple distances according to the current weapon's range. For example, for weapon A with a range of 60m, you can train shooting at distances from 0m to 60m, and you can select to train shooting every 5m, and train shooting at the bull's eye at distances of 5m, 10m, 15m...60m, and get the preset lift angles corresponding to each distance. The more data you train, the greater the chance of accurately hitting the target point in real-time combat.

[0094] The system can record the correspondence between weapon-distance-preset lifting angle in the game log.

[0095] It is understandable that the preset correspondence relationship may include the correspondence relationship between multiple different distances and preset lifting angles under a certain weapon category obtained by historical users in shooting training in training mode. After a user selects the training information of weapon category and distance, the system can also detect whether the training information of this type has a preset correspondence relationship, that is, whether the training information of this type has been trained by other users. If it is detected that the training information of this type has been trained, the system can directly recommend the lifting angle. The user can select the recommended lifting angle for shooting training based on this. If the user does not hit the bull's eye accurately when shooting with the recommended lifting angle, the user can perform at least one more shooting training to obtain the lifting angle when accurately hitting the bull's eye, and the updated lifting angle can be added to the preset correspondence relationship.

[0096] Through this technical means, the correspondence between the first distances between the launch point position and the bull's eye and the preset lifting angles when a certain weapon category can accurately hit the bull's eye at multiple different distances is obtained in the training mode, so that when performing shooting operations in the actual combat mode, the lifting angle can be determined according to the corresponding relationship, so that the sub-weapon can hit the to-be-shot position with a high probability.

[0097] Optionally, in order to more accurately hit the to-be-shot position in the actual combat mode, the user operating the first virtual object may use the first virtual object for shooting training in the training mode to obtain the corresponding relationship trained by the first virtual object.

[0098] Optionally, step S306 can be implemented according to steps S310 to S311.

[0099] Step S310: When the lifting angle corresponding to the target distance is found in the correspondence between the preset distance and the lifting angle, the lifting angle corresponding to the target distance is selected from the correspondence.

[0100] Step S311: When the lifting angle corresponding to the target distance is not found in the corresponding relationship, determine the second distance closest to the target distance from the corresponding relationship, and determine the lifting angle corresponding to the target distance according to the lifting angle corresponding to the second distance in the corresponding relationship.

[0101] It can be understood that when the user operates the first virtual object in real-time combat, if the lifting angle corresponding to the distance between the current launch point position and the position to be hit is found in the corresponding relationship corresponding to the current weapon category, the lifting angle can be selected from the corresponding relationship as the lifting angle when the sub-weapon is fired during this shooting operation to perform the shooting operation.

[0102] However, in actual applications, since there are many possible distances between the launch point and the position to be shot in real-time combat scenarios, there may be a situation where the current target distance has not been trained in the training mode, that is, the lift angle corresponding to the target distance is not found in the preset correspondence. At this time, in order to enable the sub-weapon to hit the position to be shot with a high probability, the lift angle corresponding to the target distance that has not been trained can be intelligently recommended based on the preset existing correspondence. The following provides two ways to intelligently recommend the lift angle corresponding to the target distance.

[0103] Method 1: The second distance closest to the target can be determined from the preset corresponding relationship. The second distance closest to the target is the distance with the smallest difference with the target distance in the preset corresponding relationship. The lifting angle corresponding to the target distance is determined according to the lifting angle corresponding to the second distance in the preset corresponding relationship.

[0104] Specifically, the lifting angle corresponding to the target angle is determined based on the lifting angle determination principle, and the lifting angle determination principle is: the difference between the determined lifting angle and the lifting angle corresponding to the second distance is proportional to the difference between the target distance and the second distance. For example, the target distance for shooting operation in a real-time combat scene is 27m, and the second distance closest to the target distance in the preset distance-lifting angle correspondence relationship of the weapon used in the shooting operation is 25m. In the preset correspondence relationship, the lifting angle corresponding to the second distance of 25m is 10°, then it can be intelligently recommended that the lifting angle is 11° when the target distance is 27m. The lifting angle recommended according to the second distance closest to the target distance can hit the position to be shot with a high probability.

[0105] Method 2: According to the target distance, the third distance and the fourth distance can be determined from the preset corresponding relationship, wherein the third distance is a distance in the preset corresponding relationship that is smaller than the target distance and has the smallest difference with the target distance, and the fourth distance is a distance in the preset corresponding relationship that is larger than the target distance and has the smallest difference with the target distance, and the lifting angle corresponding to the target distance is determined according to the lifting angle corresponding to the third distance and the lifting angle corresponding to the fourth distance in the preset corresponding relationship. In other words, method 2 is to determine the distance interval in the trained information according to the target distance, and then determine the lifting angle interval from the preset corresponding relationship, and determine the lifting angle of the target distance according to the lifting angle interval.

[0106] Specifically, in method two, the lifting angle corresponding to the target angle can be determined according to another lifting angle determination principle. The other lifting angle determination principle is: the difference between the determined lifting angle and the lifting angle corresponding to the third distance is proportional to the difference between the target distance and the third distance, and the difference between the lifting angle and the lifting angle corresponding to the fourth distance is proportional to the difference between the target distance and the fourth distance.

[0107] For example, in a real-time combat scenario, the target distance for a shooting operation is 24m. In the preset distance-lifting angle correspondence of the weapon used in the shooting operation, the third distance is determined to be 20m and the fourth distance is 25m. From the preset correspondence, the lifting angle range can be determined to be (a°, b°), wherein a° is the lifting angle corresponding to the third distance, and b° is the lifting angle corresponding to the fourth distance. The lifting angle c° corresponding to the target distance of 24m is an angle between a° and b°. Since the target distance is close to the fourth distance, the lifting angle c° corresponding to the target distance of 24m is closer to the lifting angle b° corresponding to the fourth distance.

[0108] Through the above two methods, the lifting angle corresponding to the target distance that has not been trained can be determined, so that the control method of the virtual weapon in the game provided by the embodiment of the present application is more flexible and feasible, thereby improving the user's gaming experience.

[0109] like Figure 3 1 is one of the operation interface schematic diagrams of the control method of the virtual weapon in the game provided by the embodiment of the present application. The interface is one of the game interfaces displayed by the terminal device held by the user operating the first virtual object 312. In the virtual game scene, there is a second virtual object 313. In response to the shooting operation of the second virtual object 313 triggered by the user operating the first virtual object 312, shooting information of the shooting operation is obtained. The shooting information at least includes a launch point position 314, a position to be shot 315, and the selected weapon category is a sniper rifle. When the user operating the first virtual object 312 When the user selects weapon 317 (sniper rifle) to aim at the to-be-shot position 315 of the second virtual object 313 for shooting, the sub-weapon 316 automatically increases the lifting angle 318 when leaving the virtual weapon 317, 318 being the angle between the straight line 319 and the straight line 320, wherein 319 is the direction aimed at by the virtual weapon 317, and 320 is the direction in which the sub-weapon 316 is shot. Then, the sub-weapon 316 is shot out from the virtual weapon 317 at a shooting direction with a lifting angle 318 to the straight line 319, and hits the to-be-shot position 315, and the shooting trajectory of the sub-weapon is 321.

[0110] Optionally, the control method of a virtual weapon in a game provided in an embodiment of the present application further includes the following steps: when the target distance does not exist in the corresponding relationship, determining a second distance with the smallest difference from the target distance from the corresponding relationship; determining and displaying an optimal launch point position in the virtual game scene, the optimal launch point position being a position that is the second distance away from the position to be shot and is closest to the launch point position of the shooting operation.

[0111] In order to make the shooting operation in real-time combat more accurate and the hit rate higher, in a specific implementation, when there is no target distance in the corresponding relationship, that is, the target distance is an untrained distance, after the user operating the first virtual object triggers the shooting operation, the present application can also recommend the best launch point position in the current scene to perform a more accurate secondary shooting after the first shooting operation. In this way, when the first shooting operation does not hit the position to be shot, the user operating the first virtual object can also perform a secondary shooting according to the recommended best launch point position.

[0112] The optimal shooting position is the launch point position calculated according to the distance that has been trained in the training mode in the preset corresponding relationship. Specifically, the second distance with the smallest difference from the target distance is determined from the preset corresponding relationship, and at least one optimal launch point position is determined and displayed in the virtual game scene. Among them, the optimal launch point position is the position that is the second distance away from the position to be shot and is closest to the launch point position of the shooting operation. In this way, the user can control the first virtual object to move to the optimal shooting position to perform a secondary shot on the position to be shot, and the corresponding lifting angle when the secondary shooting operation sub-weapon is fired is the lifting angle corresponding to the second distance in the preset corresponding relationship.

[0113] like Figure 44. As shown in FIG. 2, it is a second schematic diagram of an operation interface of a control method for a virtual weapon in a game provided by an embodiment of the present application. The interface is a second game interface displayed by a terminal device held by a user operating a first virtual object 401. In a virtual game scene, there is a second virtual object 403. In response to a first shooting operation on the second virtual object 403 triggered by a user operating the first virtual object 401, shooting information of the first shooting operation is obtained. The shooting information at least includes a launch point position 404 and a position to be shot 403. Then, the launch point position 404 and the position to be shot 403 can be calculated. When it is detected that the lifting angle corresponding to the target distance 406 does not exist in the preset corresponding relationship, a second distance with the smallest difference from the target distance 406 can be determined in the preset corresponding relationship, and the best launch point position 405 is determined and displayed near the launch point position 404 according to the determined second distance, and the distance 407 between the best launch point position 405 and the position to be shot 403 is the second distance. In this way, after the first shooting operation, the user operating the first virtual object can perform a second shooting operation based on the displayed best launch point position operation. In this way, when the first shooting operation fails to successfully hit the position to be shot, a more accurate second shooting can be quickly performed, which can ensure that the position to be shot is hit with a high probability.

[0114] Optionally, when the training data of the virtual weapon in the training mode includes multiple training data obtained when multiple training virtual objects use the virtual weapon for shooting training, step S308 can be implemented according to the following steps: obtain the angle between the first straight line and the second straight line when the sub-weapon hits the bull's eye when each of the training virtual objects uses the virtual weapon for shooting training in a target training state, and the target training state is: the distance between the launch point position of the sub-weapon and the bull's eye when the training virtual object uses the virtual weapon for shooting training is the first distance; determine the angle that appears the most times among the angles as the lifting angle corresponding to the first distance, or determine the average value of the angles as the lifting angle corresponding to the first distance.

[0115] It is understandable that in actual applications, different users may conduct different shooting training for the same distance under the same weapon category. The different gaming habits of different users may cause slight differences in the lifting angles obtained by different users for the same distance under the same weapon category. That is, the same distance under the same weapon category may correspond to multiple lifting angles. The angle that appears most frequently among the multiple lifting angles can be determined as the lifting angle corresponding to the distance, or the average of the multiple lifting angles can be determined as the lifting angle corresponding to the distance.

[0116] Through this technical means, a one-to-one correspondence is established between the distance and the lifting angle under the same weapon category in the preset correspondence, which reduces data redundancy and enables the corresponding to-be-shot position to be accurately hit according to the preset correspondence.

[0117] Optionally, when the lifting angle corresponding to the target distance is not found in the corresponding relationship, the control method of the virtual weapon in the game provided by the embodiment of the present application further includes the following steps:

[0118] When the sub-weapon hits the to-be-shot position, the corresponding relationship between the lifting angle of the sub-weapon when it is fired and the target distance is added to the corresponding relationship.

[0119] It can be understood that when the target distance of the shooting operation performed in real-time combat is an untrained distance, when the position to be shot is hit according to the intelligently recommended lifting angle, the intelligently recommended lifting angle is a lifting angle that can accurately hit the position to be shot, and the relationship between the lifting angle and the target distance is added to the corresponding relationship.

[0120] When the intended shooting position is not hit according to the intelligently recommended lifting angle, the user operating the first virtual object can select the weapon category and distance corresponding to the shooting operation when the intended shooting position is not hit in real-time combat in the training mode for shooting training, so as to obtain the lifting angle when the sub-weapon is fired that can hit the center of the bull's eye, and add the corresponding relationship between the lifting angle and the target distance to the corresponding relationship.

[0121] Corresponding to the control method of virtual weapons in the game provided by the first embodiment of the present application, as shown in FIG. Figure 5 As shown, the second embodiment of the present application further provides a control device 500 for a virtual weapon in a game, the device provides a graphical user interface through a terminal device, the graphical user interface displays at least part of a virtual game scene, the virtual game scene includes at least a virtual weapon, the virtual weapon is used to respond to a shooting operation to launch a sub-weapon into the virtual game scene, the device 500 includes:

[0122] A determination unit 501 is used to respond to an aiming operation on the virtual weapon and determine a first aiming direction for indicating a shooting direction of the virtual weapon in the virtual game scene;

[0123] A correction unit 502, configured to respond to a shooting operation on the virtual weapon and correct the first aiming direction according to a pre-specified lifting angle to obtain a target aiming direction for the virtual weapon;

[0124] The control unit 503 is used to control the virtual weapon to launch the sub-weapon in the direction of the target so as to shoot in the direction of the target.

[0125] Optionally, the determination unit 501 is also used to: determine a pre-specified lifting angle corresponding to the virtual weapon based on the shooting trajectory of the sub-weapon in the training data, the training data being data generated by shooting with the virtual weapon in the training mode; or, obtain a preset correction angle corresponding to the virtual weapon, and determine the preset correction angle as a pre-specified lifting angle, wherein each virtual weapon in the virtual game scene is provided with a corresponding preset correction angle.

[0126] Optionally, the determination unit 501 is also specifically used to: obtain the initial firing direction of the sub-weapon when the sub-weapon leaves the virtual weapon from the shooting trajectory of the sub-weapon in the training data, and the final direction of the sub-weapon in the shooting trajectory of the sub-weapon; determine the pre-specified lifting angle corresponding to the virtual weapon according to the angle between the initial firing direction and the final direction.

[0127] Optionally, the determination unit 501 is specifically used to: respond to an aiming operation on the virtual weapon, obtain shooting information, the shooting information including: the launch point position of the sub-weapon in the virtual game scene, and the position to be shot aimed at by the aiming operation; determine the straight line direction from the launch point position to the position to be shot as a first aiming direction for indicating the shooting direction of the virtual weapon; calculate the target distance between the launch point position and the position to be shot; based on the correspondence between a preset distance and a lifting angle, determine the lifting angle corresponding to the target distance, and use the determined lifting angle as a pre-specified lifting angle.

[0128] Optionally, the determination unit 501 is also used to: obtain a first distance between the launch point position of the sub-weapon and the bull's eye when the sub-weapon hits the bull's eye when the virtual weapon is used for shooting training in the training mode; determine a preset lifting angle corresponding to the first distance according to an angle between a first straight line and a second straight line when the bull's eye is hit, the first straight line being a straight line formed by the launch point position of the sub-weapon and the bull's eye when the bull's eye is hit, and the second straight line being a straight line formed by the launch point position of the sub-weapon and the aimed point when the bull's eye is hit; determine the correspondence between the preset distances and the lifting angles based on the preset lifting angles corresponding to the first distances.

[0129] Optionally, the determination unit 501 is specifically used to: when the lifting angle corresponding to the target distance is found in the correspondence between the preset distance and the lifting angle, select the lifting angle corresponding to the target distance from the corresponding relationship; when the lifting angle corresponding to the target distance is not found in the corresponding relationship, determine the second distance with the smallest difference with the target distance from the corresponding relationship, and determine the lifting angle corresponding to the target distance according to the lifting angle corresponding to the second distance in the corresponding relationship.

[0130] Optionally, the determination unit 501 is also specifically used to: determine the lifting angle corresponding to the target angle based on a lifting angle determination principle, and the lifting angle determination principle is: the difference between the determined lifting angle and the lifting angle corresponding to the second distance is proportional to the difference between the target distance and the second distance.

[0131] Optionally, the determining unit 501 is further configured to: when the target distance does not exist in the corresponding relationship, determine a second distance having a minimum difference with the target distance from the corresponding relationship.

[0132] The device 500 also includes a display unit 504, which is used to determine and display the optimal launch point position in the virtual game scene, and the optimal launch point position is: the distance between the position to be shot and the position closest to the launch point position of the shooting operation is the second distance.

[0133] Optionally, the determination unit 501 is also specifically used to: obtain each angle between the first straight line and the second straight line when the sub-weapon hits the bull's eye when each of the training virtual objects uses the virtual weapon for shooting training in a target training state, and the target training state is: when the training virtual object uses the virtual weapon for shooting training, the distance between the launch point position of the sub-weapon and the bull's eye is the first distance; determine the angle that appears most times among the angles as the lifting angle corresponding to the first distance, or determine the average value of the angles as the lifting angle corresponding to the first distance.

[0134] Optionally, the device also includes an adding unit 505, which is used to: when the lifting angle corresponding to the target distance is not found in the corresponding relationship, and when the sub-weapon hits the position to be shot, add the corresponding relationship between the lifting angle when the sub-weapon is fired and the target distance in the corresponding relationship.

[0135] Corresponding to the control method of virtual weapons in a game provided by the first embodiment of the present application, the third embodiment of the present application further provides an electronic device for controlling virtual weapons in a game. Figure 6As shown, the electronic device includes: a processor 601; and a memory 602, which is used to store a program of a control method of a virtual weapon in a game. After the device is powered on and the program of the control method of the virtual weapon in the game is run by the processor 601, a graphical user interface is provided, in which at least part of a virtual game scene is displayed. The virtual game scene includes at least a virtual weapon, and the virtual weapon is used to respond to a shooting operation to launch a sub-weapon into the virtual game scene, and the following steps are performed:

[0136] In response to an aiming operation for the virtual weapon, determining a first aiming direction for indicating a shooting direction of the virtual weapon in the virtual game scene;

[0137] In response to a shooting operation directed to the virtual weapon, the first aiming direction is corrected according to a pre-specified elevation angle to obtain a target aiming direction directed to the virtual weapon;

[0138] The virtual weapon is controlled to launch the sub-weapon in the direction of the target aiming, so as to shoot in the direction of the target aiming.

[0139] Corresponding to the control method of a virtual weapon in a game provided in the first embodiment of the present application, the fourth embodiment of the present application provides a computer-readable storage medium storing a program of the control method of a virtual weapon in a game, the program being executed by a processor, and providing a graphical user interface through a terminal device, wherein the graphical user interface displays at least part of a virtual game scene, the virtual game scene at least including a virtual weapon, the virtual weapon being used to fire a sub-weapon into the virtual game scene in response to a shooting operation, and performing the following steps:

[0140] In response to an aiming operation for the virtual weapon, determining a first aiming direction for indicating a shooting direction of the virtual weapon in the virtual game scene;

[0141] In response to a shooting operation directed to the virtual weapon, the first aiming direction is corrected according to a pre-specified elevation angle to obtain a target aiming direction directed to the virtual weapon;

[0142] The virtual weapon is controlled to launch the sub-weapon in the direction of the target aiming, so as to shoot in the direction of the target aiming.

[0143] It should be noted that for the detailed description of the devices, electronic devices and computer-readable storage media provided in the second, third and fourth embodiments of the present application, reference can be made to the relevant description of the first embodiment of the present application, and no further details will be given here.

[0144] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0145] In a typical configuration, a node device in a blockchain includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0146] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0147] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), random access memory (RAM) of other attributes, read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage media or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0148] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0149] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A method for controlling virtual weapons in a game. It is characterized in that A graphical user interface is provided through a terminal device, wherein at least a portion of a virtual game scene is displayed in the graphical user interface, wherein the virtual game scene includes at least a virtual weapon, and the virtual weapon is used to fire a sub-weapon into the virtual game scene in response to a shooting operation, and the method includes: In response to an aiming operation for the virtual weapon, determining a first aiming direction for indicating a shooting direction of the virtual weapon in the virtual game scene; In response to a shooting operation directed to the virtual weapon, the first aiming direction is corrected according to a pre-specified elevation angle to obtain a target aiming direction directed to the virtual weapon; The virtual weapon is controlled to launch the sub-weapon in the direction of the target aiming, so as to shoot in the direction of the target aiming.

2. The method according to claim 1, It is characterized in that Before the step of correcting the first aiming direction according to a pre-specified lifting angle in response to the shooting operation of the virtual weapon, the method further comprises: Determining a pre-specified lifting angle corresponding to the virtual weapon according to the shooting trajectory of the sub-weapon in the training data, wherein the training data is data generated by shooting with the virtual weapon in the training mode; Alternatively, a preset correction angle corresponding to the virtual weapon is obtained, and the preset correction angle is determined as a pre-specified lifting angle, wherein each virtual weapon in the virtual game scene is provided with a corresponding preset correction angle.

3. The method according to claim 2, It is characterized in that The determining the pre-specified lifting angle corresponding to the virtual weapon according to the shooting trajectory of the sub-weapon in the training data includes: Acquire the initial firing direction of the sub-weapon when the sub-weapon leaves the virtual weapon and the final direction of the sub-weapon in the firing trajectory of the sub-weapon from the firing trajectory of the sub-weapon in the training data; The pre-specified lifting angle corresponding to the virtual weapon is determined according to the angle between the initial launching direction and the final facing direction.

4. The method according to claim 1, It is characterized in that In response to the aiming operation of the virtual weapon, determining a first aiming direction for indicating a shooting direction of the virtual weapon in the virtual game scene includes: In response to the aiming operation on the virtual weapon, shooting information is acquired, the shooting information including: the firing point position of the sub-weapon in the virtual game scene, and the position to be shot aimed at by the aiming operation; Determining a straight line direction from the launch point position to the to-be-shot position as a first aiming direction for indicating a shooting direction of the virtual weapon; Before the first aiming direction is corrected according to a pre-specified lifting angle in response to a shooting operation for the virtual weapon, the method further includes: calculating a target distance between the launch point position and the to-be-shot position; Based on the correspondence between the preset distance and the lifting angle, the lifting angle corresponding to the target distance is determined, and the determined lifting angle is used as the pre-specified lifting angle.

5. The method according to claim 4, It is characterized in that Before determining the lifting angle corresponding to the target distance based on the corresponding relationship between the preset distance and the lifting angle, the method further includes: Acquire a first distance between the launch point position of the sub-weapon and the bull's eye when the sub-weapon hits the bull's eye during shooting training using the virtual weapon in a training mode; Determine the preset lifting angle corresponding to the first distance according to the angle between the first straight line and the second straight line when the bull's eye is hit, the first straight line is a straight line formed by the launch point position of the sub-weapon and the bull's eye when the bull's eye is hit, and the second straight line is a straight line formed by the launch point position of the sub-weapon and the aimed point when the bull's eye is hit; The corresponding relationship between the preset distances and the lifting angles is determined based on the preset lifting angles corresponding to the first distances.

6. The method according to claim 5, It is characterized in that The determining the lifting angle corresponding to the target distance based on the corresponding relationship between the preset distance and the lifting angle includes: When the lifting angle corresponding to the target distance is found in the correspondence between the preset distance and the lifting angle, the lifting angle corresponding to the target distance is selected from the correspondence; When the lifting angle corresponding to the target distance is not found in the corresponding relationship, a second distance having the smallest difference with the target distance is determined from the corresponding relationship, and the lifting angle corresponding to the target distance is determined according to the lifting angle corresponding to the second distance in the corresponding relationship.

7. The method according to claim 6, It is characterized in that The determining the lifting angle corresponding to the target distance according to the lifting angle corresponding to the second distance in the corresponding relationship includes: The lifting angle corresponding to the target angle is determined based on a lifting angle determination principle, wherein the lifting angle determination principle is: a difference between the determined lifting angle and the lifting angle corresponding to the second distance is proportional to a difference between the target distance and the second distance.

8. The method according to claim 5, It is characterized in that The method further comprises: When the target distance does not exist in the corresponding relationship, determining a second distance having a minimum difference with the target distance from the corresponding relationship; The best launching point position is determined and displayed in the virtual game scene, and the best launching point position is: the position whose distance from the position to be shot is the second distance and which is closest to the launching point position of the shooting operation.

9. The method according to claim 5, It is characterized in that The training data of the virtual weapon in the training mode includes a plurality of training data obtained by a plurality of training virtual objects performing shooting training using the virtual weapon, The determining of the preset lifting angle corresponding to the first distance according to the angle between the first straight line and the second straight line when hitting the bull's eye includes: Acquire each angle between the first straight line and the second straight line when the sub-weapon hits the bull's eye when each training virtual object uses the virtual weapon for shooting training in a target training state, wherein the target training state is: when the training virtual object uses the virtual weapon for shooting training, the distance between the launch point position of the sub-weapon and the bull's eye is the first distance; The angle that appears most frequently among the angles is determined as the lifting angle corresponding to the first distance, or the average value of the angles is determined as the lifting angle corresponding to the first distance.

10. The method according to claim 6, It is characterized in that When the lifting angle corresponding to the target distance is not found in the corresponding relationship, the method further includes: When the sub-weapon hits the to-be-shot position, the corresponding relationship between the lifting angle of the sub-weapon when it is fired and the target distance is added to the corresponding relationship.

11. The method according to any one of claims 4 to 10, It is characterized in that The shooting information also includes the weapon category of the virtual weapon; The determining the lifting angle corresponding to the target distance based on the correspondence between the preset distance and the lifting angle includes: Based on the corresponding relationship between the preset distance and the lifting angle corresponding to the weapon category, the lifting angle corresponding to the target distance is determined.

12. A control device for virtual weapons in a game. It is characterized in that A graphical user interface is provided through a terminal device, wherein at least a portion of a virtual game scene is displayed in the graphical user interface, wherein the virtual game scene includes at least a virtual weapon, and the virtual weapon is used to fire a sub-weapon into the virtual game scene in response to a shooting operation, wherein the apparatus includes: a determining unit, configured to respond to an aiming operation on the virtual weapon and determine, in the virtual game scene, a first aiming direction for indicating a shooting direction of the virtual weapon; a correction unit, configured to respond to a shooting operation directed to the virtual weapon and correct the first aiming direction according to a pre-specified lifting angle to obtain a target aiming direction directed to the virtual weapon; The control unit is used to control the virtual weapon to launch the sub-weapon in the direction of the target aiming, so as to shoot in the direction of the target aiming.

13. An electronic device, It is characterized in that include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 11 is executed.

14. A computer-readable storage medium, It is characterized in that A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 11.