Weapon hit processing method, device, equipment and storage medium

By displaying the movement trajectory of particle collections in a virtual game scene and using target trigger boxes to determine hits, the performance consumption and authenticity issues of particle weapon hit determination on low-performance devices are solved, and an efficient and realistic simulation effect is achieved.

CN115671749BActive Publication Date: 2025-09-16NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211363956.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-02
Publication Date
2025-09-16
Estimated Expiration
2042-11-02

AI Technical Summary

Technical Problem

In the existing technology, the hit determination method of particle-type weapons has high performance consumption or poor hit authenticity, and cannot achieve efficient and realistic simulation on low-performance equipment.

Method used

By displaying the moving trajectory of the particle set of the target virtual weapon in the virtual game scene, determining the display area of ​​the target trigger box based on the trajectory, and judging the hit according to the positional relationship between the trigger box and the virtual character, the target trigger box is used to represent the moving trajectory of the particle set, reducing device performance consumption and improving hit authenticity.

Benefits of technology

It achieves realistic simulation of particle weapon hits on low-performance devices, reducing device performance consumption while improving the authenticity and simulation effect of hits.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115671749B_ABST
    Figure CN115671749B_ABST
Patent Text Reader

Abstract

The present application provides a weapon hit processing method, apparatus, device, and storage medium, belonging to the field of electronic game technology. The method includes: in response to a trigger operation on a target virtual weapon, displaying the movement trajectory of a particle set emitted by the target virtual weapon in a virtual game scene; determining a display area of ​​a target trigger box based on the movement trajectory of the particle set, the target trigger box being used to represent the virtual space occupied by the movement trajectory of the particle set; and determining whether the target virtual weapon has hit the target virtual character based on the positional relationship between the target trigger box and the target virtual character. This application can reduce device performance while maintaining a realistic simulation of the real scene, thereby improving the authenticity of the hit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic game technology, and more specifically, to a weapon hit processing method, device, equipment, and storage medium. Background Art

[0002] In shooting games, there are many types of firearms. Different types of firearms have different attack methods. For weapons with particle attacks (for example, flamethrowers, stun guns, or any type of weapon that uses the diffusion of elemental particles as an attack method), it is usually necessary to determine whether the ammunition fired by the weapon hits the virtual character.

[0003] In the prior art, the hit determination of particle weapons is usually carried out by turning on particle special effects collision detection, and determining a hit when the particle hits the target; or, using particles with collision function to simulate the collision of the example.

[0004] However, if particle effects are turned on, it will lead to greater performance consumption and is not suitable for low-performance electronic devices; if particle simulation is used, the hit realism will be poor and it will not be able to simulate the real scene well. Summary of the Invention

[0005] The purpose of this application is to provide a weapon hit processing method, device, equipment and storage medium, which can reduce the performance consumption of the equipment while maintaining the simulation of the real scene and improving the authenticity of the hit.

[0006] The embodiment of the present application is implemented as follows:

[0007] In one aspect of an embodiment of the present application, a weapon hit processing method is provided. A terminal device provides a graphical user interface, the graphical user interface being used to display a virtual game scene, the virtual game scene including a target virtual weapon and a target virtual character. The method includes:

[0008] In response to a triggering operation on a target virtual weapon, displaying a moving trajectory of a particle set emitted by the target virtual weapon in a virtual game scene;

[0009] Determine the display area of ​​the target trigger box based on the moving trajectory of the particle set, and the target trigger box is used to represent the virtual space occupied by the moving trajectory of the particle set;

[0010] According to the positional relationship between the target trigger box and the target virtual character, it is determined whether the target virtual weapon hits the target virtual character.

[0011] Another aspect of an embodiment of the present application provides a weapon hit processing device, which provides a graphical user interface through a terminal device, the graphical user interface being used to display a virtual game scene, the virtual game scene including: a target virtual weapon and a target virtual character, the device including: a response module, a region determination module, and a hit determination module;

[0012] A response module, configured to display a moving trajectory of a particle set emitted by the target virtual weapon in a virtual game scene in response to a triggering operation on the target virtual weapon;

[0013] An area determination module, configured to determine a display area of ​​a target trigger box based on the movement trajectory of the particle set, wherein the target trigger box is configured to represent a virtual space occupied by the movement trajectory of the particle set;

[0014] The hit determination module is used to determine whether the target virtual weapon hits the target virtual character according to the positional relationship between the target trigger box and the target virtual character.

[0015] Another aspect of an embodiment of the present application provides a computer device including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the weapon hit processing method are implemented.

[0016] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the weapon hit processing method are implemented.

[0017] The beneficial effects of the embodiments of the present application include:

[0018] In the weapon hit processing method provided in the embodiment of the present application, the moving trajectory of the particle set emitted by the target virtual weapon can be displayed in the virtual game scene in response to the trigger operation of the target virtual weapon, and then the display area of ​​the target trigger box can be determined based on the moving trajectory of the particle set. That is to say, the moving trajectory of the emitted particle set can be represented by the target trigger box, and then whether the target virtual weapon hits the target virtual character can be determined based on the positional relationship between the target trigger box and the target virtual character. Among them, determining whether it hits by determining the positional relationship between the target trigger box and the target virtual character has low performance consumption of the device, and since the display area of ​​the target trigger box is obtained based on the moving trajectory of the particle set emitted by the target virtual weapon, the determination of the positional relationship between the target trigger box and the target virtual character can also more realistically reflect the hit situation of the target virtual weapon, thereby improving the authenticity of the simulation. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0020] Figure 1 A schematic diagram of a graphical user interface provided in an embodiment of the present application;

