Simulation methods, devices, and storage media for anti-aircraft missile target locking
By using array management and three-dimensional coordinate judgment in UE4, the simulation of anti-aircraft missile target locking was realized, which solved the technical difficulties of such operations in UE4 and achieved effective simulation of missile target locking.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN REALIS MULTIMEDIA TECH CO LTD
- Filing Date
- 2023-03-17
- Publication Date
- 2026-04-17
AI Technical Summary
In UE4, there are technical barriers to overcome in simulating the locking of anti-aircraft missiles onto targets.
When an anti-aircraft missile enters the range of a preset collision ball, the target is stored in the array Items. When a target exists in the array Items, an array ItemsB is added to store the targetable target. A series of logical steps are executed to determine the final locked target, including timing, clearing the array, traversal and target determination. The aiming range is determined by using three-dimensional coordinates and the included angle.
It realizes the simulation of anti-aircraft missile target locking, which can effectively simulate the missile target locking process and solve the technical problems of this operation in UE4.
Smart Images

Figure CN117753010B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulation technology, and in particular to a simulation method, device and storage medium for air defense missile target locking. Background Technology
[0002] UE4 is an open-source game engine that supports various platforms including mobile phones, PCs, and handheld consoles. It boasts powerful rendering effects and technologies such as virtual displacement and HDR lighting, enabling the creation of highly realistic game scenes. The UE4 development engine allows for real-time rendering, facilitating excellent game development and editing of characters, items, AI, and more. It is geared towards all developers using real-time technologies, providing professionals across various industries with boundless creative freedom and unprecedented control.
[0003] In UE4, created characters can mimic real people to perform various actions, including virtual driving, virtual rowing, virtual flight, and virtual soccer. These actions are composed of multiple independent behaviors, each requiring a separate technological framework. While many action construction technologies are now quite mature, some still face significant technological barriers. Currently, simulating anti-aircraft missile target locking in UE4 remains a challenging problem. Summary of the Invention
[0004] This application provides a simulation method, device, and storage medium for air defense missile target locking, which can be used to simulate air defense missile target locking.
[0005] In view of the above, the first aspect of this application provides a simulation method for locking onto targets by an air defense missile, characterized in that the method includes: when a target enters the range of a preset collision ball, storing the target in an array Items; when there is a target in array Items, adding an array ItemsB to store the targetable targets, and performing the following steps: Step 1: if the target being locked exists, then the locked target is the final target to be locked, and this frame logic ends; if the target being locked does not exist, then proceed to Step 2; Step 2: if the target being aimed exists, then start timing, and when the timing reaches N seconds, set the target being aimed as the final target to be locked, and this frame logic ends; Step 3: clear array ItemsB, traverse array Items, if a target enters the aiming range, then add the target to array ItemsB; if there is at least one target in array ItemsB, then determine the final target to be locked from the at least one target, and clear the timer, and this frame logic ends.
[0006] Optionally, in conjunction with the first aspect, in one possible implementation, in step two, the method further includes: if the target being targeted leaves the aiming range during the timing process, the timing is reset to zero, the target being targeted is set to empty, and step three is executed; if the target being targeted does not exist, step three is executed.
[0007] Optionally, in conjunction with the first aspect, in one possible implementation, in step three, the method further includes: if there is no target in array ItemsB, then the logic of this frame ends; if there is at least one target in array ItemsB, then determining the final locked target from the at least one target specifically includes: if there is only one target in array ItemsB, then determining the one target as the final locked target; if there are at least two targets in array ItemsB, then setting the target closest to the anti-aircraft missile as the final locked target.
[0008] Optionally, in conjunction with the first aspect, in one possible implementation, the method further includes: removing the target from the array Items when the target leaves the range of the preset collision ball, wherein the collision ball is a sphere with the center of the anti-aircraft missile as the center and a radius of X, where X is the range of the anti-aircraft missile and X > 0.
[0009] Optionally, in conjunction with the first aspect, in one possible implementation, step three, where a target enters the aiming range, specifically includes: the three-dimensional coordinates of the anti-aircraft missile pointing at the target are V4 = V1 - V2, where the three-dimensional coordinates of the target's location are V1 and the three-dimensional coordinates of the anti-aircraft missile's location are V2; the angle between V4 and V3 is b, where the forward direction of the anti-aircraft missile's aiming scope is V3; if angle b ≤ a, then it is determined that the target has entered the aiming range.
[0010] The second aspect of this application provides a simulation device for locking onto targets by an air defense missile. The device includes: a first processing module, used to store the target in an array Items when it enters the range of a preset collision ball; and a second processing module, used to add an array ItemsB to store the targetable targets when a target exists in array Items, and to execute the following steps: Step 1: If a target being locked exists, the locked target is the final target to be locked, and this frame logic ends; if a target being locked does not exist, then proceed to Step 2; Step 2: If a target being aimed exists, then start a timer. When the timer reaches N seconds, set the target being aimed as the final target to be locked, and this frame logic ends; Step 3: Clear array ItemsB, traverse array Items, and if a target enters the aiming range, add the target to array ItemsB; if at least one target exists in array ItemsB, determine the final target to be locked from the at least one target, and clear the timer, and this frame logic ends.
[0011] Optionally, in conjunction with the second aspect, in one possible implementation, the second processing module is specifically used to: if the target being targeted leaves the aiming range during the timing process, the timing is reset to zero, the target being targeted is set to empty, and step three is executed; if the target being targeted does not exist, step three is executed.
[0012] Optionally, in conjunction with the second aspect, in one possible implementation, the second processing module is specifically used for: if there is no target in array ItemsB, then the logic of this frame ends; if there is at least one target in array ItemsB, then determining the final locked target from the at least one target specifically includes: if there is only one target in array ItemsB, then determining the one target as the final locked target; if there are at least two targets in array ItemsB, then setting the target closest to the anti-aircraft missile as the final locked target.
[0013] A third aspect of this application provides a simulation device for anti-aircraft missile target locking, characterized in that the device includes: a memory and at least one processor, the memory storing instructions, the memory being interconnected with the at least one processor via a circuit; the at least one processor invokes the instructions in the memory to cause the device to execute the simulation method for anti-aircraft missile target locking as described in any one of the first aspects of this application.
[0014] The fourth aspect of this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform a simulation method for locking onto a target by an air defense missile as described in any one of the first aspects of this application.
[0015] This application provides a simulation method, device, and storage medium for anti-aircraft missile target locking. The method includes: when a target enters the range of a preset collision ball, storing the target in an array Items; when a target exists in array Items, creating a new array ItemsB to store targetable targets, and executing the following steps: Step 1: If a target being locked exists, the locked target is the final target to be locked, and this frame logic ends; if the target being locked does not exist, proceed to Step 2; Step 2: If a target being aimed exists, start a timer; when the timer reaches N seconds, set the target being aimed as the final target to be locked, and this frame logic ends; Step 3: Clear array ItemsB, traverse array Items, if a target enters the aiming range, add the target to array ItemsB; if at least one target exists in array ItemsB, determine the final target to be locked from the at least one target, and reset the timer, and this frame logic ends. This method enables the simulation of anti-aircraft missile target locking. Attached Figure Description
[0016] Figure 1 A schematic diagram of an anti-aircraft missile provided for an embodiment of this application;
[0017] Figure 2 A schematic diagram illustrating a simulation method for locking onto a target by an air defense missile, provided in an embodiment of this application;
[0018] Figure 3 A schematic diagram of an aiming range provided for an embodiment of this application;
[0019] Figure 4 A schematic diagram of the structure of a simulation device for locking onto targets by an air defense missile, provided in an embodiment of this application;
[0020] Figure 5 This is a schematic diagram of the structure of a simulation device for locking onto targets by an air defense missile, provided in an embodiment of this application. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] The term "and / or" appearing in this application can describe the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Additionally, the character " / " in this application generally indicates that the preceding and following related objects have an "or" relationship.
[0023] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0024] In UE4, created characters can mimic real people to perform various actions, including virtual driving, virtual rowing, virtual flight, and virtual soccer. These actions are composed of multiple independent behaviors, each requiring a separate technological framework. While many action construction technologies are now quite mature, some still face significant technological barriers. Currently, simulating anti-aircraft missile target locking in UE4 remains a challenging problem.
[0025] Therefore, this application provides a simulation method for anti-aircraft missile target locking, which is used to simulate anti-aircraft missile target locking, such as... Figure 1 As shown, the anti-aircraft missile can be the Qianwei-2. The method includes:
[0026] S110. When the target enters the range of the preset collision ball, the target is stored in the array Items.
[0027] When a target enters the range of a preset collision ball, the target is stored in the array Items.
[0028] It should be noted that before the target enters the firing range, a collision sphere with a radius of X meters can be added to the center of the anti-aircraft missile model. (X is the missile's range, X>0).
[0029] When a target enters the range of this collision ball, it is stored in the array Items;
[0030] When a target leaves the range of this collision ball, remove it from the Items array.
[0031] S120. When there is a target in the array Items, a new array ItemsB is created to store the targetable targets and the following steps are performed.
[0032] When a target exists in the array Items, a new array ItemsB is created to store the targetable targets, and steps one through three are executed.
[0033] S130, Step 1: If the target being locked exists, then the locked target is the final locked target being searched for, and this frame logic ends; if the target being locked does not exist, then proceed to Step 2.
[0034] Step 1: If the target being locked exists, then the locked target is the final locked target being searched for, and this frame logic ends; if the target being locked does not exist, then proceed to Step 2.
[0035] S140, Step 2: If the target being targeted exists, start timing. When the timer reaches N seconds, set the target being targeted as the final locked target, and this frame logic ends.
[0036] Step 2: If the target being targeted exists, start timing. When the timer reaches N seconds, set the target being targeted as the final locked target, and this frame logic ends.
[0037] It is worth noting that if the target being aimed at leaves the aiming range during the timing process, the timer is reset to zero, the target being aimed at is set to empty, and step three is executed; if the target being aimed at does not exist, step three is executed.
[0038] S150, Step 3: Clear array ItemsB, traverse array Items, if a target enters the aiming range, add the target to array ItemsB; if there is at least one target in array ItemsB, determine the final locked target from the at least one target, and clear the timer, and this frame logic ends.
[0039] Step 3: Clear array ItemsB, iterate through array Items, if a target enters the aiming range, add the target to array ItemsB; if there is at least one target in array ItemsB, determine the final locked target from the at least one target, and clear the timer, and this frame logic ends.
[0040] Understandably, in step three, the method also includes:
[0041] If there is no target in array ItemsB, the logic of this frame ends; if there is at least one target in array ItemsB, then determining the final locked target from the at least one target specifically includes: if there is only one target in array ItemsB, then that one target is determined as the final locked target; if there are at least two targets in array ItemsB, then the target closest to the anti-aircraft missile is set as the final locked target.
[0042] It should be added that the simulation method for anti-aircraft missile target locking provided in this application can also determine whether the target has entered the aiming range. Please see [link to application]. Figure 3 The aiming range provided in this application can be a cone.
[0043] The apex of the cone represents the center of the missile sight, and angle 'a' is the aiming angle, which defaults to 5 degrees and can be changed.
[0044] Among them, the three-dimensional coordinates of the anti-aircraft missile pointing at the target are V4 = V1 - V2, where the three-dimensional coordinates of the target's location are V1 and the three-dimensional coordinates of the anti-aircraft missile's location are V2.
[0045] The angle between V4 and V3 is b, where the forward direction of the anti-aircraft missile sight is V3;
[0046] If angle b ≤ a, then the target is within the aiming range. Otherwise, the target is outside the aiming range.
[0047] This application provides a simulation method, device, and storage medium for anti-aircraft missile target locking. The method includes: when a target enters the range of a preset collision ball, storing the target in an array Items; when a target exists in array Items, creating a new array ItemsB to store targetable targets, and executing the following steps: Step 1: If a target being locked exists, the locked target is the final target to be locked, and this frame logic ends; if the target being locked does not exist, proceed to Step 2; Step 2: If a target being aimed exists, start a timer; when the timer reaches N seconds, set the target being aimed as the final target to be locked, and this frame logic ends; Step 3: Clear array ItemsB, traverse array Items, if a target enters the aiming range, add the target to array ItemsB; if at least one target exists in array ItemsB, determine the final target to be locked from the at least one target, and reset the timer, and this frame logic ends. This method enables the simulation of anti-aircraft missile target locking.
[0048] This application also provides a simulation device 200 for anti-aircraft missile target locking, please refer to [link to relevant documentation]. Figure 4 The anti-aircraft missile target-locking simulation device 200 includes:
[0049] The first processing module 201 is used to store the target in the array Items when the target enters the range of the preset collision ball;
[0050] The second processing module 202 is used to create a new array ItemsB to store targetable targets when there are targets in the array Items, and to perform the following steps:
[0051] Step 1: If the target being locked exists, then the locked target is the final target to be locked, and this frame logic ends; if the target being locked does not exist, proceed to Step 2; Step 2: If the target being aimed at exists, start timing. When the timer reaches N seconds, set the target being aimed at as the final target to be locked, and this frame logic ends; Step 3: Clear array ItemsB, traverse array Items. If a target enters the aiming range, add the target to array ItemsB; if there is at least one target in array ItemsB, determine the final target to be locked from the at least one target, and reset the timer to zero, and this frame logic ends.
[0052] Furthermore, the second processing module 202 is specifically used to: if the target being targeted leaves the aiming range during the timing process, the timing is reset to zero, the target being targeted is set to empty, and step three is executed; if the target being targeted does not exist, step three is executed.
[0053] Furthermore, the second processing module 202 is specifically used for: if there is no target in array ItemsB, then the logic of this frame ends; if there is at least one target in array ItemsB, then determining the final locked target from the at least one target specifically includes: if there is only one target in array ItemsB, then determining the one target as the final locked target; if there are at least two targets in array ItemsB, then setting the target closest to the anti-aircraft missile as the final locked target.
[0054] This application also provides a structural schematic diagram of a simulation device for anti-aircraft missile target locking, please refer to [link / reference]. Figure 5 The simulation device 300 for anti-aircraft missile target locking can vary considerably depending on its configuration or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the figure). Furthermore, the processor 310 may be configured to communicate with the storage media 330 to execute a series of instructions stored in the storage media 330 on the anti-aircraft missile target locking simulation device 300.
[0055] The simulation device 300 based on anti-aircraft missile target locking may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 5 The structure of the air defense missile target locking simulation device 300 shown does not constitute a limitation on the air defense missile target locking simulation device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0056] This application also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the simulation method for locking onto an air defense missile target.
[0057] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0058] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0059] In the embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways without departing from the spirit and scope of this application. The current embodiments are merely exemplary examples and should not be considered limiting, nor should the specific content given limit the purpose of this application. For example, some features may be omitted or not performed.
[0060] The technical means disclosed in this application are not limited to those disclosed in the above embodiments, but also include technical solutions composed of any combination of the above technical features. It should be noted that those skilled in the art can make several improvements and modifications without departing from the principles of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.
[0061] The foregoing has provided a detailed description of a simulation method, apparatus, and storage medium for anti-aircraft missile target locking provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for simulating the target locking of an air defense missile, characterized in that, The method includes: When a target enters the range of the preset collision ball, the target is stored in the array Items; When a target exists in array Items, a new array ItemsB is created to store the targetable targets, and the following steps are performed: Step 1: If the target being locked exists, then the locked target is the final locked target being searched for, and this frame logic ends; if the target being locked does not exist, then proceed to Step 2. Step 2: If the target being targeted exists, start timing. When the timer reaches N seconds, set the target being targeted as the final locked target, and this frame logic ends. Step 3: Clear array ItemsB, iterate through array Items, if a target enters the aiming range, add the target to array ItemsB; if there is at least one target in array ItemsB, determine the final locked target from the at least one target, and clear the timer, and this frame logic ends. In step two, the method further includes: If the target being aimed at leaves the aiming range during the timing process, the timer is reset to zero, the target being aimed at is set to empty, and step three is executed; if the target being aimed at does not exist, step three is executed. In step three, the method further includes: If there is no target in array ItemsB, the logic of this frame ends; If there is at least one target in the array ItemsB, then determining the finally locked target from the at least one target specifically includes: If there is only one target in the array ItemsB, then that target is determined as the final target to be locked; if there are at least two targets in the array ItemsB, then the target closest to the anti-aircraft missile is set as the final target to be locked. The method further includes: When the target leaves the range of the preset collision ball, the target is removed from the array Items, where the collision ball is a sphere with the center of the anti-aircraft missile as the center and a radius of X, where X is the range of the anti-aircraft missile and X > 0.
2. The simulation method for anti-aircraft missile target locking according to claim 1, characterized in that, Step three, specifically, includes the following: The target entering the aiming range. The aiming range is a cone, the vertex of which is the center of the missile sight, the angle 'a' is the aiming angle, and the three-dimensional coordinates of the anti-aircraft missile pointing at the target are V4 = V1 - V2, where the three-dimensional coordinates of the target's location are V1 and the three-dimensional coordinates of the anti-aircraft missile's location are V2. The angle between V4 and V3 is b, where the forward direction of the anti-aircraft missile sight is V3; If angle b ≤ a, then the target is confirmed to be within the aiming range.
3. A simulation device for anti-aircraft missile target locking, characterized in that, The device is used to implement the simulation method for locking onto a target by an air defense missile as described in claim 1, and the device includes: The first processing module is used to store the target in the array Items when the target enters the range of the preset collision ball; The second processing module, when a target exists in the array Items, creates a new array ItemsB to store the targetable targets and performs the following steps: Step 1: If the target being locked exists, then the locked target is the final locked target being searched for, and this frame logic ends; if the target being locked does not exist, then proceed to Step 2. Step 2: If the target being targeted exists, start timing. When the timer reaches N seconds, set the target being targeted as the final locked target, and this frame logic ends. Step 3: Clear array ItemsB, traverse array Items, if a target enters the aiming range, add the target to array ItemsB; if there is at least one target in array ItemsB, determine the final locked target from the at least one target, and clear the timer, and this frame logic ends.
4. The simulation device for anti-aircraft missile target locking according to claim 3, characterized in that, The second processing module is specifically used for: If the target being aimed at leaves the aiming range during the timing process, the timer is reset to zero, the target being aimed at is set to empty, and step three is executed; if the target being aimed at does not exist, step three is executed.
5. The simulation device for anti-aircraft missile target locking according to claim 4, characterized in that, The second processing module is specifically used for: If there is no target in array ItemsB, the logic of this frame ends; If there is at least one target in the array ItemsB, then determining the final locked target from the at least one target specifically includes: If there is only one target in the array ItemsB, then that target is determined as the final target to be locked; if there are at least two targets in the array ItemsB, then the target closest to the anti-aircraft missile is set as the final target to be locked.
6. A simulation device for anti-aircraft missile target locking, characterized in that, The device includes: a memory and at least one processor, wherein the memory stores instructions and the memory is interconnected with the at least one processor via a line; The at least one processor invokes instructions in the memory to cause the device to execute a simulation method for locking onto a target by an anti-aircraft missile as described in any one of claims 1-2.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed by a processor, cause the processor to perform the simulation method for locking onto a target by an air defense missile as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Shooting game auxiliary aiming method and device, storage medium, processor and terminal
CN108939540A
Pursuing effect display method and device, computer equipment and storage medium
CN110575669A