CN115671749A - Weapon hit processing method, device, equipment and storage medium - Google Patents

Weapon hit processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115671749A
CN115671749A CN202211363956.9A CN202211363956A CN115671749A CN 115671749 A CN115671749 A CN 115671749A CN 202211363956 A CN202211363956 A CN 202211363956A CN 115671749 A CN115671749 A CN 115671749A
Authority
CN
China
Prior art keywords
target
weapon
target virtual
trigger box
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211363956.9A
Other languages
Chinese (zh)
Inventor
方鸣
刘勇成
胡志鹏
刘星
卢小军
程龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202211363956.9A priority Critical patent/CN115671749A/en
Publication of CN115671749A publication Critical patent/CN115671749A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application provides a weapon hit processing method, a weapon hit processing device, weapon hit processing equipment and a storage medium, and belongs to the technical field of electronic games. The method comprises the following steps: in response to a trigger operation on a target virtual weapon, displaying a movement track of a particle set launched by the target virtual weapon in a virtual game scene; determining a display area of a target trigger box based on the movement track of the particle set, wherein the target trigger box is used for representing a virtual space occupied by the movement track of the particle set; and determining whether the target virtual weapon hits the target virtual role or not according to the position relation between the target trigger box and the target virtual role. The method and the device can reduce the performance consumption of the equipment, meanwhile keep the simulation of the real scene, and improve the reality of the hit.

Description

