Method, device, terminal and program for controlling virtual objects
The integration of a single first shooting button in the user interface of mobile terminal shooter games simplifies the process of scope peering and shooting for virtual objects, enhancing operational efficiency and user experience.
Patent Information
- Application Number
- JP2021550057
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-08-01
- Filing Date
- 2020-07-08
- Publication Date
- 2025-04-30
- Estimated Expiration
- 2040-07-08
AI Technical Summary
Current mobile terminal shooter games require complex and inefficient operational methods for controlling and firing virtual objects, as players need to perform separate actions for scope peering and shooting.
A method and device for controlling virtual objects in mobile terminals, featuring a user interface with a single first shooting button that triggers both scope peering and shooting, allowing the virtual gun to be controlled to fire when in the scope peering state upon meeting shooting conditions.
This solution simplifies the operational process by allowing scope peering and shooting to be completed with a single key press, significantly improving operational efficiency and reducing user difficulty.
Smart Images

Figure 0007669633000001 
Figure 0007669633000002 
Figure 0007669633000003
Abstract
Description
[Technical field]
[0001] The present invention claims priority to a Chinese patent application filed on August 1, 2019, bearing application number 201910707805.2 and entitled "Virtual object control method, device, terminal and storage medium," the entire contents of which are incorporated herein by reference.
[0002] The present invention relates to the technical fields of computers and the Internet, and in particular to a method, device, terminal, and storage medium for controlling a virtual object. [Background technology]
[0003] Currently, in some shooting games for mobile terminals, a player can control a virtual gun held by a virtual object in a game scene provided by a game battle, shoot the virtual object, and defeat an enemy virtual object to win the game battle.
[0004] The operation methods provided by the related art for controlling and shooting virtual objects are relatively complicated and inefficient. Summary of the Invention
[0005] The embodiments of the present invention provide a method, device, terminal and storage medium for controlling a virtual object, the technical means of which are as follows:
[0006] In one aspect, a method for controlling a virtual object, which is applied to a mobile terminal, is provided, the method including: a step of displaying a user interface including a first shoot button, the first shoot button being an operation widget for triggering looking through a scope and shooting; a step of controlling a virtual gun held by a virtual object to be in a looking through scope state when a trigger signal corresponding to the first shoot button is received, the looking through scope state being a state in which a virtual environment is looked through a virtual scope equipped to the virtual gun; a step of detecting whether a shooting condition is satisfied; and a step of controlling the virtual gun to fire when the shooting condition is satisfied and the virtual gun is in the looking through scope state.
[0007] In another aspect, a control device for a virtual object is provided, the device including: an interface display module that displays a user interface including a first shoot button, the first shoot button being an operation widget for triggering looking through a scope and shooting; a scope looking control module that controls a virtual gun held by a virtual object to be in a looking through scope state when a trigger signal corresponding to the first shoot button is received, the looking through scope state being a state in which a virtual environment is looked through a virtual scope equipped to the virtual gun; a condition detection module that detects whether a shooting condition is satisfied; and a shooting control module that controls the virtual gun to fire when the shooting condition is satisfied and the virtual gun is in the looking through scope state.
[0008] In another aspect, there is provided a mobile terminal including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to realize the above-mentioned method for controlling a virtual object.
[0009] In another aspect, there is provided a computer readable storage medium having stored therein at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, code set or instruction set being loaded and executed by a processor to realize the above-mentioned method for controlling a virtual object.
[0010] In another aspect, there is provided a computer program product which, when executed on a mobile terminal, causes the mobile terminal to perform the above method of controlling a virtual object.
[0011] In the technology according to the embodiment of the present invention, a first shoot button is designed in the user interface to trigger looking through the scope and shooting. When a trigger signal corresponding to the first shoot button is received, the virtual gun held by the virtual object is controlled to enter a looking through the scope state, and when the virtual gun is in the looking through the scope state, the virtual gun is controlled to shoot. This realizes the function of completing looking through the scope and shooting with one key, and can complete looking through the scope and shooting with just one operation without requiring two operations, thereby significantly improving operation efficiency. [Brief description of the drawings]
[0012] In order to more clearly describe the technology according to the embodiments of the present invention, the following briefly introduces drawings necessary for the description of the embodiments. Note that the drawings in the following description are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without creative work. [Figure 1] FIG. 1 is a schematic diagram of an implementation environment according to one embodiment of the present invention. [Diagram 2] 1 is a schematic diagram of the configuration of a mobile terminal according to one embodiment of the present invention; [Diagram 3] 1 is a flowchart of a method for controlling a virtual object according to an embodiment of the present invention. [Figure 4] FIG. 13 is a schematic diagram showing an example of a first firing button. [Diagram 5] FIG. 13 is a schematic diagram showing an example of a setting interface. [Figure 6] 11 is a flowchart of a method for controlling a virtual object according to another embodiment of the present invention. [Figure 7] FIG. 13 is a schematic diagram showing an example of a second firing button. [Figure 8] 11 is a flowchart of a method for controlling a virtual object according to another embodiment of the present invention. [Figure 9] FIG. 2 is a block diagram of a control device for a virtual object according to one embodiment of the present invention. [Figure 10] FIG. 11 is a block diagram of a virtual object control device according to another embodiment of the present invention. [Figure 11] FIG. 2 is a block diagram of a configuration of a mobile terminal according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] In order to make the objectives, technical means and advantages of the present invention clearer, the following describes the embodiments of the present invention in more detail with reference to the drawings.
[0014] Before introducing and describing embodiments of the present invention, terms related to the present invention will first be defined and explained.
[0015] 1. Virtual Objects The virtual object refers to a virtual character controlled by a user account in an application program. In an example where the application program is a game application program, the virtual object refers to a game character controlled by a user account in the game application program. The virtual object may be a humanoid character, an animal, an anime, or other form, but the embodiment of the present invention is not limited thereto. The virtual object may be displayed in a three-dimensional form or a two-dimensional form, but the embodiment of the present invention is not limited thereto.
[0016] Different game application programs may have different operations that can be performed by the virtual object controlled by the user account, for example, in a shooting game application program, the user account can control the virtual object to perform operations such as shooting, running, jumping, picking up a gun, changing the gun, loading the gun, etc.
[0017] In addition to game application programs, other types of application programs may also display virtual objects to the user and provide functions corresponding to the virtual objects. For example, AR (Augmented Reality) application programs, social application programs, interactive entertainment application programs, etc. may be used, but the embodiments of the present invention are not limited thereto. In addition, different application programs provide different forms of virtual objects and different corresponding functions, so configurations may be performed in advance according to actual needs, but the embodiments of the present invention are not limited thereto.
[0018] 2. Virtual Guns By virtual gun is meant a virtual item that can simulate the shooting of a real gun. A virtual gun may be a three-dimensional model of a real gun, and a virtual object can equip the virtual gun and control the virtual gun to shoot a specific target.
[0019] The virtual guns may include various gun types, such as rifles, machine guns, shotguns, pistols, etc. The gun types may be classified according to practical needs, for example, rifles may be further classified into various types, such as assault rifles and sniper rifles, and machine guns may be further classified into various types, such as light machine guns and heavy machine guns.
[0020] 3. Virtual Scope A virtual scope (virtual sight) refers to a virtual item that is equipped to a virtual gun and is used to auxiliary observe a virtual environment. The virtual scope may be a three-dimensional model of an actual scope. After the virtual scope is equipped to the virtual gun, the virtual gun can enter a scope-looking state. This scope-looking state refers to a state in which the virtual environment is looked at through the virtual scope.
[0021] The virtual scope may include scopes of various magnifications (e.g., a 2x scope, a 3x scope, a 4x scope, a 6x scope, an 8x scope, etc.), a laser scope, a dot sight scope, a holographic scope, etc.
[0022] 1 is a schematic diagram of an implementation environment according to one embodiment of the present invention. As shown in FIG. 1, the implementation environment may include a mobile terminal 10 and a server 20.
[0023] The mobile terminal 10 may be a portable electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, etc. A client program of a game application program, such as a client program of a shooting game application program, may be installed on the mobile terminal 10.
[0024] The server 20 is used to provide background services to a client program of an application program (such as a game application program) in the mobile terminal 10. For example, the server 20 may be a back-end server of the above-mentioned application program (such as a game application program). The server 20 may be a single server, a server cluster composed of multiple servers, or a cloud computing service center.
[0025] The mobile terminal 10 and the server 20 can communicate with each other via a network 30. The network 30 may be a wired network or a wireless network.
[0026] In the embodiment of the method of the present invention, the execution subject of each step may be a mobile terminal. Figure 2 is a schematic diagram of the configuration of a mobile terminal according to one embodiment of the present invention. As shown in Figure 2, the mobile terminal 10 may include a main board 110, an external output / input device 120, a memory 130, an external interface 140, a touch system 150, and a power supply 160.
[0027] Here, the main board 110 has integrated thereon processing elements such as a processor and a controller.
[0028] The external output / input devices 120 may include a display component (eg, a display screen), an audio component (eg, a speaker), an audio capture component (eg, a microphone), various keys, and the like.
[0029] The memory 130 stores program codes and data.
[0030] The external interface 140 may include an earphone interface, a charging interface, a data interface, etc.
[0031] The touch system 150 may be integrated into a display component or a key of the external output / input device 120. The touch system 150 is used to detect touch operations performed by a user on the display component or the key.
[0032] Power supply 160 is used to provide power to other components in mobile terminal 10 .
[0033] In an embodiment of the present invention, the processor in the main board 110 may generate a user interface (e.g., a game interface) by executing or calling up program codes and data stored in the memory, and display the generated user interface (e.g., a game interface) through the external output / input device 120. When displaying the user interface (e.g., a game interface), a touch operation performed when a user interacts with the user interface (e.g., a game interface) may be detected by the touch system 150, and a response may be made to the touch operation.
[0034] In the related art, a user interface of a shooting game is provided with a scope look-through button and a shoot button. When a user clicks the scope look-through button, the virtual gun held by the virtual object may be controlled to enter a scope look-through state. In the scope look-through state, the player can look into the virtual environment through a virtual scope equipped on the virtual gun. When a user clicks the shoot button, the user may control the virtual gun held by the virtual object to fire.
[0035] In practical applications, a player needs to shoot while looking into the scope so that he can aim and shoot at a target more accurately, but in the related art, in order to shoot while looking into the scope, the player needs to first click the look into the scope button and then click the shoot button, which makes the operation complicated and inefficient.
[0036] In the technology according to the embodiment of the present invention, a first shoot button is designed in the user interface to trigger looking through the scope and shooting. When a trigger signal corresponding to the first shoot button is received, the virtual gun held by the virtual object is controlled to enter a looking through the scope state, and when the virtual gun is in the looking through the scope state, the virtual gun is controlled to shoot. This realizes the function of completing looking through the scope and shooting with one key, and can complete looking through the scope and shooting with just one operation without requiring two operations, thereby significantly improving operation efficiency.
[0037] 3 is a flowchart of a method for controlling a virtual object according to an embodiment of the present invention. As shown in FIG. 3, the method may be applied to the above-mentioned mobile terminal, for example, to a client program of an application program (for example, a shooting game application) of the above-mentioned mobile terminal. The method may include the following steps:
[0038] In step 301, a user interface including a first fire button is displayed. The first fire button is an operation widget for triggering scope aiming and firing.
[0039] In the example of a shooting game application, the user interface may be a display interface (display screen) of the game battle. The user interface displays the virtual environment of the game battle to the user. For example, the user interface may include elements in the virtual environment, such as virtual buildings, virtual items, virtual objects, etc. Preferably, the user interface further includes operation widgets, such as buttons, sliders, icons, etc., for the user to operate.
[0040] In the embodiment of the present invention, as shown in Fig. 4, the user interface 40 includes a first shooting button 41, which is an operation widget for triggering scope viewing and shooting. That is, the scope viewing function and the shooting function are not realized by two different buttons respectively, but are integrated into the same button, so that the scope viewing and shooting functions can be realized by one key.
[0041] In step 302, when a trigger signal corresponding to a first shoot button is received, the virtual gun held by the virtual object is controlled to be in a scope-looking state.
[0042] Here, the scope looking state means a state in which a virtual environment is looked at through a virtual scope attached to a virtual gun. For example, in the scope looking state, the user interface may display a virtual scope attached to the virtual gun and display the virtual environment as seen through the virtual scope.
[0043] In an exemplary embodiment, the mobile terminal determines whether a trigger signal corresponding to a first fire button is received as follows: if a touch operation signal is received, obtain a touch position of the touch operation signal, obtain a distance between the touch position of the touch operation signal and a center position of the first fire button, and determine that a trigger signal corresponding to the first fire button is received if the distance is smaller than a first threshold value.
[0044] When the first fire button is circular, the first threshold value may be the same as the radius of the first fire button, or may be different from the radius of the first fire button, for example, slightly larger or slightly smaller than the radius of the first fire button.
[0045] If the distance between the touch position of the detected touch operation signal and the center position of the first fire button is smaller than a first threshold, it is determined that the user's finger has clicked the first fire button, i.e., it is determined that a trigger signal corresponding to the first fire button has been received.
[0046] For example, the coordinates of the center position of the first firing button and the first threshold value are configured in the configuration file, and when a touch operation signal is received, the touch position of the touch operation signal is obtained, the touch position is compared with the center position of the first firing button configured in the configuration file, the distance between the two is calculated, and the distance is compared with the first threshold value to determine whether a trigger signal corresponding to the first firing button is received. The configuration file may be a configuration file in a JSON (JavaScript Object Notation) format. By configuring the coordinates of the center position of the first firing button and the first threshold value in the configuration file, an engineer does not need to change the code of the entire application program, but can change the first firing button by only changing the configuration file, making it easy to upgrade the project version.
[0047] The mobile terminal may also execute a step of detecting whether the virtual gun held by the virtual object supports scope shooting, and if the virtual gun supports scope shooting, controlling the virtual gun held by the virtual object to enter a scope-viewing state when a trigger signal corresponding to the first shooting button is received. Otherwise, that is, if the virtual gun does not support scope shooting, controlling the virtual gun to perform hip-fire shooting when a trigger signal corresponding to the first shooting button is received. Hip-fire refers to a shooting mode in which a shooting operation is directly performed without performing a scope-viewing operation.
[0048] Preferably, the step of detecting by the mobile terminal whether the virtual gun held by the virtual object supports scope shooting includes the steps of:
[0049] In step 1, the gun type to which the virtual gun belongs is obtained.
[0050] In step 2, a setting item corresponding to the gun type is obtained, which is used to set a shooting mode, and the shooting mode includes scope shooting and hip firing.
[0051] In step 3, if the setting item corresponding to the gun type is scope shooting, it is determined that the virtual gun supports scope shooting.
[0052] In an embodiment of the present invention, the virtual gun may include various gun types, such as rifles, machine guns, shotguns, pistols, etc. For each gun type, the user may set a corresponding shooting mode according to actual needs. For example, for a rifle, the corresponding shooting mode set by the user is scope shooting, and for a submachine gun, the corresponding shooting mode set by the user is hip-fire shooting.
[0053] For example, as shown in FIG. 5, the shooting mode setting area 51 of the setting interface 50 provides various gun types such as assault rifles, machine guns, shotguns, and sniper rifles. Two setting items, namely, scope shooting and hip-fire shooting, are provided for each gun type. The user may flexibly set the shooting mode corresponding to each gun type according to actual needs. For example, as shown in FIG. 5, the shooting mode corresponding to the assault rifle is set to be scope shooting, the shooting mode corresponding to the machine gun is set to be scope shooting, and the shooting mode corresponding to the shotgun is set to be hip-fire shooting.
[0054] In addition, the user may set the shooting modes for all gun types at once with one key. For example, the user may set the shooting modes for all gun types to scope shooting with one key, or the user may set the shooting modes for all gun types to hip fire with one key.
[0055] In step 303, it is detected whether the shooting conditions are met.
[0056] After the trigger signal corresponding to the first shooting button is received, the mobile terminal further needs to detect whether the current state satisfies a shooting condition, where the shooting condition means a pre-set condition for allowing shooting with the virtual gun held by the virtual object.
[0057] Preferably, the above shooting conditions may include a first shooting condition set for the virtual object and a second shooting condition set for the virtual gun. The mobile terminal may detect whether the virtual object satisfies the first shooting condition, and if the virtual object satisfies the first shooting condition, detect whether the virtual gun satisfies the second shooting condition, and if the virtual gun satisfies the second shooting condition, determine that the shooting condition is satisfied. Also, if the virtual object does not satisfy the first shooting condition or the virtual gun does not satisfy the second shooting condition, the mobile terminal may determine that the shooting condition is not satisfied. Note that the step of detecting whether the virtual object satisfies the first shooting condition and the step of detecting whether the virtual gun satisfies the second shooting condition may be performed sequentially or simultaneously, but the embodiment of the present invention is not limited thereto.
[0058] Preferably, the step of detecting whether the virtual object satisfies the first shooting condition includes the steps of acquiring state information of the virtual object, and detecting whether the virtual object satisfies the first shooting condition based on the state information of the virtual object. Here, the first shooting condition includes, but is not limited to, at least one of the following: the virtual object is alive, the virtual object is not driving a vehicle, and the virtual object is not in water. If the virtual object does not satisfy the first shooting condition, for example, if the virtual object is already dead or the virtual object is driving a vehicle, the virtual object cannot control the virtual gun to shoot. The above first shooting condition may be set in advance, but the embodiment of the present invention is not limited thereto.
[0059] Preferably, the step of detecting whether the virtual object satisfies the second shooting condition includes the steps of obtaining state information of the virtual gun, and detecting whether the virtual gun satisfies the second shooting condition based on the state information of the virtual gun. Here, the second shooting condition includes, but is not limited to, at least one of the following: the virtual gun has remaining bullets, and the virtual gun is not reloading bullets. If the virtual gun does not satisfy the second shooting condition, for example, if the virtual gun has no remaining bullets or the virtual gun is reloading bullets, the virtual object cannot control the virtual gun to shoot. The above second shooting condition may be set in advance, but the embodiment of the present invention is not limited thereto.
[0060] In step 304, if the shooting condition is met, control is performed so that the virtual gun is fired when the virtual gun is in the scope view state.
[0061] If the current state meets the shooting condition, the virtual gun is maintained in the scope looking state and the mobile terminal controls the virtual gun to shoot. This allows the user to trigger two operations of scope looking and shooting by clicking one button (i.e., the above-mentioned first shooting button) with one finger, thereby realizing the function of "one-click scope shooting". Also, if the current state does not meet the shooting condition, the process may be terminated, and the mobile terminal will not control the virtual gun to perform the shooting operation.
[0062] In addition, in the related art, a scope peek button and a shoot button are provided, and some users can quickly realize scope peek and shoot by clicking the scope peek button with multiple fingers, for example, by clicking the shoot button with another finger. However, the scope peek button and the shoot button are usually provided on the same side of the user interface, for example, both are provided on the right part of the user interface, and a joystick operation widget for controlling the movement of a virtual object is provided on the left part of the user interface, so the user needs to click the scope peek button and the shoot button with two fingers of the same hand, which makes such user operation relatively difficult. Even if the scope peek button and the shoot button are provided on both sides of the interface, there is a problem that it is necessary to operate with multiple fingers, for example, by controlling the movement with one finger of the left hand, clicking the scope peek button with one finger of the right hand, and clicking the shoot button with another finger of the left hand. The technology according to the embodiment of the present invention allows the user to trigger two operations of scope peek and shoot by clicking one button with one finger, thereby reducing the difficulty of the user's operation and improving the operation efficiency. In addition, the advantage of players who use multiple fingers (e.g., players who use three fingers and players who use four fingers) over players who use two fingers is eliminated to some extent, so even players who use two fingers can have a better gaming experience.
[0063] Also, if the virtual gun supports continuous shooting, the virtual gun is controlled to execute one shooting operation for each predetermined time interval within the duration of the trigger signal. Here, the predetermined time interval may be set in advance, and for example, the predetermined time intervals (i.e., shooting intervals) corresponding to different virtual guns may be the same or different. If the virtual gun does not support continuous shooting, the virtual gun is controlled to execute one shooting operation within the duration of the trigger signal.
[0064] In an exemplary embodiment, when the virtual gun is in a scope-viewing state, the user may adjust the touch position corresponding to the trigger signal by moving a finger. In response, the mobile terminal obtains the touch position corresponding to the trigger signal within the duration of the trigger signal, and adjusts the shooting direction of the virtual gun based on the touch position corresponding to the trigger signal. Preferably, the mobile terminal determines a relative positional relationship between the touch position corresponding to the trigger signal and the center point of the first shooting button, and determines the shooting direction of the virtual gun based on the relative positional relationship. For example, the four directions of up, down, left, and right in the above relative positional relationship correspond to the four directions of north, south, west, and east in the virtual environment in which the virtual object is located, respectively. In this way, assuming that the touch position corresponding to the trigger signal is located at a position 45° to the upper right of the center point of the first shooting button, the shooting direction of the virtual gun is determined to be 45° northeast, and assuming that the touch position corresponding to the trigger signal is located at a position 30° to the lower left of the center point of the first shooting button, the shooting direction of the virtual gun is determined to be 30° southwest. After determining the shooting direction of the virtual gun, the mobile terminal may first control the virtual object to face the shooting direction, display the virtual environment in the front view of the virtual object on the user interface, and then control the virtual gun to shoot in the shooting direction. That is, as described above, three operations of looking through the scope, aiming, and shooting can be realized with one key, and the operation efficiency can be greatly improved.
[0065] In the related art, when a user wants to quickly complete three operations of looking through the scope, aiming, and shooting with multiple fingers, he or she needs to control the movement of the virtual object with one finger of the left hand, click the looking through the scope button with one finger of the right hand, rotate the viewing angle to aim at the enemy virtual object with another finger of the right hand, and click the shooting button with another finger of the left hand, and there is a high demand for such operations.
[0066] In the technology according to the embodiment of the present invention, the first shooting button is configured to have a joystick function, so that after the user clicks the first shooting button, he or she can adjust the shooting direction of the virtual gun by moving the finger without lifting the finger from the screen. This allows the user to perform three operations of looking through the scope, aiming, and shooting with one finger, thereby sufficiently reducing the difficulty of operation for the user.
[0067] In view of the above, in the technology according to the embodiment of the present invention, a first shooting button is designed in the user interface to trigger looking through the scope and shooting. When a trigger signal corresponding to the first shooting button is received, the virtual gun held by the virtual object is controlled to enter a looking through the scope state, and when the virtual gun is in the looking through the scope state, the virtual gun is controlled to shoot. This realizes the function of completing looking through the scope and shooting with one key, and can complete looking through the scope and shooting with just one operation without requiring two operations, thereby significantly improving operation efficiency.
[0068] In addition, within the duration of the trigger signal corresponding to the first shooting button, the shooting direction of the virtual gun can be adaptively adjusted based on the change in the touch position corresponding to the trigger signal, thereby realizing three operations of looking through the scope, aiming and shooting with one key, further improving operation efficiency.
[0069] For example, as shown in FIG. 6, a method for controlling a virtual object according to an embodiment of the present invention may include the following steps.
[0070] In step 601, it is determined whether or not the virtual weapon held by the virtual object supports scope shooting. If YES, step 602 described below is executed, and if NO, step 604 described below is executed.
[0071] In step 602, it is determined whether the setting item of the virtual weapon is scope shooting. If YES, step 603 described below is executed, and if NO, step 604 described below is executed.
[0072] In step 603, the fire mode is determined to be scope fire.
[0073] In step 604, the fire mode is determined to be hip fire.
[0074] In step 605, it is determined whether a trigger signal corresponding to the first fire button is received. If YES, execute step 606 below; if NO, execute step 605.
[0075] In step 606, the virtual weapon is controlled to be in a scope-viewing state.
[0076] In step 607, it is determined whether the virtual object satisfies the first shooting condition. If YES, execute step 608 below; if NO, end the process.
[0077] In step 608, it is determined whether the virtual weapon satisfies the second firing condition. If YES, step 609 described below is executed, and if NO, step 607 is executed.
[0078] In step 609, control is exercised to execute a first firing operation with the virtual weapon.
[0079] In step 610, it is determined whether the interval time from the previous shooting operation has reached a predetermined time length. If YES, execute step 611 below, and if NO, continue to execute step 610.
[0080] In step 611, it is determined whether the trigger signal has disappeared. If NO, execute step 612 below, and execute step 610 again after step 612 below; if YES, execute step 613 below.
[0081] In step 612, control is exercised to execute a single fire operation with the virtual weapon.
[0082] In step 613, control is performed to stop the shooting operation with the virtual weapon.
[0083] In an exemplary embodiment, the user interface further includes a second fire button in addition to the first fire button. The second fire button is an operation widget for triggering hip-fire. When a trigger signal corresponding to the second fire button is received, the mobile terminal controls the virtual gun held by the virtual object to perform hip-fire.
[0084] 7, the user interface 40 includes a first shooting button 41 and a second shooting button 42. Here, the second shooting button 42 may be provided beside the first shooting button 41, for example, to the left of the first shooting button 41. Also, the size of the second shooting button 42 may be appropriately smaller than the size of the first shooting button 41.
[0085] When the mobile terminal receives a touch operation signal, the mobile terminal obtains a touch position of the touch operation signal, obtains a distance between the touch position of the touch operation signal and the center position of the second fire button, and determines that a trigger signal corresponding to the second fire button is received if the distance is smaller than a second threshold value. If the second fire button is circular, the second threshold value may be the same as the radius of the second fire button, or may be different from the radius of the second fire button, for example, slightly larger or smaller than the radius of the second fire button. If the distance between the touch position of the detected touch operation signal and the center position of the second fire button is smaller than the second threshold value, the mobile terminal determines that the user's finger clicks the second fire button, that is, determines that a trigger signal corresponding to the second fire button is received. Similarly, the coordinates of the center position of the second fire button and the second threshold value may be configured in a configuration file, but the embodiment of the present invention is not limited thereto.
[0086] In the embodiment of the present invention, the user interface simultaneously provides a first shooting button and a second shooting button, allowing the user to select more diverse shooting modes. The user can click the first shooting button to realize scope shooting, and click the second shooting button to realize hip fire, so as to better meet the user's operating needs.
[0087] Although one-click scope shooting provides convenience for quick scope operation, in close-range operation, the virtual scope is displayed on the user interface, which blocks the user's view and makes it difficult to aim and shoot. By placing a second fire button next to the first fire button, the above drawbacks can be fully compensated for. For example, when a user fights at close range, he or she can click the second fire button to directly perform hip fire and avoid the problem of scope sighting. On the other hand, when fighting at medium and long range, he or she can click the first fire button to perform scope shooting, providing the user with more convenient and free shooting options.
[0088] In addition, whether only the first shoot button is displayed on the user interface or the first shoot button and the second shoot button are displayed simultaneously can be set by the user according to actual needs, and the embodiments of the present invention are not limited thereto.
[0089] For example, as shown in FIG. 8, a method for controlling a virtual object according to an embodiment of the present invention may include the following steps.
[0090] In step 801 it is determined whether the current mode is configured to display two fire buttons. If yes, execute step 802 below, if no, the process ends.
[0091] In step 802, a first fire button and a second fire button are displayed on a user interface.
[0092] In step 803, it is determined whether a trigger signal corresponding to one of the fire buttons is received. If YES, execute step 804 below; if NO, execute step 803.
[0093] In step 804, it is determined whether the first shot button is clicked. If YES, step 805 described below is executed, and step 807 is executed after step 805. If NO, step 806 described below is executed.
[0094] In step 805, the first fire button is triggered.
[0095] In step 806, the second fire button is triggered.
[0096] In step 807, the virtual weapon held by the virtual object is controlled to be in a scope-looking state.
[0097] In step 808, it is determined whether the shooting condition is met. If YES, execute step 809 below; if NO, end the process.
[0098] In step 809, control is performed to execute a shooting operation with the virtual weapon according to the selected shooting mode.
[0099] In step 810, if it is detected that the trigger signal has disappeared, control is performed to stop the shooting operation with the virtual weapon.
[0100] The following describes an apparatus according to an embodiment of the present invention, which can execute a method according to an embodiment of the present invention. For details of the apparatus embodiment of the present invention, reference may be made to the method embodiment of the present invention.
[0101] 9 is a block diagram of a virtual object control device according to an embodiment of the present invention. The device has a function of implementing the above-mentioned method embodiment, and the function may be implemented by hardware, or the hardware may execute corresponding software. The device may be a mobile terminal, or may be provided in a mobile terminal. The device may include an interface display module 901, a scope viewing control module 902, a condition detection module 903, and a shooting control module 904.
[0102] The interface display module 901 displays a user interface including a first fire button, which is an operation widget for triggering scope aiming and firing.
[0103] When a trigger signal corresponding to the first shoot button is received, the scope viewing control module 902 controls the virtual gun held by the virtual object to enter a scope viewing state, where the scope viewing state is a state in which the virtual environment is viewed through a virtual scope equipped to the virtual gun.
[0104] The condition detection module 903 detects whether the shooting conditions are met.
[0105] If the shooting condition is satisfied, the shooting control module 904 controls the virtual gun to shoot when the virtual gun is in the scope looking state.
[0106] In an exemplary embodiment, the condition detection module 903 detects whether a virtual object satisfies a first shooting condition, and if the virtual object satisfies the first shooting condition, detects whether the virtual gun satisfies a second shooting condition, and if the virtual gun satisfies the second shooting condition, determines that the virtual gun satisfies the shooting condition.
[0107] In an exemplary embodiment, the shooting control module 904 controls the virtual gun to execute one shooting operation per predetermined time interval within the duration of the trigger signal.
[0108] In an exemplary embodiment, as shown in FIG. 10, the device 900 further includes a first position acquisition module 905, a distance acquisition module 906 and a button trigger module 907.
[0109] The first position obtaining module 905 obtains the touch position of the touch operation signal when the touch operation signal is received.
[0110] The distance acquisition module 906 acquires the distance between the touch position of the touch operation signal and the center position of the first shoot button.
[0111] The button trigger module 907 determines that a trigger signal corresponding to the first fire button has been received if the distance is less than a first threshold.
[0112] In an exemplary embodiment, as shown in FIG. 10, the device 900 further includes a second position acquisition module 908 and an orientation adjustment module 909 .
[0113] A second position acquisition module 908 acquires a touch position corresponding to the trigger signal within the duration of the trigger signal.
[0114] A direction adjustment module 909 adjusts the shooting direction of the virtual gun based on the touch position corresponding to the trigger signal.
[0115] In an exemplary embodiment, the user interface further includes a second fire button, the second fire button being an operation widget for triggering hip fire.
[0116] In response, the shooting control module 904 controls the virtual gun held by the virtual object to fire from the hip when a trigger signal corresponding to the second fire button is received.
[0117] In an exemplary embodiment, as shown in FIG. 10, the device further includes a shot detection module 910 .
[0118] The shot detection module 910 detects whether the virtual gun held by the virtual object supports scope shots.
[0119] The scope looking control module 902 executes a step of controlling the virtual gun held by the virtual object to enter a scope looking state when a trigger signal corresponding to the first shoot button is received if the virtual gun supports scope shooting.
[0120] In an exemplary embodiment, the shot detection module 910 performs the following steps.
[0121] The gun type to which the virtual gun belongs is obtained.
[0122] A setting item corresponding to the gun type is obtained, which is used to set a shooting mode, and the shooting mode includes the scope shooting and the hip firing.
[0123] If the setting item corresponding to the gun type is the scope shooting, it is determined that the virtual gun supports the scope shooting.
[0124] In view of the above, in the technology according to the embodiment of the present invention, a first shooting button is designed in the user interface to trigger looking through the scope and shooting. When a trigger signal corresponding to the first shooting button is received, the virtual gun held by the virtual object is controlled to enter a looking through the scope state, and when the virtual gun is in the looking through the scope state, the virtual gun is controlled to shoot. This realizes the function of completing looking through the scope and shooting with one key, and can complete looking through the scope and shooting with just one operation without requiring two operations, thereby significantly improving operation efficiency.
[0125] In addition, when implementing the functions of the device according to the above embodiments, only the division of the above functional modules is described as an example, but in actual applications, the above functions may be performed by different functional modules as necessary, that is, the internal structure of the device may be divided into different functional modules to perform all or part of the above functions. In addition, the device and method embodiments according to the above embodiments belong to the same idea, and the specific implementation process may refer to the method embodiments, and the description thereof will be omitted here.
[0126] FIG. 11 is a block diagram of a configuration of a mobile terminal 1100 according to one embodiment of the present invention. As shown in FIG. 11, the mobile terminal 1100 may be a portable electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, and a wearable device. The mobile terminal is used to realize the method for controlling a virtual object according to the above embodiment. The mobile terminal may be the mobile terminal 10 in the implementation environment shown in FIG. 1. Specifically, it is as follows.
[0127] Generally, the mobile terminal 1100 includes a processor 1101 and a memory 1102 .
[0128] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 1101 may include a main processor and a co-processor. The main processor is a processor used to process data in an awake state, and is also referred to as a CPU (Central Processing Unit). The co-processor is a low-power processor used to process data in a standby state. In some embodiments, the processor 1101 may be integrated with a GPU (Graphics Processing Unit), which is used to render and draw content that needs to be displayed on a display screen. In some embodiments, the processor 1101 may further include an AI (Artificial Intelligence) processor, which is used to process computational operations related to machine learning.
[0129] The memory 1102 may include one or more computer readable storage media, which may be non-transitory. The memory 1102 may further include high speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer readable storage medium in the memory 1102 stores at least one instruction, at least one program, code set, or instruction set, which is configured to be executed by one or more processors to implement the method for controlling a virtual object described above.
[0130] In some embodiments, the mobile terminal 1100 may preferably further include a peripheral interface 1103 and at least one peripheral. The processor 1101, the memory 1102, and the peripheral interface 1103 may be connected via a bus or signal lines. Each peripheral may be connected to the peripheral interface 1103 via a bus, signal lines, or a circuit board. Specifically, the peripherals include at least one of a radio frequency circuit 1104, a touch display screen 1105, a camera 1106, an audio circuit 1107, a position determination component 1108, and a power source 1109.
[0131] It will be appreciated by those skilled in the art that mobile terminal 1100 is not limited to the configuration shown in FIG. 11 and may include more or fewer components than those shown, may combine certain components, or may employ a different arrangement of components.
[0132] An exemplary embodiment further provides a computer readable storage medium having stored thereon at least one instruction, at least one program, code set or instruction set, the at least one instruction, at least one program, code set or instruction set being executable by a processor to implement the method for controlling a virtual object as described above.
[0133] Preferably, the computer-readable storage medium may include a read only memory (ROM), a random access memory (RAM), a solid state drive (SSD), an optical disk, etc. Here, the random access memory may include a resistive random access memory (ReRAM) and a dynamic random access memory (DRAM).
[0134] In an exemplary embodiment, a computer program product is further provided, which, when executed in a mobile terminal, implements the above method for controlling a virtual object.
[0135] In addition, "multiple" referred to in this specification means two or more. "And / or" describes the association relationship of the associated objects, and indicates that there can be three types of relationships. For example, "A and / or B" may mean that only A exists, that A and B exist simultaneously, and that only B exists. The symbol " / " usually indicates that the associated objects before and after are in an "or" relationship. In addition, the numbers of the steps described in this specification simply exemplarily indicate the possible order of execution between the steps. In some other embodiments, the above steps may not be performed in the order of the numbers, for example, steps having two different numbers may be performed simultaneously or in the reverse order to the order shown, but the embodiments of the present invention are not limited thereto.
[0136] The above only describes the exemplary embodiments of the present invention, and does not limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included within the protection scope of the present invention.
Claims
1. A method for controlling a virtual object executed by a mobile terminal, comprising: displaying a user interface including a first fire button and a second fire button located beside the first fire button and smaller in size than the first fire button, the first fire button being an operation widget for triggering scope and fire so that the virtual object shoots at medium and long distances in a virtual environment, and the second fire button being an operation widget for triggering hip fire so that the virtual object shoots at close ranges in the virtual environment; a step of controlling a virtual gun held by the virtual object to be in a scope looking state when a trigger signal corresponding to the first shoot button is received, the scope looking state being a state in which a virtual scope equipped to the virtual gun is displayed and the virtual environment is looked into through the virtual scope; detecting whether a shooting condition is met; and when the shooting condition is satisfied, controlling the virtual gun to maintain the virtual gun in the scope-looking state and to execute one shooting operation at each predetermined time interval within the duration of the trigger signal, After controlling the virtual gun held by the virtual object to be in a scope-looking state, acquiring a touch position corresponding to the trigger signal within a duration of the trigger signal; and adjusting a shooting direction of the virtual gun while the first shooting button and the second shooting button are displayed on the user interface based on a touch position corresponding to the trigger signal. detecting whether the virtual gun held by the virtual object supports scope shooting; and if the virtual gun supports the scope shooting, when a trigger signal corresponding to the first shooting button is received, executing a step of controlling the virtual gun held by the virtual object to be in a scope looking state; The step of detecting whether the virtual gun held by the virtual object supports scope shooting includes: obtaining a gun type to which the virtual gun belongs; A step of acquiring a setting item corresponding to the gun type, the setting item being used to set a shooting mode, the shooting mode including the scope shooting and the hip fire shooting; and determining that the virtual gun supports scope shooting if a setting item corresponding to the gun type is scope shooting.
2. The step of detecting whether the shooting condition is satisfied includes: detecting whether the virtual object satisfies a first shooting condition; detecting whether the virtual gun satisfies a second shooting condition if the virtual object satisfies the first shooting condition; and determining that the virtual gun satisfies the second fire condition if the virtual gun satisfies the second fire condition.
3. The step of detecting whether the virtual object satisfies a first shooting condition includes: obtaining state information of the virtual object; detecting whether the virtual object satisfies the first shooting condition based on state information of the virtual object; The method of claim 2 , wherein the first shooting condition includes at least one of: the virtual object being alive, the virtual object not driving a vehicle, and the virtual object not being underwater.
4. The step of detecting whether the virtual object satisfies a second shooting condition includes: obtaining state information of the virtual gun; detecting whether the virtual gun satisfies the second shooting condition based on state information of the virtual gun; The method of claim 2 , wherein the second shooting condition includes at least one of: the virtual gun having remaining bullets and the virtual gun not being reloaded.
5. When a touch operation signal is received, acquiring a touch position of the touch operation signal; acquiring a distance between a touch position of the touch operation signal and a center position of the first shooting button; The method of claim 1 , further comprising: if the distance is less than a first threshold, determining that a trigger signal corresponding to the first fire button has been received.
6. The method comprises:
6. The method according to claim 1, further comprising the step of controlling the virtual gun held by the virtual object to perform hip-fire when a trigger signal corresponding to the second fire button is received.
7. A control device for a virtual object, comprising: an interface display module that displays a user interface including a first shoot button and a second shoot button that is disposed beside the first shoot button and is smaller in size than the first shoot button, the first shoot button being an operation widget for triggering scope and shoot so that the virtual object shoots at a medium distance and a long distance in a virtual environment, and the second shoot button being an operation widget for triggering hip fire so that the virtual object shoots at a close distance in the virtual environment; a scope looking control module that controls a virtual gun held by the virtual object to be in a scope looking state when a trigger signal corresponding to the first shoot button is received, the scope looking state being a state in which a virtual scope equipped to the virtual gun is displayed and the virtual environment is looked into through the virtual scope; a condition detection module for detecting whether a shooting condition is met; a shooting control module that controls the virtual gun to maintain the scope-looking state and execute one shooting operation at each predetermined time interval within the duration of the trigger signal when the shooting condition is satisfied, After controlling the virtual gun held by the virtual object to be in a scope-looking state, Obtaining a touch position corresponding to the trigger signal within a duration of the trigger signal; adjusting a shooting direction of the virtual gun while the first shooting button and the second shooting button are displayed on the user interface based on a touch position corresponding to the trigger signal; a shot detection module for detecting whether the virtual gun held by the virtual object supports scope shots; the scope facing control module executes a step of controlling the virtual gun held by the virtual object to be in a scope facing state when a trigger signal corresponding to the first shooting button is received if the virtual gun supports the scope shooting; The shot detection module includes: Obtaining a gun type to which the virtual gun belongs; Obtaining a setting item corresponding to the gun type, the setting item being used to set a shooting mode, the shooting mode including the scope shooting and hip fire; The device determines that the virtual gun supports scope shooting if the setting item corresponding to the gun type is scope shooting.
8. A mobile terminal including a processor and a memory, The memory stores at least one instruction, at least one program, code set, or instruction set; A mobile terminal, wherein the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor so as to implement the method for controlling a virtual object according to any one of claims 1 to 6.
9. 7. A program for causing a computer to execute the virtual object control method according to claim 1.
Citation Information
Patent Citations
Game operation method and device of mobile terminal, storage medium and electronic device
CN110038297A
Method and device for polishing
JP1982027655A
Method for controlling virtual shooting character, apparatus, program, storage medium, and electronic device
JP2019058659A