Virtual object shooting control method, device, electronic device, and computer program
The automatic shooting control method and device in shooting games simplify user interactions by using lock and hit areas to automate shooting, enhancing user experience and game fairness.
Patent Information
- Application Number
- JP2021547515
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-05-30
- Filing Date
- 2020-05-29
- Publication Date
- 2025-02-03
- Estimated Expiration
- 2040-05-29
AI Technical Summary
Existing virtual object shooting control methods in shooting games require long-press button operations, which are inconvenient when combined with other functions like viewpoint adjustments, leading to inefficiency and inconvenience for users.
A method and device that allow automatic shooting of virtual objects based on locking and aiming mechanics, using lock areas and hit areas to determine when to automatically shoot, reducing the need for manual user input.
Enhances user experience by simplifying shooting controls, improving efficiency, and ensuring fairness in games by automating shooting actions while allowing users to focus on other operations.
Smart Images

Figure 0007625220000001 
Figure 0007625220000002 
Figure 0007625220000003
Abstract
Description
[Technical field]
[0001] The present application relates to the field of computer technology, and in particular to a virtual object shooting control method, device, electronic device, and storage medium.
[0002] This application claims priority to a Chinese patent application bearing application number 2019104654869 and entitled “Virtual object shooting control method, device, electronic device and storage medium” filed with the China Patent Office on May 30, 2019, the entire contents of which are incorporated herein by reference. [Background technology]
[0003] With the development of computer technology and the diversification of terminal functions, the types of games that can be played on terminals are becoming more and more numerous, among which shooting games are relatively popular games. In shooting games, users usually need to control virtual objects to shoot opponents using virtual tools.
[0004] Currently, a virtual object shooting control method is usually to provide a shooting button, and a user can click the shooting button, and when a long press operation on the shooting button is detected, the virtual object can be controlled to shoot. However, this requires the user to perform a long press operation on the shooting button, and in most cases, the user needs to perform other operations to realize other functions, such as adjusting the viewpoint. In this way, it is very inconvenient when the user needs to perform other control operations at the same time, and therefore a virtual object shooting control method for solving the above problem is urgently needed. Summary of the Invention [Problem to be solved by the invention]
[0005] According to various embodiments provided in the present application, a virtual object shooting control method, device, electronic device and storage medium are provided.
[0006] 1. A virtual object shooting control method, comprising: obtaining a locking region of a first virtual object; When a period during which the aim point of the second virtual object is continuously located within the lock area reaches a target period, displaying lock completion notification information at a position of the aim point within the lock area, the lock completion notification information being used to notify completion of locking of the first virtual object; and controlling the second virtual object to auto-shoot when the aim point is located within a hit area of the first virtual object, where the size of the hit area is less than the size of the lock area.
[0007] A virtual object shooting control device, comprising: an acquisition module, used for acquiring a lock area of a first virtual object; a display module, which is used to display a lock completion notification information at a position of the aim point in the lock area when a period during which the aim point of the second virtual object is continuously located in the lock area reaches a target period, and the lock completion notification information is used to notify the completion of locking of the first virtual object; and a control module for controlling automatic shooting of a second virtual object when the aim point is located within a hit area of the first virtual object, where the size of the hit area is less than the size of the lock area.
[0008] An electronic device, the electronic device including one or more processors and one or more memories, at least one computer-readable instruction stored in the one or more memories, the one or more processors loading and executing the computer-readable instruction to realize operations performed by a virtual object shooting control method.
[0009] One or more computer-readable storage media having at least one computer-readable instruction stored therein, and one or more processors loading and executing the computer-readable instruction to realize the operations performed by the virtual object shooting control method.
[0010] The details of one or more embodiments of the present application are set forth in the drawings and description that follow. Other features, objects, and advantages of the present application will become more apparent from the following description, drawings, and claims.
[0011] In order to more clearly describe the technical solutions in the embodiments of the present application, the following briefly describes the drawings that need to be used in the description of the embodiments. It is obvious that the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative efforts. [Brief description of the drawings]
[0012] [Figure 1] FIG. 2 is a schematic diagram of a terminal interface provided by an embodiment of the present application. [Diagram 2] 2 is a flowchart of a virtual object shooting control method provided by an embodiment of the present application; [Diagram 3] FIG. 2 is a schematic diagram of a lock area provided by an embodiment of the present application. [Figure 4] FIG. 2 is a schematic diagram of a lock area provided by an embodiment of the present application. [Diagram 5] FIG. 2 is a schematic diagram of lock preparation notification information provided by an embodiment of the present application; [Figure 6]FIG. 2 is a schematic diagram of lock preparation notification information provided by an embodiment of the present application; [Figure 7] FIG. 11 is a schematic diagram of lock completion notification information provided by an embodiment of the present application; [Figure 8] FIG. 11 is a schematic diagram of lock completion notification information provided by an embodiment of the present application; [Figure 9] FIG. 2 is a schematic diagram of a hit area provided by an embodiment of the present application. [Figure 10] FIG. 2 is a schematic diagram of a hit area provided by an embodiment of the present application. [Figure 11] FIG. 2 is a schematic diagram of automatic shooting provided by an embodiment of the present application. [Figure 12] FIG. 2 is a schematic diagram of automatic shooting provided by an embodiment of the present application. [Figure 13] 2 is a flowchart of a virtual object shooting control method provided by an embodiment of the present application; [Figure 14] FIG. 2 is a structural schematic diagram of a virtual object shooting control device provided by an embodiment of the present application; [Figure 15] FIG. 2 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] In order to make the objectives, technical solutions and advantages of the present application clearer, the embodiments of the present application are described in more detail below with reference to the drawings. It should be understood that the specific embodiments described herein are merely used to interpret the present application, and are not intended to limit the present application.
[0014] The embodiments of the present application mainly relate to electronic games or simulated training scenes, taking an electronic game scene as an example, a user can operate the terminal in advance, and the terminal can download a game setting file of the electronic game after detecting the user's operation, and the game setting file may include the application program, interface display data or virtual scene data of the electronic game, etc., so that when the user logs into the electronic game on the terminal, the game setting file can be called up to render and display the electronic game interface. A user can perform a touch operation on the terminal, and the terminal can determine game data corresponding to the touch operation after detecting the touch operation, and render and display the game data, and the game data may include virtual scene data, action data of virtual objects in the virtual scene, etc.
[0015] The virtual scene of the present application may be used to simulate a 3D virtual space, a 2D virtual space, or even a 2.5D virtual space, and the virtual space may be an open space. The virtual scene may be used to simulate a real environment in reality, for example, the virtual scene may include sky, land, and sea, and the land may include environmental elements such as desert and city, and the user can control a virtual object to move in the virtual scene. Among them, the virtual object may be a virtual avatar used to represent a virtual user, or a virtual avatar used to represent a virtual living being that has a relationship with the user, such as a pet. The virtual avatar may be in any form, such as a person, an animal, and the present application is not limited thereto.
[0016] The virtual scene may further include other virtual objects, i.e., the virtual scene may include a plurality of virtual objects, each of which has its body shape and volume in the virtual scene and occupies a part of the space in the virtual scene. Taking a shooting game as an example, the user may control the virtual object to perform free fall, gliding, or opening a parachute to fall in the air of the virtual scene, running, jumping, crawling, bending forward, etc. on land, or to perform swimming, drifting, or diving in the sea, etc., of course, the user may also control the virtual object to ride a vehicle to move in the virtual scene, and here, the above scene is merely used as an example for the description, but this is not specifically limited in the embodiment of the present application. The user may also control the virtual object to fight with other virtual objects using a virtual tool, which may be a cold weapon or a firearm, and this is not specifically limited in the embodiment of the present application.
[0017] Generally, what is displayed on the terminal screen is the viewpoint screen of the virtual object controlled by the current terminal, and the aim point of the virtual object controlled by the current terminal may be displayed on the terminal screen, and the aim point may be used to mark an aim target in the viewpoint screen of the virtual object controlled by the current terminal, in which case the position of the aim point in the virtual scene may be the attack point of the virtual object controlled by the current terminal.
[0018] Specifically, the aim point may be displayed at the center of the terminal screen, and of course, the aim point may be displayed at other positions, and the embodiment of the present application is not specifically limited thereto. The aim point may have a plurality of display styles, and in this case, when the aim point is displayed, the system's default display style may be adopted, or may be adjusted according to the user's settings. When the user sees the aim point displayed on the terminal, the user can determine whether the position of the virtual scene corresponding to the current aim point is the area he or she is aiming at, and if it is NO, the user can adjust the viewpoint of the virtual scene by adjusting the viewpoint to adjust the area the aim point is aiming at. Of course, the user usually wants to quickly and accurately adjust the aim point to the body of another virtual object in the virtual scene, so as to be able to shoot, hit, punch, etc., at the other virtual object.
[0019] In the embodiment of the present application, for example, the terminal is a terminal of a certain user, and the other virtual object may be called a first virtual object, and the virtual object controlled by the terminal of the user may be called a second virtual object. A virtual scene may be displayed on the terminal of the user from any viewpoint, and the displayed virtual scene may include the first virtual object located in the display area.
[0020] For example, as shown in FIG. 1 , the terminal may display a viewing screen of a second virtual object within a graphical user interface, the viewing screen may include a virtual scene, and the virtual scene may include a first virtual object and may further include a second virtual object.
[0021] Generally, in a shooting game, when displaying a virtual scene, two display modes may be included: a first-person perspective and a third-person perspective. The first-person perspective is used to simulate observing a virtual scene from the perspective of a virtual object, and in the first-person perspective display mode, the virtual camera may be usually located at the eyeball of the virtual object or a region near the eyeball of the virtual object, such as the head or chest of the virtual object. The third-person perspective is used to simulate observing a virtual scene from a position around the virtual object, and in the third-person perspective display mode, the virtual camera may be usually located behind the virtual object, so that the virtual object can be displayed in the virtual scene, and so that the user can see the movement of the virtual object and its environment in the virtual scene.
[0022] 2 is a flowchart of a virtual object shooting control method provided in an embodiment of the present application, which can be applied to an electronic device, and here, the electronic device is simply taken as an example of a terminal. As shown in FIG. 2, the method includes the following steps 201 to 207:
[0023] Step 201: The terminal obtains a lock area of a first virtual object.
[0024] The terminal can provide an automatic shooting function, which means that the virtual object can be automatically shot without the need for a user to perform a shooting operation. In the embodiment of the present application, a trigger condition for the automatic shooting function can be set, which trigger condition is to complete a lock on a first virtual object, and therefore the terminal first needs to determine whether the lock on the first virtual object is completed through a user operation.
[0025] In one embodiment, before step 201, the terminal may determine whether the first virtual object is included in the viewing screen of the second virtual object, and if the first virtual object is included in the viewing range of the second virtual object, the terminal may execute step 201 to obtain a locking area of the first virtual object, and then determine whether to lock on the first virtual object based on the locking area, and determine whether to provide an automatic shooting function. On the other hand, if the first virtual object is not included in the viewing screen of the second virtual object, the second virtual object has no shooting target, and naturally there is no need to provide an automatic shooting function, and therefore there is no need to execute step 201.
[0026] Wherein, the locking area is an area range around the first virtual object and used for locking the first virtual object. The size of the locking area of the first virtual object is larger than the hit area of the first virtual object and is smaller than the viewing range of the second virtual object. The locking area is a preparation area used for triggering automatic shooting. When the aim point of the second virtual object is within the locking area, that is, when the second virtual object enters a preparation state for whether to perform automatic shooting on the first virtual object, if the aim point of the second virtual object enters the hit area of the first virtual object, the automatic shooting of the second virtual object is immediately triggered.
[0027] In one specific possible embodiment, the locking area may be a region centered on the first virtual object, and the shape of the locking area may be cylindrical, spherical, or other regular or irregular, and the specific shape of the locking area can be set by those skilled in the art based on needs, and is not limited thereto in the embodiment of the present application.
[0028] In one embodiment, the terminal may obtain the lock area of the first virtual object based on the distance between the first virtual object and the second virtual object, and the size of the lock area is positively correlated with the distance. That is, the larger the distance, the larger the size of the lock area, and the smaller the distance, the smaller the size of the lock area. In this way, when the distance between the first virtual object and the second virtual object is very far, the display size of the first virtual object is very small, but the display size of the lock area of the first virtual object is not too small, so that it is relatively easy for the user to move the position of the aim point into the lock area of the first virtual object by operation, thereby facilitating the aim shooting of the first virtual object.
[0029] Regarding the automatic shooting function, some virtual tools may be capable of automatic shooting, while other virtual tools may not be capable of automatic shooting. For example, some virtual tools may be capable of continuous shooting, while other virtual tools may only be capable of single-shot shooting. In this case, the automatic shooting function is mainly for the virtual tools capable of continuous shooting. In this case, the type of virtual tool that provides the automatic shooting function may be set.
[0030] Specifically, the terminal may obtain the type of the virtual tool controlled by the second virtual object, and if the type is a target type, may execute step 201 and the following steps, that is, execute the steps of obtaining a lock area, displaying lock completion notification information, and controlling automatic shooting. If the type is not a target type, the terminal does not need to execute step 201, and does not need to execute the following steps of displaying lock completion notification information and controlling automatic shooting. Wherein, the type of the virtual tool and the target type may be set by those skilled in the art according to needs, or may be set by a user according to his or her own usage habits, and are not limited thereto in the embodiments of the present application.
[0031] In one embodiment, when the first virtual object is completely occluded by a virtual object in a virtual scene within the viewing screen of the second virtual object, the user cannot actually see the first virtual object, and there is no need to provide an automatic shooting function. Therefore, the terminal may first determine whether the first virtual object is completely occluded, and if NO, may provide an automatic shooting function. That is, when there is no complete occlusion between the first virtual object and the second virtual object, the terminal executes the steps of obtaining a lock area, displaying lock completion notification information, and controlling automatic shooting. On the other hand, when there is a complete occlusion between the first virtual object and the second virtual object, the terminal may not need to provide an automatic shooting function.
[0032] Specifically, the determination of complete occlusion may be realized in the following manner: if any connecting lines between the virtual camera of the second virtual object and the first virtual object do not pass through any virtual object in the virtual scene, the terminal may execute the steps of obtaining a locking area, displaying locking completion notification information, and controlling automatic shooting; on the other hand, if all connecting lines between the virtual camera of the second virtual object and the first virtual object pass through any virtual object in the virtual scene, the terminal may not need to execute the steps of obtaining a locking area, displaying locking completion notification information, and controlling automatic shooting.
[0033] Step 202: The terminal obtains the position of the aim point of the second virtual object, and if the aim point is located within the lock area, executes step 203; if the aim point is outside the lock area, continues with step 201 and step 202.
[0034] The terminal may obtain the position of the aim point of the second virtual object and determine the positional relationship between the aim point and the lock area of the first virtual object. If the positional relationship is different, the user's operation intention may be different, and the determination result of whether it is necessary to provide an automatic shooting function will also be different.
[0035] Among them, the positional relationship may include two kinds. In the first kind, the aim point is located in the lock area, and the position of the aim point is relatively close to the first virtual object, indicating that the user may aim at the first virtual object, in this case, the following step 203 may be executed to further determine the user's operation intention. In the second kind, the aim point is located outside the lock area, and the position of the aim point is relatively far from the first virtual object, indicating that the user may not aim at the first virtual object, so there is no need to provide an automatic shooting function, and therefore, steps 201 and 202 may be continued to re-determine the positional relationship between the aim point and the lock area, and to determine whether the user tends to aim at the first virtual object.
[0036] In one embodiment, the position of the aim point acquired by the terminal may take the form of a coordinate, and the acquired lock area may take the form of a coordinate range, and the terminal may determine whether the position coordinate of the aim point is within the coordinate range of the lock area, and if YES, determine that the aim point is located within the lock area, and if NO, determine that the aim point is located outside the lock area. For example, as shown in FIG. 3, the lock area may be a region around the first virtual object, and the aim point may be within the lock area. From another perspective, as shown in FIG. 4, in the actual virtual scene, the aim point is within the lock area.
[0037] In another possible implementation manner, the judgment process may further be realized by a ray detection manner, in which the terminal shoots a ray from the position of the aim point in the direction of the viewpoint, and if the ray collides with the lock area, the terminal may know that the aim point is located within the lock area by feeding back the identifier of the lock area or the collision result, etc., while if there is no collision, the aim point is located outside the lock area. The process of shooting the ray may be realized by calling an interface of unity, in which unity is a product released by unity company.
[0038] In addition, the timing of the above steps 201 and 202 may be arbitrary. Specifically, the terminal may execute step 201 and then execute step 202, or may execute step 202 and then execute step 201, or may execute steps 201 and 202 simultaneously. The embodiment of the present application does not limit the timing of the steps 201 and 202.
[0039] Step 203: The terminal starts timing, and according to different situations in the timing process, the terminal performs step 204 or step 207.
[0040] When it is determined that the aim point is located within the lock area, the terminal may start timing and further determine whether the user is aiming at the first virtual object. If the aim point continues to be located within the lock area within a predetermined time, it indicates that the user may be aiming at the first virtual object, while if the aim point moves out of the lock area, it indicates that the user may not be aiming at the first virtual object. Based on such a principle, a target period may be set, and whether to provide an automatic shooting function may be determined based on a situation in the target period after the start of timing. Specifically, see steps 204 and 207 below.
[0041] In one embodiment, after the terminal starts timing, the terminal may display lock preparation notification information at the position of the aim point of the second virtual object. The lock preparation notification information is used to notify that the first virtual object is being prepared for locking. When the user sees the displayed lock preparation notification information, the user can see that the condition for further locking the first virtual object is currently met. In this case, the user may continuously control the aim point around the first virtual object or move the aim point to the body of the first virtual object.
[0042] The lock preparation notification information may take the form of graphics, text, special effects, etc. In one specific possible embodiment, the lock preparation notification information may be a plurality of triangles displayed at the position of the aim point, and the plurality of triangles are all oriented toward the position of the aim point. For example, as shown in Fig. 5, the terminal may display a triangular graphic at the position of the aim point to identify that the first virtual object is being prepared to lock, and the actual interface of the terminal may be shown in Fig. 6.
[0043] Step 204: When the time reaches the target period, the terminal displays lock completion notification information at the position of the aim point.
[0044] When the timing reaches a target period, it may be determined that the user may be continuously aiming at a first virtual object, and an automatic shooting function may be provided accordingly, and the terminal may display lock completion notification information at the position of the aim point, and the lock completion notification information is used to notify the completion of locking on the first virtual object, and in this case, if the automatic shooting condition is subsequently met, the terminal may be controlled to automatically shoot a second virtual object.
[0045] Wherein, the target period may be set by those skilled in the art based on the needs or the general usage habits of users, and is not limited in the embodiments of the present application. For example, there may be a conversion relationship between the target period, the size of the lock area, and the size of the hit area described below. In one specific example, the setting of the target period may be realized according to the following principle: The period required for the user to move the aim point from the lock area to the hit area through normal aiming operation is the target period. Of course, the target period may be arbitrarily set by those skilled in the art.
[0046] In one specific possible embodiment, the locking completion notification information may be a plurality of triangles, and the plurality of triangles are all directed to the position of the aim point. In one embodiment, the display style of the locking completion notification information may be different from the display style of the lock preparation notification information. For example, the two may have different colors, and the distance between the two and the position of the aim point may also be different. For example, as shown in FIG. 7, the terminal may display a plurality of triangles at the position of the aim point, and the distance between the plurality of triangles and the position of the aim point may be closer than that in FIG. 5, and the colors of the two may also be different, that is, the triangles are indented and changed in color, and the color change is not shown, and the actual interface of the terminal may be shown in FIG. 8.
[0047] In addition, the steps 203 to 204 are a process of displaying lock completion notification information at the position of the aim point when the period during which the aim point of the second virtual object is continuously located within the lock area reaches the target period, and in this process, whether or not to complete locking of the first virtual object is determined based on two dimensions, namely, the positional relationship between the aim point and the first virtual object and the period during which such a positional relationship is maintained between the aim point and the first virtual object. The above steps 203 and 204 are only a situation in which a predetermined condition is satisfied and lock completion notification information is displayed at the position of the aim point, while, when any of the conditions of the two dimensions is not satisfied, the terminal does not need to display lock completion notification information at the position of the aim point, and is, for example, a situation shown in the above step 202 and the following step 207. Alternatively, the terminal may display lock failure notification information.
[0048] Step 205: If the aim point is located within the hit area of the first virtual object, the terminal controls the second virtual object to auto-shoot.
[0049] Wherein, the hit area is an area that can be shot by an opponent. When the aim point of the second virtual object is located within the hit area of the first virtual object and automatic shooting is triggered, the first virtual object can be shot by the second virtual object.
[0050] The size of the hit region is less than the size of the lock region.
[0051] After displaying the lock completion notification information at the position of the aim point, the terminal already provides an automatic shooting function, and further needs to determine whether to control the second virtual object to automatically shoot by determining whether the aim point is within the hit area of the first virtual object.
[0052] Before step 205, the terminal may further obtain a hit area of a first virtual object, and the size of the hit area is less than the size of the locking area, that is, when the locking for the first virtual object is completed and the user wants to shoot the first virtual object, the aim point needs to be moved to a position closer to the first virtual object, so that the hit area can be set, and the size of the hit area is less than the size of the locking area.
[0053] In one embodiment, when the distance between the first virtual object and the second virtual object is different, the size of the hit area may be different. The terminal may obtain the hit area of the first virtual object based on the distance between the first virtual object and the second virtual object, and the size of the hit area is positively correlated with the distance. That is, the larger the distance, the larger the size of the hit area, and the smaller the distance, the smaller the size of the hit area.
[0054] Specifically, the terminal may determine a target size of the hit area based on the distance between the first virtual object and the second virtual object, and obtain an area with the first virtual object as the hit area of the first virtual object, the area being the target size and centered on the first virtual object. In this way, the hit area is an area around the first virtual object that is smaller than the lock area, and when the user aims at the first virtual object, the aim point is moved into the hit area, and the terminal may control the second virtual object to be automatically shot. By setting an area including the first virtual object as the hit area, rather than the area of the first virtual object itself, it is possible to avoid the situation where automatic shooting is frequently terminated due to insufficient accuracy of user operation, thereby effectively improving the continuity of automatic shooting and greatly improving the user experience. In addition, the process of triggering the display of lock completion notification information at the position of the aim point according to the above-mentioned predetermined condition provides simple operation and ensures the fairness of the electronic game.
[0055] Wherein, the shape of the hit area may be a cube, a sphere, an ellipsoid, or other regular or irregular shapes, which can be defined by those skilled in the art based on needs, and is not limited in the embodiments of the present application. For example, as shown in Figures 9 and 10, the hit area is an ellipsoid containing a first virtual object, and the size of the hit area is larger than the size of the first virtual object.
[0056] The above is an example of the terminal obtaining the hit area based on the distance between the two, but in other possible implementations, the size of the hit area may be constant, and the terminal may directly obtain an area of a predetermined size as the hit area. The above step 204 displays the lock completion notification information at the position of the aim point, and in this case, the aim point may already be located in the hit area of the first virtual object, in which case the terminal may control to automatically shoot the second virtual object; at that time, the aim point may be outside the hit area, but the user may move the aim point into the hit area by changing the position of the aim point, and the terminal may control to automatically shoot the second virtual object.
[0057] Similarly, the process of the terminal determining whether the aim point is located in the hit area is the same as the process of the terminal determining whether the aim point is located in the lock area in step 202, and may include at least two implementation methods. In one specific possible embodiment, the step of the terminal obtaining the hit area may be performed when performing step 201, and the terminal may determine which area the aim point is currently located in through the manner of ray detection. Specifically, different levels can be set for the two areas, and a ray can be fired from the aim point, and it can be determined whether the aim point is located in the lock area or the hit area based on the level at which the ray returns, and since the size of the hit area is less than the size of the lock area, the lock area can include the hit area, and in this case, if the aim point is located in the hit area, the aim point is located in the lock area.
[0058] For example, as shown in FIG. 11, the locking for the first virtual object has been completed, and the aim point is located within the hit area, and the terminal controls to automatically shoot the second virtual object, and the actual interface of the terminal is shown in FIG. 12. In another specific example, the first virtual object may not be visible in the field of view of the second virtual object at first because there is a virtual object between the first virtual object and the second virtual object, but after the first virtual object moves, it suddenly appears in the field of view of the second virtual object, and the response time of a person performing a shooting action in the same scene in a real scene can be simulated by determining the target period. In one specific example, the display style of the locking completion indication information and the aim point may be different from the display style in the normal state during automatic shooting.
[0059] The above is a situation where a certain condition is met and the terminal controls to automatically shoot the second virtual object, but the user may not want to shoot the first virtual object, in which case the aim point may be moved to another position, and if the aim point moves out of the lock area of the first virtual object, the first virtual object will no longer meet the lock condition, so the terminal may cancel the display of the lock completion notification information and may not execute step 205.
[0060] Step 206: If the stopping condition is met, the terminal controls the second virtual object to stop automatic shooting.
[0061] After the terminal controls to automatically shoot the second virtual object, the terminal may further set a stop condition to trigger the terminal to control to stop the automatic shooting of the second virtual object. Specifically, the stop condition may include a plurality of types, and when any one of the stop conditions is satisfied, the terminal can control to stop the automatic shooting of the second virtual object. The step 206 may be any one of the following steps 1 to 4.
[0062] Step 1: When it is detected that the aim point moves out of the hit area of the first virtual object, the terminal controls the second virtual object to stop automatic shooting.
[0063] In step 1, the first virtual object may move during the automatic shooting process, and the user may change the position of the aim point, which may cause the aim point to move out of the hit area. In this case, the automatic shooting condition is no longer satisfied, and the terminal may control the second virtual object to stop automatic shooting.
[0064] Step 2: if the number of projectiles of the virtual tool controlled by the second virtual object is 0, the terminal controls the second virtual object to stop automatic shooting.
[0065] In step 2, during the automatic shooting process, the number of projectiles of the virtual tool controlled by the second virtual object may drop to 0, in which case shooting cannot continue, and therefore the terminal may control the second virtual object to stop automatic shooting.
[0066] Step 3: If there is a complete occlusion between the first virtual object and the second virtual object, the terminal controls the second virtual object to stop automatic shooting.
[0067] In step 3, the first virtual object or the second virtual object may move during the automatic shooting process, causing the first virtual object to be completely blocked by a virtual object in the virtual scene, and the first virtual object disappears from the viewing screen of the second virtual object. At this time, the second virtual object no longer needs to be shot, and even if it is shot, it cannot hit the first virtual object, and the terminal may control the second virtual object to stop automatic shooting.
[0068] Step 4: If the first virtual object is in a culled state or a seriously injured state, the terminal controls the second virtual object to stop automatic shooting.
[0069] In step 4, during the automatic shooting process, if the first virtual object is in a culling state, the second virtual object loses the shooting target, so the terminal may control the second virtual object to stop automatic shooting; or, if the first virtual object is in a seriously injured state and the first virtual object is already very weak, the terminal may control the second virtual object to stop automatic shooting, so that the user manually controls the shooting of the second virtual object, providing simple operation, providing convenience, and ensuring the fairness of the electronic game.
[0070] Step 207: If the timing has not reached the target period and the aim point moves out of the lock region, the terminal ends the timing.
[0071] If the timing has not reached the target period but the aiming point has already moved outside the locking area, the user may not even aim at the first virtual object, and may miss the chance to lock the first virtual object due to the user's incorrect operation. In this case, the terminal may end the timing, that is, the current locking process of the first virtual object fails.
[0072] It should be noted that the above is merely a process of locking one first virtual object and providing an automatic shooting function. It is possible that a plurality of first virtual objects are included in the field of view screen of the second virtual object. In this case, a target switching condition may be further set. When both of them satisfy a predetermined condition, after shooting one of the first virtual objects, there is no need to lock the other first virtual object by limiting the target period again. When the positional relationship between the aim point and the lock area matches, the automatic shooting function may be provided.
[0073] Specifically, when a plurality of first virtual objects are included within the field of view of the second virtual object, when one first virtual object is in a culled state or a seriously injured state and the aim point is located within a lock area of another first virtual object, the terminal may continuously display lock completion notification information at the position of the aim point.
[0074] In one specific embodiment, when a plurality of first virtual objects are included in the field of view of the second virtual object, when one first virtual object is in a culled state or a seriously injured state and the aim point is located within a hit area of another first virtual object, the terminal may control the second virtual object to automatically shoot continuously.
[0075] Hereinafter, the specific process of the virtual object shooting control will be described with a specific example in FIG. 13. As shown in FIG. 13, in this example, shooting is called "shoot", a switch button may correspond to the automatic shooting function, and the user may turn on or off the automatic shooting function by operating the switch button. In the embodiment of the present application, the user may first open the automatic shooting setting, and the terminal may judge whether the weapon (virtual tool) supports the automatic shooting condition. This step is also to judge whether the type of the virtual tool is a target type, and the project may configure attributes for various weapons through initialization (initialization, ini), add an autofire attribute to the configuration attribute of ini, and then determine whether automatic shooting is possible based on the attribute. Of course, it may be configured in other ways. If it is determined that the weapon does not support the automatic shooting condition, the terminal does not need to continue the judgment and does not need to provide the automatic shooting function. On the other hand, if the weapon supports the automatic shooting condition, it can detect whether the line of fire aims at the lock frame (i.e., the lock area) of the enemy's body. If NO, the terminal does not need to continue the judgment; if YES, the terminal may enter a shooting countdown state, i.e., start timing to judge the situation in the target period. The terminal may judge whether the countdown ends, and if the countdown ends, may judge whether the damage collision detection frame (i.e., hit area) is aimed; if YES, the terminal may shoot; whereas, if the damage collision detection frame is not aimed, may continue the judgment. When judging whether the countdown ends, if NO, the terminal may continue the judgment. After the terminal controls the shooting, the terminal may detect whether the shooting line leaves the enemy's damage collision frame or whether the bullet is used up; if YES, the terminal may stop shooting; if NO, the terminal may shoot continuously.
[0076] In the embodiment of the present application, it is determined whether to display lock completion notification information at the position of the aim point based on the positional relationship between the aim point and the lock area of the second virtual object and the period during which a certain positional relationship is maintained. That is, it is determined whether the locking of the first virtual object is completed, and if it is completed and the aim point is located within the hit area of the first virtual object, the second virtual object may be controlled to be automatically shot, providing an automatic shooting function, which does not require complicated operations, does not conflict with other operations, is easy and fast to operate, and improves the efficiency of controlling the shooting of virtual objects.
[0077] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described in detail here.
[0078] It should be understood that although the steps of the flowcharts of the above embodiments are shown in order by the arrows, the steps are not necessarily performed in the order indicated by the arrows. Unless otherwise specified in this specification, the execution of the steps is not limited to a strict order, and the steps may be performed in other orders. In addition, at least some of the steps of the above embodiments may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily performed and completed at the same time, but may be performed at different times, and the execution order of these sub-steps or stages is not necessarily sequential, but may be alternated or alternating with other steps or at least a part of the sub-steps or stages of other steps.
[0079] Fig. 14 is a structural schematic diagram of a virtual object shooting control device provided by an embodiment of the present application. The device may be installed in the electronic device of the above embodiment. As shown in Fig. 14, the device includes: an acquisition module 1401 for acquiring a lock area of a first virtual object; a display module 1402 for displaying a lock completion notification information at the position of an aim point of a second virtual object when the period during which the aim point of the second virtual object is continuously located in the lock area reaches a target period, the lock completion notification information for notifying the completion of the lock for the first virtual object; and a control module 1403 for controlling the second virtual object to automatically shoot when the aim point is located in a hit area of the first virtual object, the size of the hit area being less than the size of the lock area.
[0080] In one embodiment, the display module 1402 includes: When the aim point of the second virtual object is located within the lock area, start timing; When the time reaches the target period, a lock completion notification is displayed at the position of the aim point.
[0081] In one embodiment, the display module 1402 is further used for displaying lock preparation notification information at the position of the aim point of the second virtual object.
[0082] In one embodiment, the display module 1402 is further adapted to terminate the timing if the timing has not reached a target period and the aim point moves outside the lock region.
[0083] In one embodiment, the acquiring module 1401 is further used for acquiring a type of a virtual tool controlled by the second virtual object; The acquiring module 1401, the display module 1402 and the control module 1403 are further used for performing the steps of acquiring the lock area, displaying the lock completion notification information and controlling the automatic shooting if the type is a target type.
[0084] In one embodiment, the acquiring module 1401, the display module 1402 and the control module 1403 are further used for performing the steps of acquiring a lock area, displaying a lock completion notification information and controlling automatic shooting when there is no complete occlusion between the first virtual object and the second virtual object.
[0085] In one embodiment, the control module 1403 is further configured to perform one of the following:
[0086] When it is detected that the aim point moves out of a hit area of the first virtual object, the second virtual object is controlled to stop automatic shooting; when a number of projectiles of a virtual tool controlled by the second virtual object is 0, the second virtual object is controlled to stop automatic shooting; when there is a total occlusion between the first virtual object and the second virtual object, the second virtual object is controlled to stop automatic shooting; and when the first virtual object is in a culled state or a seriously injured state, the second virtual object is controlled to stop automatic shooting.
[0087] In one embodiment, the display module 1402 is further configured to: continuously display lock completion notification information at the position of the aim point when a plurality of first virtual objects are included in the field of view of the second virtual object, one of the first virtual objects is in a culled state or a seriously injured state, and the aim point is located within a lock area of another first virtual object.
[0088] In one embodiment, the control module 1403 is further used for controlling the second virtual object to automatically shoot continuously when a plurality of first virtual objects are included in the field of view of the second virtual object, one of the first virtual objects is in a culled state or a seriously injured state, and the aim point is located within a hit area of another first virtual object.
[0089] In one embodiment, the obtaining module 1401 is further used for obtaining a hit area of the first virtual object based on a distance between the first virtual object and the second virtual object, and a size of the hit area is positively correlated to the distance.
[0090] The obtaining module 1401 is further used for obtaining a locking area of the first virtual object based on a distance between the first virtual object and the second virtual object, where the size of the locking area is positively correlated to the distance.
[0091] In one embodiment, the obtaining module 1401 is further used for determining a target size of the hit area based on a distance between the first virtual object and the second virtual object, and obtaining an area centered on the first virtual object and having a target size as the hit area of the first virtual object.
[0092] The device provided in the embodiments of the present application determines whether to display lock completion notification information at the position of the aim point based on the positional relationship between the aim point and the lock area of the second virtual object and the period for which a certain positional relationship is maintained, that is, determines whether the locking of the first virtual object is completed, and if it is completed and the aim point is located within the hit area of the first virtual object, controls the second virtual object to be automatically shot. This provides an automatic shooting function, does not require complex operations, does not conflict with other operations, is easy and fast to operate, and improves the efficiency of controlling the shooting of virtual objects.
[0093] It should be noted that the virtual object shooting control device provided in the above embodiments is merely described by exemplifying the division of the above functional modules when controlling the shooting of a virtual object, but in actual applications, the above functions may be assigned to different functional modules to be completed as necessary, that is, the internal structure of the electronic device is divided into different functional modules to complete all or part of the above-described functions. In addition, the virtual object shooting control device provided in the above embodiments belongs to the same idea as the embodiments of the virtual object shooting control method, and the specific implementation process thereof should be referred to the method embodiments, and a detailed description will not be provided here.
[0094] 15 is a structural schematic diagram of an electronic device provided by an embodiment of the present application, the electronic device 1500 has relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 1501 and one or more memories 1502, in which at least one computer-readable instruction is stored in the one or more memories 1502, and the at least one computer-readable instruction is loaded and executed by the one or more processors 1501 to realize the virtual object shooting control method provided by each of the above method embodiments. Of course, the electronic device 1500 may further include components such as a wired or wireless network interface, a keyboard, and an input / output interface, so as to easily perform input and output, and the electronic device 1500 may further include other components for realizing the functions of the device, which will not be described in detail here.
[0095] In an exemplary embodiment, a computer-readable storage medium is further provided, such as a memory containing computer-readable instructions, which can be executed by a processor to complete the virtual object shooting control method in the above embodiment. For example, the computer-readable storage medium can be a Read-Only Memory (ROM), a Random Access Memory (RAM), a Compact Disc Read-Only Memory (CD-ROM), a tape, a floppy disk, an optical data storage device, etc.
[0096] Those skilled in the art can understand that all or part of the steps for implementing the above embodiments may be completed by hardware, or may be completed by issuing computer-readable instructions to related hardware by a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, etc.
[0097] The above are merely preferred embodiments of the present application, and are not used to limit the present application. Any modifications, equivalent replacements, improvements, etc. made without departing from the spirit and principles of the present application should be included in the protection scope of the present application. [Explanation of symbols]
[0098] 1401 Acquisition Module 1402 Display module 1403 Control Module 1500 Electronic equipment 1501 Processor 1502 Memory
Claims
1. 1. A virtual object shooting control method executed by an electronic device, comprising: obtaining a lock region of a first virtual object; a step of displaying lock completion notification information at a position of the aim point within the lock area when a period during which the aim point of the second virtual object is continuously located within the lock area reaches a target period, the lock completion notification information being used to notify completion of locking of the first virtual object; and a step of controlling automatic shooting of the second virtual object when the aim point is located within a hit area of the first virtual object after the notification of the completion of locking, wherein the hit area is an area around the first virtual object including the first virtual object, a size of the hit area is less than a size of the lock area, and the hit area is inside the lock area.
2. When a period during which the aim point of the second virtual object is continuously located within the lock area reaches a target period, before the step of displaying lock completion notification information at a position of the aim point within the lock area, the virtual object shooting control method further includes: The virtual object shooting control method according to claim 1 , further comprising: determining that the aim point is located within the lock area when a position coordinate of an aim point of a second virtual object is within a coordinate range of the lock area.
3. When a period during which the aim point of the second virtual object is continuously located within the lock area reaches a target period, before the step of displaying lock completion notification information at a position of the aim point within the lock area, the virtual object shooting control method further includes: emitting a single ray from the position of the aim point of the second virtual object in the direction of the viewpoint; 2. The virtual object shooting control method of claim 1, further comprising: determining that the aim point is located within the locked area by feeding back an identifier or a collision result of the locked area when the ray collides with the locked area.
4. When a period during which the aim point of the second virtual object is continuously located within the lock area reaches a target period, the step of displaying lock completion notification information at a position of the aim point within the lock area includes: starting a time measurement when the aim point of the second virtual object is located within the lock area; 2. The virtual object shooting control method according to claim 1, further comprising a step of: displaying lock completion notification information at a position of the aim point within the lock area when the time measurement reaches the target period.
5. After the step of starting timing, the virtual object shooting control method further comprises: The virtual object shooting control method according to claim 4 , further comprising the step of displaying lock preparation notification information at a position of an aim point of the second virtual object.
6. The virtual object shooting control method according to claim 5 , wherein the lock preparation notification information is at least two triangles displayed at the position of the aim point and both of the triangles face the position of the aim point.
7. 7. The virtual object shooting control method according to claim 6, wherein the lock completion notification information is at least two triangles that are displayed at the position of the aim point and both of which face the position of the aim point, and a display style of the triangles that are the lock completion notification information is different from a display style of the triangles that are the lock preparation notification information.
8. After the step of starting timing, the virtual object shooting control method further comprises:
5. The virtual object shooting control method of claim 4, further comprising the step of: terminating the timing if the timing has not reached a target period and the aim point moves out of the lock area.
9. The virtual object shooting control method further comprises: obtaining a type of a virtual tool controlled by the second virtual object; The virtual object shooting control method according to claim 1 , further comprising the steps of: acquiring a lock area, displaying a lock completion notification information, and controlling automatic shooting if the type is a target type.
10. The virtual object shooting control method further comprises:
2. The virtual object shooting control method according to claim 1, wherein, when there is no complete occlusion between the first virtual object and the second virtual object, the steps of acquiring a lock area, displaying lock completion notification information, and controlling automatic shooting are executed.
11. The virtual object shooting control method further comprises: determining that no total occlusion exists between the first virtual object and the second virtual object if any connection line between the virtual camera of the second virtual object and the first virtual object does not pass through a virtual object in the virtual scene; and determining that a total occlusion exists between the first virtual object and the second virtual object when all connection lines between the virtual camera of the second virtual object and the first virtual object pass through a virtual object in a virtual scene.
12. After the step of controlling automatic shooting of the second virtual object when the aim point is located within a hit area of the first virtual object, the virtual object shooting control method further includes: controlling the second virtual object to stop automatic shooting when it is detected that the aim point moves out of a hit region of the first virtual object; controlling the second virtual object to stop automatic shooting when the number of projectiles of the virtual tool controlled by the second virtual object is 0; controlling the second virtual object to stop automatic shooting when a complete occlusion exists between the first virtual object and the second virtual object; and 2. The virtual object shooting control method according to claim 1, further comprising: a step of controlling the second virtual object to stop automatic shooting when the first virtual object is in a selected state or a seriously injured state.
13. The virtual object shooting control method further comprises:
2. The virtual object shooting control method according to claim 1, further comprising: when a plurality of first virtual objects are included in a field of view range of the second virtual object, one first virtual object is in a culled state or a seriously injured state, and the aim point is located within a lock area of another first virtual object, continuing to display lock completion notification information at a position of the aim point within the lock area.
14. The virtual object shooting control method further comprises:
2. The virtual object shooting control method according to claim 1, further comprising: when a plurality of first virtual objects are included within a field of view range of the second virtual object, one first virtual object is in a culled state or a seriously injured state, and the aim point is located within a hit area of another first virtual object, the method further comprises a step of controlling the second virtual object to continue automatic shooting.
15. When the aim point is located within a hit area of the first virtual object, before the step of controlling automatic shooting of the second virtual object, the virtual object shooting control method further includes: obtaining a hit region of the first virtual object based on a distance between the first virtual object and the second virtual object, the size of the hit region being positively correlated to the distance; The step of acquiring a lock region of a first virtual object includes:
2. The virtual object shooting control method according to claim 1, further comprising: acquiring a locking region of the first virtual object based on a distance between the first virtual object and the second virtual object, the size of the locking region being positively correlated to the distance.
16. The step of acquiring a hit region of the first virtual object based on a distance between the first virtual object and the second virtual object includes: determining a target size of the hit region based on a distance between the first virtual object and the second virtual object; The virtual object shooting control method according to claim 15 , further comprising: acquiring an area having a target size centered on the first virtual object as a hit area of the first virtual object.
17. A virtual object shooting control device installed in an electronic device, the virtual object shooting control device comprising: an acquisition module for acquiring a lock area of a first virtual object; a display module that is used to display lock completion notification information at a position of the aim point within the lock area when a period during which the aim point of the second virtual object is continuously located within the lock area reaches a target period, the lock completion notification information being used to notify completion of locking of the first virtual object; and a control module for controlling automatic shooting of the second virtual object when the aim point is located within a hit area of the first virtual object after the notification of the completion of the locking, the hit area being an area around the first virtual object including the first virtual object, a size of the hit area being less than a size of the lock area, and the hit area being inside the lock area.
18. The display module includes: When the aim point of the second virtual object is located within the lock area, a timing is started; The virtual object shooting control device according to claim 17 , further comprising: displaying a lock completion notification at a position of the aim point within the lock area when the time reaches the target period.
19. An electronic device comprising one or more processors and one or more memories, at least one computer-readable instruction being stored in the one or more memories, and the one or more processors loading and executing the computer-readable instruction, thereby implementing the virtual object shooting control method according to any one of claims 1 to 16.
20. One or more computer programs, the computer programs including at least one computer-readable instruction, and a processor loading and executing the computer-readable instruction to implement the virtual object shooting control method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Game apparatus, game control program, and recording medium having the program recorded thereon
JP2003245465A
Game control program, game device, game control method, and recording medium
JP2010268854A
Shooting game program, game system, and shooting game control method
JP2014161530A