Weapon hit processing method, device, equipment and storage medium
Technical Field
The application relates to the technical field of electronic games, in particular to a weapon hit processing method, device, equipment and storage medium.
Background
In shooting type games, there are many types of firearms, and different types of firearms attack different ways, and for particle-type weapons (for example, a torch, a shock gun, or any type of weapon that uses diffused hits of elemental particles as an attack means), it is often necessary to determine whether or not a round of ammunition fired by the weapon hits a virtual character.
In the prior art, the judgment of particle weapon hit is usually to start particle specific collision detection, and when a particle hits a target, the hit is determined; alternatively, particles with collision functionality are used to simulate collisions in an example.
However, if the particle special effect is turned on, the performance consumption is large, and the method is not suitable for electronic equipment with low performance; if particle simulation is adopted, the hit authenticity is poor, and the simulation of a real scene cannot be well realized.
Disclosure of Invention
The application aims to provide a weapon hit processing method, a weapon hit processing device and a weapon hit processing storage medium, which can reduce the performance consumption of the weapon, simultaneously keep the simulation of a real scene and improve the hit authenticity.
The embodiment of the application is realized as follows:
in one aspect of the embodiments of the present application, a method for processing weapon hits is provided, where a graphical user interface is provided by a terminal device, the graphical user interface is used to display a virtual game scene, and the virtual game scene includes: a target virtual weapon and a target virtual character, the method comprising:
in response to a trigger operation on a target virtual weapon, displaying a movement track of a particle set launched by the target virtual weapon in a virtual game scene;
determining a display area of a target trigger box based on the movement track of the particle set, wherein the target trigger box is used for representing a virtual space occupied by the movement track of the particle set;
and determining whether the target virtual weapon hits the target virtual role or not according to the position relation between the target trigger box and the target virtual role.
In another aspect of the embodiments of the present application, a weapon hit processing apparatus is provided, where a graphical user interface is provided by a terminal device, the graphical user interface is used to display a virtual game scene, and the virtual game scene includes: target virtual weapon and target virtual character, the device includes: the system comprises a response module, a region determining module and a hit determining module;
a response module, configured to display, in response to a trigger operation on a target virtual weapon, a movement trajectory of a set of particles fired by the target virtual weapon in a virtual game scene;
the region determining module is used for determining a display region of a target trigger box based on the movement track of the particle set, and the target trigger box is used for representing a virtual space occupied by the movement track of the particle set;
and the hit determining module is used for determining whether the target virtual weapon hits the target virtual role according to the position relation between the target trigger box and the target virtual role.
In another aspect of the embodiments of the present application, there is provided a computer device, including: the weapon hit processing method comprises the following steps of a memory and a processor, wherein a computer program capable of running on the processor is stored in the memory, and when the processor executes the computer program, the weapon hit processing method is realized.
In another aspect of the embodiments of the present application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of a weapon hit processing method.
The beneficial effects of the embodiment of the application include:
in the weapon hit processing method provided by the embodiment of the application, the movement trajectory of the particle set launched by the target virtual weapon may be displayed in the virtual game scene in response to the trigger operation on the target virtual weapon, and then the display area of the target trigger box may be determined based on the movement trajectory of the particle set, that is, the movement trajectory of the launched particle set may be represented by the target trigger box, and then whether the target virtual weapon hits the target virtual character may be determined according to the positional relationship between the target trigger box and the target virtual character, wherein 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, performance consumption on the device is low, and since the determination on the display area of the target trigger box is obtained based on the movement trajectory of the particle set launched by the target virtual weapon, the determination on the positional relationship between the target trigger box and the target virtual character may also more truly reflect the hit situation of the target virtual weapon, and the reality of the simulation is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 is a schematic illustration of a graphical user interface display provided by an embodiment of the present application;
FIG. 2 is a schematic flow chart illustrating a weapon hit processing method according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a trigger box provided in an embodiment of the present application;
FIG. 4 is another schematic flow chart diagram illustrating a weapon hit processing method according to an embodiment of the present disclosure;
FIG. 5 is another schematic flow chart diagram illustrating a weapon hit processing method according to an embodiment of the present application;
FIG. 6 is another schematic flow chart diagram illustrating a weapon hit processing method according to an embodiment of the present disclosure;
FIG. 7 is another schematic flow chart diagram illustrating a weapon hit processing method according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of the trigger box provided in the embodiment of the present application after parameter adjustment;
FIG. 9 is another schematic flow chart diagram illustrating a weapon hit processing method according to an embodiment of the present application;
FIG. 10 is a schematic view of a scenario in which a target virtual weapon hits a target virtual character according to an embodiment of the present application;
FIG. 11 is a schematic structural diagram of a weapon hit processing device according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present application, it should be noted that the terms "first", "second", "third", etc. are used only for distinguishing the description, and are not intended to indicate or imply relative importance.
The weapon hit processing method in one embodiment of the present application may be executed on a terminal device or a server. The terminal device may be a local terminal device. When the game display method is operated on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system comprises the server and the client device.
In an optional embodiment, various cloud applications may be run under the cloud interaction system, for example: and (5) cloud games. Taking a cloud game as an example, a cloud game refers to a game mode based on cloud computing. In the cloud game operation mode, the game program operation main body and the game picture presentation main body are separated, the storage and operation of the game display method are completed on the cloud game server, and the client device is used for receiving and sending data and presenting the game picture, for example, the client device can be a display device with a data transmission function close to a user side, such as a mobile terminal, a television, a computer, a palm computer and the like; however, the terminal device performing information processing is a cloud game server in the cloud. When a game is played, a player operates the client device to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as game pictures and the like are encoded and compressed, the data are returned to the client device through a network, and finally the data are decoded through the client device and the game pictures are output.
In an alternative embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used for presenting a game screen. The local terminal device is used for interacting with the player through a graphical user interface, namely, a game program is downloaded and installed and operated through an electronic device conventionally. The manner in which the local terminal device provides the graphical user interface to the player may include a variety of ways, for example, it may be rendered for display on a display screen of the terminal or provided to the player through holographic projection. For example, the local terminal device may include a display screen for presenting a graphical user interface including a game screen and a processor for running the game, generating the graphical user interface, and controlling display of the graphical user interface on the display screen.
In a possible implementation manner, an embodiment of the present invention provides a weapon hit processing method, which provides a graphical user interface through a first terminal device, where the first terminal device may be the aforementioned local terminal device, and may also be the aforementioned client device in a cloud interaction system.
The following specifically explains contents displayed in a graphical user interface to which the weapon hit processing method provided in the embodiment of the present application is applied.
Fig. 1 is a schematic display diagram of a graphical user interface provided in an embodiment of the present application, please refer to fig. 1, where the graphical user interface is provided by a terminal device, and the graphical user interface is used for displaying a virtual game scene, where the virtual game scene includes: target virtual weapon 110 and target virtual character 120.
Optionally, the virtual game scene may specifically be a three-dimensional virtual scene for simulating a display scene, in which the target virtual weapon 110 and the target virtual character 120 may be included.
Target virtual weapon 110 may be any particle diffusion type weapon, such as: a torch, a shock gun, a water mist gun, etc., without limitation, the target virtual weapon 110 may be equipped with a corresponding virtual character, and may be controlled to fire (i.e., emit particles) under the operation of the player.
Target virtual weapon 120 may be characters present in a scene, which may be player-controlled virtual characters similar to the virtual characters equipped with target virtual weapon 110 described above, or may be robot-controlled virtual characters, and not specifically limited herein, and target virtual weapon 110 may hit target virtual characters 120 by the emitted particles.
The following specifically explains a specific implementation procedure of the weapon hit processing method provided in the embodiment of the present application.
Fig. 2 is a schematic flowchart of a weapon hit processing method according to an embodiment of the present application, and referring to fig. 2, the method includes:
s210: in response to a trigger operation on the target virtual weapon, displaying a movement trajectory of a set of particles fired by the target virtual weapon in the virtual game scene.
Alternatively, the triggering operation on the target virtual weapon may be an operation of firing the target virtual weapon, which is implemented by a player through a touch screen, a mouse button, or any type of control manner, and after the triggering operation on the target virtual weapon is performed, the target virtual weapon may fire corresponding particles, for example: for the flame thrower, corresponding flames may be emitted, that is, corresponding flame effects are displayed in the virtual game scene, and these flame effects may be a preset playing animation, may move according to a predetermined trajectory, and may be configured according to actual scene requirements, for example: the flame can extend and propagate along one direction, and the flame can disappear after falling to the ground after propagating for a certain distance under the influence of gravity.
It should be noted that, the movement 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 may be divided into multiple frames of pictures, and for each frame of picture, the movement trajectory of each particle is also the position of each particle in the frame.
For example: when the target virtual weapon is a torch, a moving trajectory of a set of flame particles emitted by the torch may be displayed in the virtual game scene in response to a firing trigger operation on the torch.
S220: and determining a display area of the target trigger box based on the movement track of the particle set.
Wherein the target trigger box is used for representing a virtual space occupied by the moving track of the particle set.
Alternatively, the movement trajectory of the particle set may specifically be a part of a spatial region in the virtual game scene, and the part of the spatial region may be used as a display region of the target trigger box, where the target trigger box may be a virtual space occupied by the movement trajectory of the particle set represented by any type of three-dimensional body.
Specifically, the target trigger box may be a virtual space region composed of at least one regular three-dimensional body or an irregular three-dimensional body.
For example: the target trigger box may be represented by one or more interconnected cylinders.
The display area of the target trigger box is determined through the moving track of the particle set, namely the whole edge of the particle can be represented through the edge of the target trigger box, so that the reality of simulation can be improved.
S230: and determining whether the target virtual weapon hits the target virtual role or not according to the position relation between the target trigger box and the target virtual role.
Optionally, after determining the display area of the target trigger box, determining whether the target virtual weapon hits the target virtual character by determining the position relationship between the target trigger box and the target virtual character.
The target virtual character also occupies a certain position in the virtual game scene, and whether the target virtual character is hit or not can be determined by judging whether a contact point exists between the target trigger box and the target virtual character or not.
For example: if the target trigger box and the target virtual role have a contact point, it can be determined that the target virtual weapon hits the target virtual role; in contrast, if there is no contact point between the target trigger box and the target avatar, it may be determined that the target virtual weapon has not hit the target avatar.
It should be noted that, for determining the position relationship between the target trigger box and the target virtual character, it is only necessary to determine whether the two have contact on the area, and for the terminal device, the required device performance is low.
In the weapon hit processing method provided by the embodiment of the application, the movement trajectory of the particle set launched by the target virtual weapon may be displayed in the virtual game scene in response to the trigger operation on the target virtual weapon, and then the display area of the target trigger box may be determined based on the movement trajectory of the particle set, that is, the movement trajectory of the launched particle set may be represented by the target trigger box, and then whether the target virtual weapon hits the target virtual character may be determined according to the positional relationship between the target trigger box and the target virtual character, wherein 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, performance consumption on the device is low, and since the determination on the display area of the target trigger box is obtained based on the movement trajectory of the particle set launched by the target virtual weapon, the determination on the positional relationship between the target trigger box and the target virtual character may also more truly reflect the hit situation of the target virtual weapon, and the reality of the simulation is improved.
The following specifically explains the specific structural relationship of the target trigger box referred to in the embodiments of the present application.
Fig. 3 is a schematic structural diagram of a trigger box according to an embodiment of the present application, please refer to fig. 3, where a target trigger box includes at least one trigger segment, and each trigger segment is used to represent a subspace in a virtual space occupied by a movement trajectory of a particle set.
Optionally, each trigger segment may be a regular three-dimensional body or an irregular three-dimensional body, and when in actual use, the corresponding three-dimensional body type may be selected according to actual requirements, for example: a cylinder, a table, a cone, a sphere, or any irregular body, etc., without being particularly limited thereto.
For example: if the target virtual weapon is a flame thrower, the effect of the ejected flame particles can be simulated as a plurality of sections of cylinders of different sizes.
An example of a target trigger box shown in fig. 3 is a target trigger box when a target virtual weapon is a fire extinguisher, and the target trigger box may include three trigger sections connected in sequence, where the bottom area and the height of a cylinder of a first section may both be smaller than the bottom area and the height of a cylinder of a second section, and the bottom area and the height of a cylinder of the second section may both be smaller than the bottom area and the height of a third section, so as to implement simulation of flame particles (a three-dimensional scene may be represented by a two-dimensional view in fig. 3, a cylinder may be represented by a rectangle, the length of the rectangle is the height of the cylinder, and the width of the rectangle is the diameter of the bottom surface of the cylinder).
The following specifically explains a specific implementation procedure 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.
Fig. 4 is another schematic flow chart of a weapon hit processing method according to an embodiment of the present application, please refer to fig. 4, in which determining a display area of a target trigger box based on a movement trajectory of a particle set includes:
s410: fixed attributes of the target trigger box are determined.
Wherein the fixed attributes include: the shape, the number and the size of the trigger sections and the connection relationship among the trigger sections.
Alternatively, the fixed attributes of the target trigger box may be pre-configured attributes, such as: may be determined according to the type or state of the target virtual weapon, etc.
The form of the trigger segment may be a three-dimensional volume type of each trigger segment, for example: cylindrical, conical, etc.; the number is the whole number of the plurality of trigger sections which are connected with each other; the size can be the bottom area, height and the like corresponding to the triggering section, and is not limited herein; the connection relation of the trigger segments can be sequential connection or closed-loop connection, and the like, and can be specifically determined according to the type of particles emitted by the actual target virtual weapon.
For example, for a target trigger box corresponding to a set of particles emitted by the same target virtual weapon, the fixed attributes do not change once formed.
S420: and determining the variable attribute of the target trigger box according to the movement track of the particle set, wherein the variable attribute comprises the display angle of each trigger segment.
Alternatively, the display angle of each trigger segment in the variable attribute of the target trigger box may be the inclination angle of each trigger segment, for example: for the particle set just sent out, the corresponding target trigger box may be in a horizontal state, and as time goes on, the particle set gradually decreases under the influence of gravity and becomes in an inclined state, so that the inclination angle of each trigger segment in the corresponding target trigger box also changes.
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.
S430: and determining the display area of each trigger section in the target trigger box based on the fixed attribute and the variable attribute of the target trigger box.
Optionally, after the fixed attribute and the variable attribute of the target trigger box are respectively determined, a corresponding display area may be determined according to the form, number, size, connection relationship between trigger segments, and display angle of each trigger segment, where the display area may be a partial area in the virtual game scene.
In the weapon hit processing method provided by the embodiment of the application, the display area of the target trigger box can be determined more accurately by respectively determining the fixed attribute and the variable attribute of the target trigger box, so that the specific display position of each trigger segment in the target trigger box can be specifically obtained and displayed in a virtual game scene, and the display accuracy can be improved.
The following is a specific explanation of the implementation process of determining the variable property 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.
Fig. 5 is another schematic flow chart of a weapon hit processing method according to an embodiment of the present application, please refer to fig. 5, which is a flowchart for determining a variable attribute of a target trigger box according to a movement trajectory of a particle set, and includes:
s510: and extracting the positions of key points in the moving tracks of the particle set.
Optionally, in the process of moving the particle set, the positions of the key points in the movement trajectory of the particle set may be extracted, where the movement trajectory of the particle set may be divided into a plurality of regions, each region is equivalent to one key point, and the display angle of the movement trajectory of the entire particle set may be determined by determining the position of each key point.
S520: and respectively determining the display angle of each trigger section in the target trigger box based on the position of the key point.
Optionally, after determining the positions of the key points, the display angle of each trigger segment may be determined based on the positions of the key points, where for each trigger segment, multiple key points may correspond to the trigger segment, and the display angle of the trigger segment may be determined based on the positional relationship of the key points.
For example: if a plurality of key points are all horizontally arranged, it can be determined that the included angle of the triggering section relative to the horizontal plane is 0, if the key points are obliquely arranged, the key points can be connected and equivalent to a straight line, and the included angle between the straight line and the horizontal plane is the display angle of the triggering section.
Similarly, the display angle of each trigger segment can be determined separately in the above manner, so that the variable property of the target trigger box can be obtained.
In the weapon hit processing method provided by the embodiment of the application, the positions of the key points in the moving track of the particle set are extracted, and then the display angles of the trigger segments in the target trigger box are respectively determined based on the positions of the key points, so that the determination of the angles of the trigger segments can be more simply, conveniently and rapidly realized, and the efficiency and the accuracy of the variable attribute determination of the target trigger box can be improved.
The following is a specific explanation of the implementation procedure for determining the fixed property of the target trigger box in the weapon hit processing method provided in the embodiment of the present application.
Fig. 6 is another schematic flow chart of a weapon hit processing method according to an embodiment of the present application, please refer to fig. 6, in which determining a fixed attribute of a target trigger box includes:
s610: the motion state of the target virtual weapon is determined.
Wherein the motion state comprises a static state and a moving state.
Optionally, in the virtual game scene, the target virtual weapon is usually equipped by a virtual character, when the virtual character is in a static state and fires, the motion state of the target virtual weapon is in a static state; when the virtual character is in a moving state (such as running, walking, jumping and the like) to fire, the target virtual weapon follows the movement, that is, the motion state of the target virtual weapon is changed into a motion state.
The motion state of the target virtual weapon can be determined by acquiring the motion state of the virtual character equipped with the target virtual weapon.
S620: and determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon.
Alternatively, different fixed attributes of the target trigger box may be determined based on different motion states of the target virtual weapon.
For example: when the motion state is in a moving state, the number of trigger segments in the motion state may be increased due to the moving speed, or the body height of the trigger segments becomes high, the bottom area becomes small, and the like.
In the weapon hit processing method provided in the embodiment of the application, the motion state of the target virtual weapon can be determined, and the fixed attribute of the target trigger box can be determined according to the motion state of the target virtual weapon, so that a more real simulation of a particle set emitted by the target virtual weapon is realized, and the reality of the simulation is improved.
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, respectively.
Optionally, determining the fixed property of the target trigger box according to the motion state of the target virtual weapon comprises: and if the motion state of the target virtual weapon is a static state, taking the preset initial attribute as the fixed attribute of the target trigger box.
It should be noted that, for a determined target virtual weapon, an initial attribute may be configured in advance, and the form, number, size, and connection relationship between trigger segments may be recorded in the initial attribute, for example: the initial attribute of the flame thrower is fixed for a certain type of flame thrower, and when the motion state of the target virtual weapon is determined to be a static state, the initial attribute can be directly used as the fixed attribute of the target trigger box.
The following explains how to determine the fixed properties of the target trigger box when the target virtual weapon is in motion, respectively.
Fig. 7 is another schematic flow chart of a weapon hit processing method according to an embodiment of the present application, please refer to fig. 7, which is a flowchart for determining a fixed attribute of a target trigger box according to a motion state of a target virtual weapon, and includes:
s710: and 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.
Alternatively, the direction and speed of the current movement of the virtual character equipped with the target virtual weapon may be obtained to determine the direction and speed of the current movement of the target virtual weapon, and thus the adjustment parameters of the target trigger box, wherein the adjustment parameters may be used to make the adjustment of the initial attributes, such as: the initial attribute may be added or subtracted with a certain value or values, and the like, which are not limited herein and may be configured according to actual requirements and specific moving directions and speeds.
For example: the faster the movement speed, the greater the number of trigger segments that can be configured.
S720: and adjusting the pre-configured initial attribute based on the adjustment parameter, and taking the adjusted attribute as the fixed attribute of the target trigger box.
Optionally, after the adjustment parameter is determined, the initial attribute may be adjusted according to the adjustment parameter, specifically, one or more values in the initial attribute may be modified, and after the adjustment is completed, the adjusted attribute is used as the fixed attribute of the target trigger box.
In the weapon hit processing method provided in the embodiment of the present application, when the motion state of the target virtual weapon is a moving state, based on the current moving direction and speed, an adjustment parameter of the target trigger box may be determined; and adjusting the pre-configured initial attribute based on the adjustment parameter, and taking the adjusted attribute as the fixed attribute of the target trigger box. The adjustment parameters are determined based on the current moving direction and speed, and the initial attributes are adjusted based on the adjustment parameters, so that the fixed attributes of the target trigger box are more real, and the reality of the target trigger box simulation is improved.
The following explains a structure displayed under a fixed attribute obtained after parameter adjustment is performed on a target trigger box in the implementation of the present application with a specific diagram.
Fig. 8 is a schematic structural diagram of a trigger box provided in the embodiment of the present application after parameter adjustment, please refer to fig. 8 and fig. 8, and a structure of a target trigger box shown in fig. 8 is a target trigger box obtained after parameter adjustment is performed on the basis of fig. 3.
Specific adjustment modes may include, but are not limited to: increasing or decreasing the number of trigger segments, adjusting the size of the trigger segments, changing the form of the trigger segments, and changing the connection relationship among the trigger segments.
The following specifically explains a specific implementation procedure for determining whether a target virtual weapon hits a target virtual character in the weapon hit processing method provided in the embodiment of the present application.
Fig. 9 is another schematic flow chart of the weapon hit processing method according to the embodiment of the present application, please refer to fig. 9, which is a flowchart for determining whether a target virtual weapon hits a target virtual character according to a contact relationship between a target trigger box and the target virtual character, and includes:
s910: and determining a space area corresponding to the target virtual character.
Optionally, the occupied position of the target virtual character in the virtual game scene is a spatial region corresponding to the target virtual character, and the spatial region may be completely the same as the region displayed by the target virtual character, or the region displayed by the target virtual character may be represented by some regular shapes, which is not limited specifically herein.
S920: and judging whether the space region overlaps with the display region of any trigger segment in the target trigger box.
Alternatively, after the spatial region is determined, it may be determined whether the spatial region overlaps with a display region of any trigger segment.
The overlapping is to say that at least one position point exists in the virtual game scene, and belongs to the space region and the display region of a certain trigger segment.
Taking the example of fig. 3 including three trigger segments as an example, if there is a location point belonging to both the spatial region and the display region of the third trigger segment, it can be determined that there is an overlap between the target virtual weapon and the display region of the third trigger segment.
S930: if yes, determining that the target virtual weapon hits the target virtual role.
Optionally, after it is determined that the target virtual weapon overlaps with the display area of any trigger segment in the target trigger box, it may be determined that the target virtual weapon hits the target virtual character; correspondingly, if the display areas of the target virtual weapon and any trigger segment in the target trigger box are not overlapped, it can be determined that the target virtual weapon misses the target virtual character.
In the weapon hit processing method provided in the embodiment of the application, a space region corresponding to a target virtual role can be determined; judging whether the space region is overlapped with the display region of any trigger section in the target trigger box or not; if yes, determining that the target virtual weapon hits the target virtual role. Whether the target virtual weapon hits the target virtual role is determined by whether the areas are overlapped, so that the consumption of performance can be reduced, and the detection of whether the target virtual weapon hits the target virtual role is realized more efficiently and in an energy-saving manner.
The following specifically explains a specific display relationship when a target virtual weapon hits a target virtual character in the embodiment of the present application.
Fig. 10 is a schematic view of a scenario that a target virtual weapon hits a target virtual character according to an embodiment of the present application, please refer to fig. 10, when a display area corresponding to any trigger segment in the target trigger box overlaps with a space area corresponding to the target virtual character 120, it may be determined that the target virtual character is hit.
Optionally, the movement trajectory of the particle set is a trajectory that varies with frame time; determining a display area of a target trigger box based on the movement trajectory of the particle set, including: and determining a display area of the target trigger box under the target frame based on the movement track of the particle set under each target frame of the graphical user interface.
It should be noted that the movement trajectory of the particle set may change with the change of the frame time, for example: in the first frame, the moving track of the particle set is at a first position; in the second frame, the movement trajectory of the particle set is at the second position, that is, in different frames, the movement trajectory of the particle set is different, and accordingly, the display area of the target trigger box obtained based on the above manner is also different.
Specifically, the display area of the target trigger box under the target frame can be determined based on the movement track of the particle set under each target frame of the graphical user interface.
In practical application, whether the target virtual character is hit or not 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 is performed, so that the target virtual weapon in the virtual game scene can be judged to hit the target virtual character.
The following describes a device, a storage medium, and the like corresponding to the weapon hit processing method provided by the present application for execution, and specific implementation processes and technical effects thereof are referred to above and will not be described again below.
Fig. 11 is a schematic structural diagram of a weapon hit processing device according to an embodiment of the present application, please refer to fig. 11, which includes: a response module 210, a region determination module 220, and a hit determination module 230;
a response module 210, configured to display, in response to a trigger operation on a target virtual weapon, a movement trajectory of a set of particles launched by the target virtual weapon in a virtual game scene;
a region determining module 220, configured to determine a display region of a target trigger box based on the movement trajectory of the particle set, where the target trigger box is configured to characterize a virtual space occupied by the movement trajectory of the particle set;
and the hit determining module 230 is configured to determine whether the target virtual weapon hits the target virtual character according to the position relationship between the target trigger box and the target virtual character.
Optionally, the target trigger box includes at least one trigger segment, and each trigger segment is respectively used for representing a subspace in a virtual space occupied by a movement trajectory of the particle set; the area determining module 220 is specifically configured to determine fixed attributes of the target trigger box, where the fixed attributes include: the form, the number and the size of the trigger sections and the connection relation among the trigger sections; determining variable attributes of the target trigger box according to the movement tracks of the particle set, wherein the variable attributes comprise display angles of all trigger sections; and determining the display area of each trigger section in the target trigger box based on the fixed attribute and the variable attribute of the target trigger box.
Optionally, the region determining module 220 is further configured to extract a position of a key point in the movement trajectory of the particle set; and respectively determining the display angle of each trigger section in the target trigger box based on the position of the key point.
Optionally, the region determining module 220 is further configured to determine a motion state of the target virtual weapon, where the motion state includes a static state and a moving state; and determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon.
Optionally, the region determining module 220 is further configured to use a pre-configured initial attribute as a fixed attribute of the target trigger box if the motion state of the target virtual weapon is a static state.
Optionally, the area determining module 220 is further configured to determine, if the motion state of the target virtual weapon is a moving state, an adjustment parameter of the target trigger box based on the current moving direction and speed; and adjusting the pre-configured initial attribute based on the adjustment parameter, and taking the adjusted attribute as the fixed attribute of the target trigger box.
Optionally, the hit determining module 230 is specifically configured to determine a spatial region corresponding to the target virtual character; judging whether the space region is overlapped with the display region of any trigger section in the target trigger box or not; if yes, determining that the target virtual weapon hits the target virtual role.
Optionally, the movement trajectory of the particle set is a trajectory that varies with frame time; the area determination module 220 is further configured to determine a 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.
In the weapon hit processing apparatus provided in the embodiment of the present application, a movement trajectory of a particle set launched by a target virtual weapon may be displayed in a virtual game scene in response to a trigger operation on the target virtual weapon, and then a display area of a target trigger box may be determined based on the movement trajectory of the particle set, that is, the movement trajectory of the launched particle set may be represented by the target trigger box, and then whether the target virtual weapon hits a target virtual character may be determined according to a positional relationship between the target trigger box and the target virtual character, where 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, performance consumption of a device is low, and since the determination of the positional relationship between the target trigger box and the target virtual character is obtained based on the movement trajectory of the particle set launched by the target virtual weapon, the determination of the positional relationship between the target trigger box and the target virtual character may also more truly reflect a hit situation of the target virtual weapon, and improve reality of a simulation.
The above-mentioned apparatus is used for executing the method provided by the foregoing embodiment, and the implementation principle and technical effect are similar, which are not described herein again.
These above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 12 is a schematic structural diagram of a computer device according to an embodiment of the present application, and referring to fig. 12, the computer device includes: the storage 310 and the processor 320, wherein the storage 310 stores a computer program operable on the processor 320, and the processor 320 executes the computer program to implement the steps of the weapon hit processing method.
Optionally, the computer device is configured to display, in response to a trigger operation on the target virtual weapon, a movement trajectory of a set of particles fired by the target virtual weapon in the virtual game scene; determining a display area of a target trigger box based on the movement track of the particle set, wherein the target trigger box is used for representing a virtual space occupied by the movement track of the particle set; and determining whether the target virtual weapon hits the target virtual role or not according to the position relation between the target trigger box and the target virtual role.
Optionally, the target trigger box includes at least one trigger segment, and each trigger segment is used to represent a subspace in a virtual space occupied by a movement trajectory of the particle set; the computer device is specifically configured to determine a fixed attribute of a target trigger box, where the fixed attribute includes: the form, the number and the size of the trigger sections and the connection relation among the trigger sections; determining variable attributes of the target trigger box according to the movement tracks of the particle set, wherein the variable attributes comprise display angles of all trigger sections; and determining the display area of each trigger section in the target trigger box based on the fixed attribute and the variable attribute of the target trigger box.
Optionally, the computer device is further specifically configured to extract a position of a key point in a movement trajectory of the particle set; and respectively determining the display angle of each trigger section in the target trigger box based on the position of the key point.
Optionally, the computer device is further specifically configured to determine a motion state of the target virtual weapon, where the motion state includes a stationary state and a moving state; and determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon.
Optionally, the computer device is further specifically configured to, if the motion state of the target virtual weapon is a static state, use a pre-configured initial attribute as the fixed attribute of the target trigger box.
Optionally, the computer device is further specifically configured to determine an adjustment parameter of the target trigger box based on a current moving direction and speed if the motion state of the target virtual weapon is a moving state; and adjusting the pre-configured initial attribute based on the adjustment parameter, and taking the adjusted attribute as the fixed attribute of the target trigger box.
Optionally, the computer device is specifically configured to determine a spatial region corresponding to the target virtual character; judging whether the space region is overlapped with the display region of any trigger section in the target trigger box or not; if yes, determining that the target virtual weapon hits the target virtual role.
Optionally, the movement trajectory of the particle set is a trajectory that varies with frame time; the computer device is further configured to determine a display area of the target trigger box under the target frame based on the movement trajectory of the set of particles under each target frame of the graphical user interface.
The computer device provided by the embodiment of the application can display the moving track of the particle set launched by the target virtual weapon in the virtual game scene by responding to the triggering operation of the target virtual weapon, and further can determine the display area of the target trigger box based on the moving track of the particle set, that is, the moving track of the launched particle set can be represented by the target trigger box, and further can determine whether the target virtual weapon hits the target virtual character according to the position relationship between the target trigger box and the target virtual character, wherein the determination of whether the target virtual weapon hits the target virtual character is determined by determining the position relationship between the target trigger box and the target virtual character, so that the performance consumption of the device is low, and the determination of the position relationship between the target trigger box and the target virtual character is obtained based on the moving track of the particle set launched by the target virtual weapon, so that the hitting situation of the target virtual weapon can be reflected more truly through the determination of the position relationship between the target trigger box and the target virtual character, and the reality of the simulation is improved.
In another aspect of the embodiments of the present application, there is also provided a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the weapon hit processing method.
Optionally, the computer readable storage medium when implemented is for displaying, in a virtual game scene, a movement trajectory of a set of particles fired by a target virtual weapon in response to a triggering operation on the target virtual weapon; determining a display area of a target trigger box based on the movement track of the particle set, wherein the target trigger box is used for representing a virtual space occupied by the movement track of the particle set; and determining whether the target virtual weapon hits the target virtual role or not according to the position relation between the target trigger box and the target virtual role.
Optionally, the target trigger box includes at least one trigger segment, and each trigger segment is used to represent a subspace in a virtual space occupied by a movement trajectory of the particle set; the computer-readable storage medium, when implemented, is specifically configured to determine fixed attributes of a target trigger box, the fixed attributes including: the shape, number and size of the trigger sections and the connection relation among the trigger sections; determining variable attributes of the target trigger box according to the movement tracks of the particle set, wherein the variable attributes comprise display angles of all trigger sections; and determining the display area of each trigger section in the target trigger box based on the fixed attribute and the variable attribute of the target trigger box.
Optionally, the computer-readable storage medium is further specifically configured to extract a position of a keypoint in a movement trajectory of the set of particles when implemented; and respectively determining the display angle of each trigger section in the target trigger box based on the position of the key point.
Optionally, the computer readable storage medium, when implemented, is further specifically configured to determine a motion state of the target virtual weapon, the motion state including a stationary state and a moving state; and determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon.
Optionally, the computer-readable storage medium is further configured to use the pre-configured initial attribute as the fixed attribute of the target trigger box if the motion state of the target virtual weapon is a static state.
Optionally, the computer-readable storage medium is further specifically configured to determine an adjustment parameter of the target trigger box based on a current moving direction and speed if the motion state of the target virtual weapon is a moving state; and adjusting the pre-configured initial attribute based on the adjustment parameter, and taking the adjusted attribute as the fixed attribute of the target trigger box.
Optionally, the computer-readable storage medium is specifically configured to determine a spatial region corresponding to the target virtual character when implemented; judging whether the space region is overlapped with the display region of any trigger section in the target trigger box or not; if yes, determining that the target virtual weapon hits the target virtual role.
Optionally, the movement trajectory of the particle set is a trajectory that varies with frame time; the computer readable storage medium, when implemented, is further configured to determine a display area of a target trigger box under the target frame based on a movement trajectory of the set of particles under each target frame of the graphical user interface.
The computer-readable storage medium provided by the embodiment of the application can display the moving track of the particle set launched by the target virtual weapon in the virtual game scene by responding to the triggering operation of the target virtual weapon, and then can determine the display area of the target trigger box based on the moving track of the particle set, that is, the moving track of the launched particle set can be represented by the target trigger box, and then can determine whether the target virtual weapon hits the target virtual character according to the position relationship between the target trigger box and the target virtual character, wherein, determining whether the target virtual weapon hits by determining the position relationship between the target trigger box and the target virtual character has low performance consumption on the device, and since the determination of the position relationship between the target trigger box and the target virtual character is obtained based on the moving track of the particle set launched by the target virtual weapon, the determination of the position relationship between the target trigger box and the target virtual character can also reflect the hit situation of the target virtual weapon more realistically, and the reality of the simulation is improved.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (11)