[0021] Figure 2 A flowchart of a weapon hit processing method provided in an embodiment of the present application;

[0022] Figure 3 A schematic diagram of the specific structure of the trigger box provided in an embodiment of the present application;

[0023] Figure 4 Another schematic flow chart of the weapon hit processing method provided in an embodiment of the present application;

[0024] Figure 5 Another schematic flow chart of the weapon hit processing method provided in an embodiment of the present application;

[0025] Figure 6 Another schematic flow chart of the weapon hit processing method provided in an embodiment of the present application;

[0026] Figure 7 Another schematic flow chart of the weapon hit processing method provided in an embodiment of the present application;

[0027] Figure 8 A schematic diagram of the structure of the trigger box provided in an embodiment of the present application after parameter adjustment;

[0028] Figure 9 Another schematic flow chart of the weapon hit processing method provided in an embodiment of the present application;

[0029] Figure 10 A schematic diagram of a scenario in which a target virtual weapon hits a target virtual character provided in an embodiment of the present application;

[0030] Figure 11 A schematic diagram of the structure of a weapon hit processing device provided in an embodiment of the present application;

[0031] Figure 12 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Generally, the components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations.

[0033] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present application. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in the present application without creative work are within the scope of protection of the present application.

[0034] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not require further definition or explanation in subsequent drawings.

[0035] In the description of this application, it should be noted that the terms "first", "second", "third", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0036] The weapon hit processing method in one embodiment of the present application can be executed on a terminal device or a server. The terminal device can be a local terminal device. When the game display method is executed on a server, the method can be implemented and executed based on a cloud interaction system, which includes a server and a client device.

[0037] In an optional embodiment, various cloud applications, such as cloud games, can be run under the cloud interaction system. Taking cloud games as an example, cloud games refer to a gaming method based on cloud computing. In the cloud gaming operation mode, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the game display method are completed on the cloud gaming server. The role of the client device is to receive and send data and present the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, TV, computer, PDA, etc.; but the terminal device for information processing is the cloud gaming server in the cloud. When playing the game, the player operates the client device to send operation instructions to the cloud gaming server. The cloud gaming server runs the game according to the operation instructions, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.

[0038] In an optional embodiment, the terminal device can be a local terminal device. Taking a game as an example, the local terminal device stores the game program and is used to present the game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally downloading and installing the game program through an electronic device and running it. The local terminal device can provide the graphical user interface to the player in various ways, for example, it can be rendered and displayed on the terminal display, or provided to the player through holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present the graphical user interface, the graphical user interface including the game screen, and the processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0039] In one possible implementation, an embodiment of the present invention provides a weapon hit processing method, providing a graphical user interface through a first terminal device, wherein the first terminal device can be the local terminal device mentioned above, or it can be a client device in the cloud interaction system mentioned above.

[0040] The following specifically explains the content displayed in the graphical user interface used in the weapon hit processing method provided in the embodiment of the present application.

[0041] Figure 1 For a schematic diagram of the graphical user interface provided in this application embodiment, please refer to Figure 1 , a graphical user interface is provided through the terminal device, and the graphical user interface is used to display a virtual game scene, which includes: a target virtual weapon 110 and a target virtual character 120.

[0042] Optionally, the virtual game scene may specifically be a three-dimensional virtual scene for simulating a display scene, and the virtual scene may include a target virtual weapon 110 and a target virtual character 120 .

[0043] Among them, the target virtual weapon 110 can be any particle diffusion type weapon, such as a flamethrower, an electric shock gun, a water mist gun, etc., without limitation. These target virtual weapons 110 can be equipped by corresponding virtual characters, and can be controlled to fire (i.e., emit particles) under the operation of the player.

[0044] The target virtual characters 120 can be characters existing in the scene. These characters can be similar to the virtual characters equipped with the target virtual weapons 110 mentioned above. They can all be virtual characters controlled by players, or they can also be virtual characters controlled by robots. There is no specific limitation here. The target virtual weapon 110 can hit these target virtual characters 120 by emitting particles.

[0045] The following is a detailed explanation of the specific implementation process of the weapon hit processing method provided in the embodiment of the present application.

[0046] Figure 2 For a flow chart of the weapon hit processing method provided in the embodiment of the present application, please refer to Figure 2 , the method comprising:

[0047] S210: In response to a triggering operation on a target virtual weapon, a moving trajectory of a particle set emitted by the target virtual weapon is displayed in a virtual game scene.

[0048] Optionally, the triggering operation of the target virtual weapon can be an operation of firing the target virtual weapon by the player through a touch screen, mouse keys or any type of control method. After the triggering operation of the target virtual weapon is performed, the target virtual weapon can emit corresponding particles. For example, for a flamethrower, corresponding flames can be emitted, that is, corresponding flame effects are displayed in the virtual game scene. These flame effects can be pre-configured playback animations, can move according to predetermined trajectories, and can be configured according to actual scene requirements. For example, the flame can extend and spread in one direction, and under the influence of gravity, it will fall to the ground and disappear after spreading a certain distance.

[0049] It should be noted that the moving trajectory of the particle set emitted by the target virtual weapon is also the movement trajectory of each particle in the animation played in the virtual scene displayed through the graphical user interface after the target virtual weapon is fired. For the graphical user interface, the displayed content can be divided into multiple frames. For each frame, the movement trajectory of each particle is also the position of each particle in that frame.

[0050] For example, when the target virtual weapon is a flamethrower, in response to a firing trigger operation on the flamethrower, a moving trajectory of a set of flame particles emitted by the flamethrower can be displayed in the virtual game scene.

[0051] S220: Determine a display area of ​​the target trigger box based on the movement trajectory of the particle set.

[0052] The target trigger box is used to represent the virtual space occupied by the moving trajectory of the particle set.

[0053] Optionally, the movement trajectory of the particle set can specifically be a part of the spatial area in the virtual game scene, and this part of the area can be used as the display area of ​​the target trigger box, wherein the target trigger box can be a virtual space occupied by the movement trajectory of the particle set represented by any type of three-dimensional body.

[0054] Specifically, the target trigger box may be a virtual space area composed of at least one regular three-dimensional body or an irregular three-dimensional body.

[0055] For example, the target trigger box can be represented by one or more interconnected cylinders.

[0056] The display area of ​​the target trigger box is determined by the moving trajectory of the particle set, that is, the edge of the target trigger box can be used to represent the edge of the entire particle set, thereby improving the authenticity of the simulation.

[0057] S230: Determine whether the target virtual weapon hits the target virtual character based on the positional relationship between the target trigger box and the target virtual character.

[0058] Optionally, after determining the display area of ​​the target trigger box, whether the target virtual weapon hits the target virtual character is determined by determining the positional relationship between the target trigger box and the target virtual character.

[0059] The target virtual character also occupies a certain position in the virtual game scene, and whether a hit occurs can be determined by judging whether there is a contact point between the target trigger box and the target virtual character.

[0060] For example, if the target trigger box has a contact point with the target virtual character, it can be determined that the target virtual weapon hits the target virtual character; conversely, if the target trigger box has no contact point with the target virtual character, it can be determined that the target virtual weapon does not hit the target virtual character.

[0061] It should be noted that, to determine the positional relationship between the target trigger box and the target virtual character, it is only necessary to determine whether the two are in contact in a certain area. For the terminal device, the required device performance is relatively low.

[0062] In the weapon hit processing method provided in the embodiment of the present application, the moving trajectory of the particle set emitted by the target virtual weapon can be displayed in the virtual game scene in response to the trigger operation of the target virtual weapon, and then the display area of ​​the target trigger box can be determined based on the moving trajectory of the particle set. That is to say, the moving trajectory of the emitted particle set can be represented by the target trigger box, and then whether the target virtual weapon hits the target virtual character can be determined based on the positional relationship between the target trigger box and the target virtual character. Among them, determining whether it hits by determining the positional relationship between the target trigger box and the target virtual character has low performance consumption of the device, and since the display area of ​​the target trigger box is obtained based on the moving trajectory of the particle set emitted by the target virtual weapon, the determination of the positional relationship between the target trigger box and the target virtual character can also more realistically reflect the hit situation of the target virtual weapon, thereby improving the authenticity of the simulation.

[0063] The specific structural relationship of the target trigger box involved in the embodiments of the present application is explained in detail below.

[0064] Figure 3 For a detailed structural diagram of the trigger box provided in this embodiment, please refer to Figure 3 ,The target trigger box includes at least one trigger segment, and each trigger segment is used to represent a subspace in the virtual space occupied by the movement trajectory of the particle set.

[0065] Optionally, each trigger segment can be a regular three-dimensional body or an irregular three-dimensional body. In actual use, the corresponding three-dimensional body type can be selected according to actual needs, such as: a cylinder, a table, a cone, a sphere or any irregular body, etc., and no specific restrictions are made here.

[0066] For example, if the target virtual weapon is a flamethrower, the ejected flame particle effect can be simulated as multiple cylinders of different sizes.

[0067] Figure 3 An example of a target trigger box shown is a target trigger box when the target virtual weapon is a flamethrower. The target trigger box may include three trigger segments connected in sequence, wherein the bottom area and height of the cylinder of the first segment may be smaller than the bottom area and height of the cylinder of the second segment, and the bottom area and height of the cylinder of the second segment may be smaller than the bottom area and height of the cylinder of the third segment, so as to simulate flame particles ( Figure 3 In the 3D scene, a 2D perspective is used to represent a 3D scene. A rectangle can be used to represent a cylinder. The length of the rectangle is the height of the cylinder, and the width of the rectangle is the diameter of the base of the cylinder).

[0068] The following specifically explains the specific implementation process of determining the display area of ​​the target trigger box based on the movement trajectory of the particle set in the weapon hit processing method provided in the embodiment of the present application.

[0069] Figure 4 For another flow chart of the weapon hit processing method provided in the embodiment of the present application, please refer to Figure 4 , based on the moving trajectory of the particle set, the display area of ​​the target trigger box is determined, including:

[0070] S410: Determine fixed attributes of the target trigger box.

[0071] The fixed attributes include: the shape, quantity, size of the trigger segments and the connection relationship between the trigger segments.

[0072] Optionally, the fixed attributes of the target trigger box may be pre-configured attributes, for example, they may be determined according to the type or status of the target virtual weapon.

[0073] Among them, the shape of the trigger segment can be the three-dimensional type of each trigger segment, such as: cylinder, cone, etc.; the number is the total number of multiple trigger segments connected to each other; the size can be the bottom area, height, etc. corresponding to the trigger segment, which is not limited here; the connection relationship between each trigger segment can be a sequential connection, or a closed-loop connection, etc., which can be determined according to the type of particles emitted by the actual target virtual weapon.

[0074] For example, once a target trigger box corresponding to a particle set emitted by a same target virtual weapon is formed, its fixed properties will not change.

[0075] S420: Determine variable properties of the target trigger box according to the moving trajectory of the particle set, where the variable properties include a display angle of each trigger segment.

[0076] Optionally, the display angle of each trigger segment in the variable properties of the target trigger box can be the inclination angle of each trigger segment. For example, for a particle set that has just been emitted, its corresponding target trigger box may be in a horizontal state. As time goes by, the particle set will be affected by gravity and gradually decrease, thus becoming an inclined state. Therefore, the inclination angle of each trigger segment in the corresponding target trigger box will also change.

[0077] Specifically, the display angle of each trigger segment in the target trigger box may be determined according to the movement trajectory of the particle set.

[0078] S430: Determine a display area of ​​each trigger segment in the target trigger box based on the fixed attributes and the variable attributes of the target trigger box.

[0079] Optionally, after determining the fixed attributes and variable attributes of the target trigger box respectively, the corresponding display area can be determined according to the shape, quantity, size, connection relationship between each trigger segment, and display angle of each trigger segment. The display area can be a part of the virtual game scene.

[0080] In the weapon hit processing method provided in the embodiment of the present application, by separately determining the fixed attributes and variable attributes of the target trigger box, the display area of ​​the target trigger box can be determined more accurately, and then the specific display position of each trigger segment in the target trigger box can be obtained, and it can be displayed in a virtual game scene, which can improve the accuracy of the display.

[0081] The following specifically explains the specific implementation process of determining the variable attributes of the target trigger box according to the movement trajectory of the particle set in the weapon hit processing method provided in the embodiment of the present application.

[0082] Figure 5 For another flow chart of the weapon hit processing method provided in the embodiment of the present application, please refer to Figure 5 , according to the moving trajectory of the particle set, the variable properties of the target trigger box are determined, including:

[0083] S510: Extract key point positions in the movement trajectory of the particle set.

[0084] Optionally, during the movement of the particle set, the key point positions in the movement trajectory of the particle set can be extracted, wherein the movement trajectory of the particle set can be divided into multiple regions, each region is equivalent to a key point, and the display angle of the movement trajectory of the entire particle set can be determined by determining the position of each key point.

[0085] S520: Determine the display angle of each trigger segment in the target trigger box based on the position of the key point.

[0086] Optionally, after determining the position of the key point, the display angle of each trigger segment can be determined based on the position of the key point. For each trigger segment, there may be multiple key points corresponding thereto, and the display angle of the trigger segment can be determined based on the positional relationship of these key points.

[0087] For example, if multiple key points are arranged horizontally, it can be determined that the angle of the trigger segment relative to the horizontal plane is 0. If there are key points arranged at an angle, these key points can be connected and equated to a straight line. The angle between the straight line and the horizontal plane is the display angle of the trigger segment.

[0088] Similarly, the display angle of each trigger segment can be determined separately in the above manner, thereby obtaining the variable properties of the target trigger box.

[0089] In the weapon hit processing method provided in the embodiment of the present application, by extracting the key point positions in the movement trajectory of the particle set, and then determining the display angle of each trigger segment in the target trigger box based on the position of the key points, the determination of each trigger segment angle can be achieved more simply and quickly, which can improve the efficiency and accuracy of determining the variable attributes of the target trigger box.

[0090] The following specifically explains the specific implementation process of determining the fixed attributes of the target trigger box in the weapon hit processing method provided in the embodiment of the present application.

[0091] Figure 6 For another flow chart of the weapon hit processing method provided in the embodiment of the present application, please refer to Figure 6 , determine the fixed properties of the target trigger box, including:

[0092] S610: Determine the motion state of the target virtual weapon.

[0093] The motion state includes a stationary state and a moving state.

[0094] Optionally, in a virtual game scene, the target virtual weapon is usually equipped by a virtual character. When the virtual character is in a stationary state and fires, the motion state of the target virtual weapon is a stationary state; when the virtual character is in a moving state (such as running, walking, and jumping, etc.) and fires, the target virtual weapon will follow the movement, that is, the motion state of the target virtual weapon will change to a moving state.

[0095] The motion state of the target virtual weapon may be determined by acquiring the motion state of the virtual character equipped with the target virtual weapon.

[0096] S620: Determine the fixed attributes of the target trigger box according to the motion state of the target virtual weapon.

[0097] Optionally, different fixed attributes of the target trigger box may be determined based on different motion states of the target virtual weapon.

[0098] For example, when in motion, due to the speed of movement, the number of trigger segments may increase, or the height of the trigger segments may become higher and the bottom area may become smaller. Specifically, different fixed properties of the target trigger box may be determined based on different motion states.

[0099] In the weapon hit processing method provided in the embodiment of the present application, by determining the motion state of the target virtual weapon and determining the fixed properties of the target trigger box according to the motion state of the target virtual weapon, a more realistic simulation of the particle set emitted by the target virtual weapon can be achieved, thereby improving the authenticity of the simulation.

[0100] The following explains how to determine the fixed properties of the target trigger box when the target virtual weapon is in two different motion states.

[0101] Optionally, determining the fixed attributes of the target trigger box according to the motion state of the target virtual weapon includes: if the motion state of the target virtual weapon is a stationary state, using pre-configured initial attributes as the fixed attributes of the target trigger box.

[0102] It should be noted that for a target virtual weapon that has been determined, an initial attribute can be pre-configured. These initial attributes can record the shape, quantity, size of the above-mentioned trigger segments and the connection relationship between the trigger segments. For example: for a certain model of flamethrower, its initial attributes are fixed. When the motion state of the target virtual weapon is determined to be a stationary state, the initial attributes can be directly used as the fixed attributes of the target trigger box.

[0103] The following explains how to determine the fixed properties of the target trigger box when the target virtual weapon is in a moving state.

[0104] Figure 7 For another flow chart of the weapon hit processing method provided in the embodiment of the present application, please refer to Figure 7 ,Determine the fixed attributes of the target trigger box according to the motion state of the target virtual weapon, including:

[0105] S710: If the motion state of the target virtual weapon is a moving state, determine the adjustment parameters of the target trigger box based on the current moving direction and speed.

[0106] Optionally, the current moving direction and speed of the virtual character equipped with the target virtual weapon can be obtained to determine the current moving direction and speed of the target virtual weapon, thereby determining the adjustment parameters of the target trigger box, wherein the adjustment parameters can be used to adjust the initial attributes, for example: increasing or decreasing a certain value or several values ​​in the initial attributes, etc., which is not limited here and can be configured according to actual needs and the specific moving direction and speed.

[0107] For example: the faster the movement speed, the more trigger segments can be configured.

[0108] S720: Adjust the pre-configured initial attributes based on the adjustment parameters, and use the adjusted attributes as fixed attributes of the target trigger box.

[0109] Optionally, after determining the adjustment parameters, the initial attributes may be adjusted according to the adjustment parameters, specifically by modifying one or more values ​​of the initial attributes, and after the adjustment is completed, the adjusted attributes are used as fixed attributes of the target trigger box.

[0110] In the weapon hit processing method provided in the embodiments of the present application, when the target virtual weapon is in a moving state, adjustment parameters for the target trigger box can be determined based on the current direction and speed of movement; pre-configured initial attributes can be adjusted based on the adjustment parameters, and the adjusted attributes can be used as fixed attributes of the target trigger box. Determining the adjustment parameters based on the current direction and speed of movement and adjusting the initial attributes based on the adjustment parameters can make the fixed attributes of the target trigger box more realistic, thereby improving the authenticity of the target trigger box simulation.

[0111] The following is a specific diagram to explain the structure displayed under fixed attributes after the target trigger box adjusts the parameters in the implementation of this application.

[0112] Figure 8 For a schematic diagram of the structure of the trigger box provided in the embodiment of the present application after parameter adjustment, please refer to Figure 8, please refer to Figure 8 , Figure 8 The structure of the target trigger box shown in Figure 3 Based on this, the target trigger box is obtained after adjusting the adjustment parameters.

[0113] Specific adjustment methods may include, but are not limited to: increasing or decreasing the number of trigger segments, adjusting the size of the trigger segments, changing the shape of the trigger segments, and changing the connection relationship between the trigger segments.

[0114] The following specifically explains the specific implementation process of determining whether the target virtual weapon hits the target virtual character in the weapon hit processing method provided in the embodiment of the present application.

[0115] Figure 9 For another flow chart of the weapon hit processing method provided in the embodiment of the present application, please refer to Figure 9 , determining whether the target virtual weapon hits the target virtual character according to the contact relationship between the target trigger box and the target virtual character, including:

[0116] S910: Determine the spatial area corresponding to the target virtual character.

[0117] Optionally, the position occupied by the target virtual character in the virtual game scene is the spatial area corresponding to the target virtual character. The spatial area can be exactly the same as the area displayed by the target virtual character, or the area displayed by the target virtual character can be represented by some regular shapes. No specific restrictions are made here.

[0118] S920: Determine whether the spatial area overlaps with the display area of ​​any trigger segment in the target trigger box.

[0119] Optionally, after determining the above-mentioned spatial area, it may be determined whether the spatial area overlaps with the display area of ​​any trigger segment.

[0120] The so-called overlap means that there is at least one position point in the virtual game scene that belongs to both the above-mentioned spatial area and the display area of ​​a trigger segment.

[0121] by Figure 3 For example, if there is a position point that belongs to both the spatial area and the display area of ​​the third trigger segment, it can be determined that the target virtual weapon overlaps with the display area of ​​the third trigger segment.

[0122] S930: If yes, determine that the target virtual weapon hits the target virtual character.

[0123] Optionally, when it is determined that the target virtual weapon overlaps with the display area of ​​any trigger segment in the target trigger box, it can be determined that the target virtual weapon hits the target virtual character; correspondingly, if the target virtual weapon does not overlap with the display area of ​​any trigger segment in the target trigger box, it can be determined that the target virtual weapon does not hit the target virtual character.

[0124] In the weapon hit processing method provided in the embodiments of the present application, a spatial region corresponding to a target virtual character can be determined; a determination can be made as to whether the spatial region overlaps with the display region of any trigger segment in a target trigger box; and if so, a determination can be made as to whether the target virtual weapon has hit the target virtual character. Determining whether the target virtual weapon has hit the target virtual character based on whether regions overlap can reduce performance consumption, thereby achieving more efficient and energy-efficient detection of whether the target virtual weapon has hit the target virtual character.

[0125] The following specifically explains the specific display relationship when the target virtual weapon hits the target virtual character in the embodiment of the present application.

[0126] Figure 10 For a schematic diagram of a scenario in which a target virtual weapon hits a target virtual character provided in an embodiment of the present application, please refer to Figure 10 When the display area corresponding to any trigger segment in the target trigger box overlaps with the spatial area corresponding to the target virtual character 120, it can be determined that the target virtual character has been hit.

[0127] Optionally, the moving trajectory of the particle set is a trajectory that changes with frame time; determining the display area of ​​the target trigger box based on the moving trajectory of the particle set includes: determining the display area of ​​the target trigger box under the target frame based on the moving trajectory of the particle set under each target frame of the graphical user interface.

[0128] It should be noted that the moving trajectory of the particle set will change with the change of frame time. For example, in the first frame, the moving trajectory of the particle set is at the first position; in the second frame, the moving trajectory of the particle set is at the second position. That is to say, the moving trajectory of the particle set is different in different frames. Correspondingly, the display area of ​​the target trigger box obtained based on the above method is also different.

[0129] Specifically, the display area of ​​the target trigger box in each target frame of the graphical user interface may be determined based on the movement trajectory of the particle set in each target frame.

[0130] In practical applications, whether the target virtual character is hit can be detected in each frame, that is, the display area of ​​the target trigger box in each frame can be determined, and then the corresponding hit judgment can be made, thereby realizing the judgment of whether the target virtual weapon hits the target virtual character in the virtual game scene.

[0131] The following describes the corresponding devices, equipment, and storage media for executing the weapon hit processing method provided by this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0132] Figure 11 For a schematic diagram of the structure of the weapon hit processing device provided in the embodiment of the present application, please refer to Figure 11 , the apparatus includes: a response module 210, an area determination module 220 and a hit determination module 230;

[0133] The response module 210 is configured to display a moving trajectory of a particle set emitted by the target virtual weapon in the virtual game scene in response to a triggering operation on the target virtual weapon;

[0134] An area determination module 220 is configured to determine a display area of ​​a target trigger box based on the movement trajectory of the particle set, where the target trigger box is configured to represent a virtual space occupied by the movement trajectory of the particle set;

[0135] The hit determination module 230 is configured to determine whether the target virtual weapon hits the target virtual character based on the positional relationship between the target trigger box and the target virtual character.

[0136] Optionally, the target trigger box includes at least one trigger segment, each trigger segment is used to characterize the subspace in the virtual space occupied by the moving trajectory of the particle set; the area determination module 220 is specifically used to determine the fixed attributes of the target trigger box, and the fixed attributes include: the shape, number, size of the trigger segments and the connection relationship between the trigger segments; determine the variable attributes of the target trigger box according to the moving trajectory of the particle set, and the variable attributes include the display angle of each trigger segment; determine the display area of ​​each trigger segment in the target trigger box based on the fixed attributes and variable attributes of the target trigger box.

[0137] Optionally, the region determination module 220 is further configured to extract key point positions in the movement trajectory of the particle set; and determine the display angle of each trigger segment in the target trigger box based on the position of the key point.

[0138] Optionally, the region determination module 220 is further configured to determine a motion state of the target virtual weapon, where the motion state includes a stationary state and a moving state; and determine a fixed attribute of the target trigger box according to the motion state of the target virtual weapon.

[0139] Optionally, the region determination module 220 is further configured to use pre-configured initial attributes as fixed attributes of the target trigger box if the motion state of the target virtual weapon is a stationary state.

[0140] Optionally, the area determination module 220 is further used to determine the adjustment parameters of the target trigger box based on the current moving direction and speed if the motion state of the target virtual weapon is a moving state; adjust the pre-configured initial attributes based on the adjustment parameters, and use the adjusted attributes as fixed attributes of the target trigger box.

[0141] Optionally, the hit determination module 230 is specifically configured to determine a spatial region corresponding to the target virtual character; determine whether the spatial region overlaps with a display region of any trigger segment in the target trigger box; and if so, determine that the target virtual weapon hits the target virtual character.

[0142] Optionally, the movement trajectory of the particle set is a trajectory that changes with frame time; the area determination module 220 is further used to determine the display area of ​​the target trigger box in each target frame of the graphical user interface based on the movement trajectory of the particle set in each target frame.

[0143] In the weapon hit processing device provided in the embodiment of the present application, the moving trajectory of the particle set emitted by the target virtual weapon can be displayed in the virtual game scene in response to the trigger operation of the target virtual weapon, and then the display area of ​​the target trigger box can be determined based on the moving trajectory of the particle set. That is to say, the moving trajectory of the emitted particle set can be represented by the target trigger box, and then whether the target virtual weapon hits the target virtual character can be determined based on the positional relationship between the target trigger box and the target virtual character. Among them, determining whether the hit is achieved by determining the positional relationship between the target trigger box and the target virtual character has low performance consumption of the device, and since the display area of ​​the target trigger box is obtained based on the moving trajectory of the particle set emitted by the target virtual weapon, the determination of the positional relationship between the target trigger box and the target virtual character can also more realistically reflect the hit situation of the target virtual weapon, thereby improving the authenticity of the simulation.

[0144] The above-mentioned device is used to execute the method provided in the above-mentioned embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0145] The above modules can be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors, or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules can be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0146] Figure 12 For a schematic diagram of the computer device provided in this application embodiment, please refer to Figure 12 The computer device includes: a memory 310 and a processor 320. The memory 310 stores a computer program that can be run on the processor 320. When the processor 320 executes the computer program, the steps of the weapon hit processing method are implemented.

[0147] Optionally, the computer device is used to display the moving trajectory of the particle set emitted by the target virtual weapon in the virtual game scene in response to the triggering operation of the target virtual weapon; determine the display area of ​​the target trigger box based on the moving trajectory of the particle set, and the target trigger box is used to represent the virtual space occupied by the moving trajectory of the particle set; and determine whether the target virtual weapon hits the target virtual character based on the positional relationship between the target trigger box and the target virtual character.

[0148] Optionally, the target trigger box includes at least one trigger segment, each trigger segment is used to characterize the subspace in the virtual space occupied by the moving trajectory of the particle set; the computer device is specifically used to determine the fixed attributes of the target trigger box, the fixed attributes include: the shape, number, size of the trigger segments and the connection relationship between the trigger segments; determine the variable attributes of the target trigger box according to the moving trajectory of the particle set, the variable attributes include the display angle of each trigger segment; determine the display area of ​​each trigger segment in the target trigger box based on the fixed attributes and variable attributes of the target trigger box.

[0149] Optionally, the computer device is further configured to extract key point positions in the movement trajectory of the particle set; and determine the display angle of each trigger segment in the target trigger box based on the position of the key point.

[0150] Optionally, the computer device is further configured to determine a motion state of the target virtual weapon, where the motion state includes a stationary state and a moving state; and determine a fixed attribute of the target trigger box according to the motion state of the target virtual weapon.

[0151] Optionally, the computer device is further configured to use the pre-configured initial attributes as fixed attributes of the target trigger box if the motion state of the target virtual weapon is a stationary state.

[0152] Optionally, the computer device is further used to determine the adjustment parameters of the target trigger box based on the current moving direction and speed if the motion state of the target virtual weapon is a moving state; adjust the pre-configured initial attributes based on the adjustment parameters, and use the adjusted attributes as fixed attributes of the target trigger box.

[0153] Optionally, the computer device is specifically used to determine the spatial area corresponding to the target virtual character; determine whether the spatial area overlaps with the display area of ​​any trigger segment in the target trigger box; if so, determine that the target virtual weapon hits the target virtual character.

[0154] Optionally, the movement trajectory of the particle set is a trajectory that changes with frame time; the computer device is further used to determine the display area of ​​the target trigger box in the target frame based on the movement trajectory of the particle set in each target frame of the graphical user interface.

[0155] The computer device provided in the embodiment of the present application can display the moving trajectory of the particle set emitted by the target virtual weapon in the virtual game scene in response to the trigger operation of the target virtual weapon, and then determine the display area of ​​the target trigger box based on the moving trajectory of the particle set. That is to say, the moving trajectory of the emitted particle set can be represented by the target trigger box, and then determine whether the target virtual weapon hits the target virtual character based on the positional relationship between the target trigger box and the target virtual character. Among them, determining whether the hit is achieved by determining the positional relationship between the target trigger box and the target virtual character has low performance consumption of the device, and since the display area of ​​the target trigger box is obtained based on the moving trajectory of the particle set emitted by the target virtual weapon, the determination of the positional relationship between the target trigger box and the target virtual character can also more realistically reflect the hit situation of the target virtual weapon, thereby improving the authenticity of the simulation.

[0156] In another aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the weapon hit processing method are implemented.

[0157] Optionally, when implemented, the computer-readable storage medium is used to display the moving trajectory of the particle set emitted by the target virtual weapon in the virtual game scene in response to a trigger operation on the target virtual weapon; determine the display area of ​​the target trigger box based on the moving trajectory of the particle set, and the target trigger box is used to represent the virtual space occupied by the moving trajectory of the particle set; and determine whether the target virtual weapon hits the target virtual character based on the positional relationship between the target trigger box and the target virtual character.

[0158] Optionally, the target trigger box includes at least one trigger segment, each trigger segment is used to characterize the subspace in the virtual space occupied by the moving trajectory of the particle set; the computer-readable storage medium is specifically used to determine the fixed attributes of the target trigger box during implementation, and the fixed attributes include: the shape, number, size of the trigger segments and the connection relationship between the trigger segments; determine the variable attributes of the target trigger box according to the moving trajectory of the particle set, and the variable attributes include the display angle of each trigger segment; determine the display area of ​​each trigger segment in the target trigger box based on the fixed attributes and variable attributes of the target trigger box.

[0159] Optionally, during implementation, the computer-readable storage medium is further configured to extract key point positions in the movement trajectory of the particle set; and determine display angles of respective trigger segments in the target trigger box based on the positions of the key points.

[0160] Optionally, during implementation, the computer-readable storage medium is further used to determine a motion state of the target virtual weapon, where the motion state includes a stationary state and a moving state; and to determine a fixed attribute of the target trigger box according to the motion state of the target virtual weapon.

[0161] Optionally, during implementation, the computer-readable storage medium is further configured to use pre-configured initial attributes as fixed attributes of the target trigger box if the motion state of the target virtual weapon is a stationary state.

[0162] Optionally, during implementation, the computer-readable storage medium is further used to determine adjustment parameters of the target trigger box based on the current direction and speed of movement if the motion state of the target virtual weapon is a moving state; adjust the pre-configured initial attributes based on the adjustment parameters, and use the adjusted attributes as fixed attributes of the target trigger box.

[0163] Optionally, the computer-readable storage medium is specifically used to determine the spatial area corresponding to the target virtual character during implementation; determine whether the spatial area overlaps with the display area of ​​any trigger segment in the target trigger box; and if so, determine that the target virtual weapon hits the target virtual character.

[0164] Optionally, the movement trajectory of the particle set is a trajectory that changes with frame time; when implemented, the computer-readable storage medium is also used to determine the display area of ​​the target trigger box under the target frame based on the movement trajectory of the particle set under each target frame of the graphical user interface.

[0165] The computer-readable storage medium provided in the embodiment of the present application can display the moving trajectory of the particle set emitted by the target virtual weapon in the virtual game scene in response to the trigger operation of the target virtual weapon, and then determine the display area of ​​the target trigger box based on the moving trajectory of the particle set. That is to say, the moving trajectory of the emitted particle set can be represented by the target trigger box, and then determine whether the target virtual weapon hits the target virtual character based on the positional relationship between the target trigger box and the target virtual character. Among them, determining whether the hit is achieved by determining the positional relationship between the target trigger box and the target virtual character has low performance consumption of the device, and since the display area of ​​the target trigger box is obtained based on the moving trajectory of the particle set emitted by the target virtual weapon, the determination of the positional relationship between the target trigger box and the target virtual character can also more realistically reflect the hit situation of the target virtual weapon, thereby improving the authenticity of the simulation.

[0166] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interface, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0167] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0168] In addition, the functional units in various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or hardware plus software functional units.

[0169] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor (English: processor) to perform some steps of the methods of various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (English: Read-Only Memory, abbreviated: ROM), a random access memory (English: Random Access Memory, abbreviated: RAM), a magnetic disk or an optical disk, and other media that can store program code.

[0170] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited to them. Any changes or substitutions that can be easily conceived by any person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

[0171] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A weapon hit processing method, characterized in that: A graphical user interface is provided by a terminal device, wherein the graphical user interface is used to display a virtual game scene, wherein the virtual game scene includes a target virtual weapon and a target virtual character. The method includes: In response to a triggering operation on the target virtual weapon, displaying a moving trajectory of a particle set emitted by the target virtual weapon in the virtual game scene; determining a display area of ​​a target trigger box based on the movement trajectory of the particle set, wherein the target trigger box is used to represent a virtual space occupied by the movement trajectory of the particle set; determining whether the target virtual weapon hits the target virtual character according to a positional relationship between the target trigger box and the target virtual character; The target trigger box includes at least one trigger segment, each trigger segment is used to represent a subspace in the virtual space occupied by the movement trajectory of the particle set; The determining of the display area of ​​the target trigger box based on the moving trajectory of the particle set includes: Determining fixed attributes of the target trigger box, wherein the fixed attributes include: the shape, quantity, size of the trigger segments, and the connection relationship between the trigger segments; determining a variable attribute of the target trigger box according to the movement trajectory of the particle set, wherein the variable attribute includes a display angle of each trigger segment; The display area of ​​each trigger segment in the target trigger box is determined based on the fixed attribute and the variable attribute of the target trigger box.

2. The weapon hit processing method according to claim 1, wherein: The determining of the variable attribute of the target trigger box according to the moving trajectory of the particle set includes: Extracting key point positions in the movement trajectory of the particle set; The display angle of each trigger segment in the target trigger box is determined based on the position of the key point.

3. The weapon hit processing method according to claim 1, wherein: The determining of the fixed attribute of the target trigger box includes: Determining the motion state of the target virtual weapon, wherein the motion state includes a stationary state and a moving state; The fixed attribute of the target trigger box is determined according to the motion state of the target virtual weapon.

4. The weapon hit processing method according to claim 3, wherein: The step of determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon includes: If the motion state of the target virtual weapon is a stationary state, the pre-configured initial attributes are used as fixed attributes of the target trigger box.

5. The weapon hit processing method according to claim 3, wherein: The step of determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon includes: If the motion state of the target virtual weapon is a moving state, determining the adjustment parameters of the target trigger box based on the current moving direction and speed; The pre-configured initial attributes are adjusted based on the adjustment parameters, and the adjusted attributes are used as fixed attributes of the target trigger box.

6. The weapon hit processing method according to any one of claims 1 to 5, characterized in that: The movement trajectory of the particle set is a trajectory that changes with frame time; The determining of the display area of ​​the target trigger box based on the moving trajectory of the particle set includes: The display area of ​​the target trigger box in each target frame of the graphical user interface is determined based on the movement trajectory of the particle set in the target frame.

7. A weapon hit processing device, characterized in that: Providing a graphical user interface through a terminal device, the graphical user interface is used to display a virtual game scene, the virtual game scene includes: a target virtual weapon and a target virtual character, the apparatus includes: a response module, an area determination module and a hit determination module; The response module is configured to display, in the virtual game scene, a moving trajectory of a particle set emitted by the target virtual weapon in response to a triggering operation on the target virtual weapon; The area determination module is used to determine a display area of ​​a target trigger box based on the movement trajectory of the particle set, where the target trigger box is used to represent a virtual space occupied by the movement trajectory of the particle set; The hit determination module is used to determine whether the target virtual weapon hits the target virtual character according to the positional relationship between the target trigger box and the target virtual character; The target trigger box includes at least one trigger segment, each trigger segment is used to represent the subspace in the virtual space occupied by the movement trajectory of the particle set; the area determination module is specifically used to determine the fixed attributes of the target trigger box, and the fixed attributes include: the shape, number, size of the trigger segments and the connection relationship between the trigger segments; determine the variable attributes of the target trigger box according to the movement trajectory of the particle set, and the variable attributes include the display angle of each trigger segment; determine the display area of ​​each trigger segment in the target trigger box based on the fixed attributes and variable attributes of the target trigger box.

8. A computer device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program running on the processor, and when the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for controlling virtual operation object, storage medium and electronic device

    CN110841289A

  • Virtual prop interaction method and device and electronic equipment

    CN112090070A