1. A weapon hit processing method is characterized in that a terminal device provides a graphical user interface, the graphical user interface is used for displaying a virtual game scene, and the virtual game scene comprises the following steps: a target virtual weapon and a target virtual character, the method comprising:
in response to a trigger operation on the target virtual weapon, displaying movement trajectories of a set of particles fired by the target virtual weapon in the virtual game scene;
determining a display area of a target trigger box based on the movement tracks of the particle set, wherein the target trigger box is used for characterizing virtual space occupied by the movement tracks of the particle set;
and determining whether the target virtual weapon hits the target virtual role or not according to the position relation between the target trigger box and the target virtual role.
2. The weapon hit processing method of claim 1, wherein the target trigger box comprises at least one trigger segment, each trigger segment being respectively used for characterizing a subspace in a virtual space occupied by a movement trajectory of the particle set;
the determining a display area of a target trigger box based on the movement track of the particle set comprises:
determining a fixed attribute of the target trigger box, the fixed attribute comprising: the form, the number and the size of the trigger sections and the connection relation among the trigger sections;
determining a variable attribute of the target trigger box according to the movement track of the particle set, wherein the variable attribute comprises a display angle of each trigger section;
and determining the display area of each trigger segment in the target trigger box based on the fixed attribute and the variable attribute of the target trigger box.
3. The weapon hit processing method of claim 2, wherein said determining variable attributes of the target trigger box from the movement trajectories of the set of particles comprises:
extracting the positions of key points in the moving track of the particle set;
and respectively determining the display angle of each trigger section in the target trigger box based on the position of the key point.
4. The weapon hit processing method of claim 2, wherein the determining the fixed attributes of the target trigger box comprises:
determining a motion state of the target virtual weapon, the motion state comprising a stationary state and a moving state;
and determining the fixed attribute of the target trigger box according to the motion state of the target virtual weapon.
5. The weapon hit processing method of claim 4, wherein said determining the fixed attributes of the target trigger box based on the motion state of the target virtual weapon comprises:
and if the motion state of the target virtual weapon is a static state, taking a pre-configured initial attribute as a fixed attribute of the target trigger box.
6. The weapon hit processing method of claim 4, wherein said determining the fixed attributes of the target trigger box based on the motion state of the target virtual weapon comprises:
if the motion state of the target virtual weapon is a moving state, determining an adjustment parameter of the target trigger box based on the current moving direction and speed;
and adjusting the pre-configured initial attribute based on the adjustment parameter, and taking the adjusted attribute as the fixed attribute of the target trigger box.
7. The weapon hit processing method according to claim 2, wherein the determining whether the target virtual weapon hits the target virtual character based on the contact relationship between the target trigger box and the target virtual character comprises:
determining a space region corresponding to the target virtual character;
determining whether the space region overlaps with a display region of any trigger segment in the target trigger box;
if yes, determining that the target virtual weapon hits the target virtual role.
8. The weapon hit processing method of any one of claims 1-7, wherein the movement trajectory of the set of particles is a frame time-varying trajectory;
the determining a display area of a target trigger box based on the movement trajectory of the particle set comprises:
determining a display area of the target trigger box under each target frame of the graphical user interface based on movement trajectories of a set of particles under the target frame.
9. A weapon hit processing apparatus, wherein a terminal device provides a graphical user interface, and the graphical user interface is used to display a virtual game scene, and the virtual game scene includes: a target virtual weapon and a target virtual character, the apparatus comprising: the system comprises a response module, a region determination module and a hit determination module;
the response module is used for responding to the triggering operation of the target virtual weapon and displaying the moving track of the particle set emitted by the target virtual weapon in the virtual game scene;
the region determination module is used for determining a display region of a target trigger box based on the movement track of the particle set, wherein the target trigger box is used for representing a virtual space occupied by the movement track of the particle set;
and the hit determining module is used for determining whether the target virtual weapon hits the target virtual role according to the position relation between the target trigger box and the target virtual role.
10. A computer device, comprising: memory in which a computer program is stored which is executable on the processor, a processor which, when executing the computer program, carries out the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that the storage medium has stored thereon a computer program which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202211363956.9A 2022-11-02 2022-11-02 Weapon hit processing method, device, equipment and storage medium Pending CN115671749A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211363956.9A CN115671749A (en) 2022-11-02 2022-11-02 Weapon hit processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211363956.9A CN115671749A (en) 2022-11-02 2022-11-02 Weapon hit processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115671749A true CN115671749A (en) 2023-02-03

Family

ID=85048248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211363956.9A Pending CN115671749A (en) 2022-11-02 2022-11-02 Weapon hit processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115671749A (en)

Similar Documents

Publication Publication Date Title
JP7362191B2 (en) Virtual object control method, device, terminal and computer program
CN110465087B (en) Virtual article control method, device, terminal and storage medium
CN110548288B (en) Virtual object hit prompting method and device, terminal and storage medium
CN110694279B (en) Game special effect display method, device, equipment and medium
JP7309917B2 (en) Information display method, device, equipment and program
US20230033530A1 (en) Method and apparatus for acquiring position in virtual scene, device, medium and program product
CN113559518A (en) Interaction detection method and device of virtual model, electronic equipment and storage medium
JP2024513658A (en) Method and apparatus for releasing skills of virtual objects, devices, media, and programs
CN111359206B (en) Virtual object control method, device, terminal and storage medium
CN112316429A (en) Virtual object control method, device, terminal and storage medium
JP2024509068A (en) Virtual object control method, device, equipment and computer program
WO2022156491A1 (en) Virtual object control method and apparatus, and device, storage medium and program product
KR20210141971A (en) Method, apparatus, terminal, and storage medium for selecting virtual objects
CN115671749A (en) Weapon hit processing method, device, equipment and storage medium
CN115430153A (en) Collision detection method, device, apparatus, medium, and program in virtual environment
CN111862345B (en) Information processing method and device, electronic equipment and computer readable storage medium
JP2024508682A (en) Virtual object control method, virtual object control device, computer equipment, and computer program
CN114146412A (en) Display control method and device in game, electronic equipment and storage medium
CN112156472A (en) Control method, device and equipment of virtual prop and computer readable storage medium
CN113617030B (en) Virtual object control method, device, terminal and storage medium
CN112057859B (en) Virtual object control method, device, terminal and storage medium
CN115671748A (en) Weapon hit processing method, device, equipment and storage medium
JP7419400B2 (en) Virtual object control method, device, terminal and computer program
Pinheiro et al. RealShooting: Expanding the experience of point-and-click target shooting games
CN116764196A (en) Processing method, device, equipment, medium and program product in virtual scene

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination