Game character shooting control method and device, electronic equipment and storage medium
By determining the positional relationship between the game character and the target point at the end of the flying prop, and combining player input with flight direction and shooting direction, the game combines aerial flight and shooting, solving the complexity problem of aerial shooting actions and improving the fun and ease of operation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2025-04-01
- Publication Date
- 2026-05-01
AI Technical Summary
In existing shooting games, there is a lack of combination of aerial flight and shooting actions, which increases the game's fun and operational complexity, and also requires high animation resources and device performance.
By determining the positional relationship between the game character and the target point at the end of the flying prop, and combining the offset trajectory control information input by the player, the flight direction and shooting direction of the game character are controlled. By using pre-made flight and shooting actions, control can be achieved to shoot while flying.
It achieves accurate flight and shooting performance in non-ground scenarios, improving the gaming experience while reducing resource requirements and complexity.
Smart Images

Figure CN119951136B_ABST
Abstract
Description
Game character shooting control methods, devices, electronic devices and storage media Technical Field
[0001] This application relates to the field of game technology, and more specifically, to a method, device, electronic device, and storage medium for controlling shooting in games. Background Technology
[0002] Currently, most ground-based shooting games involve players controlling game characters to run, jump, and move on the ground in the game scene, while performing shooting actions during these actions.
[0003] However, some shooting actions may not take place on the ground, but in other scenarios. For example, a game character may need to perform a shooting action while gliding through the air.
[0004] Therefore, how to achieve shooting control in non-ground scenarios is a problem that needs to be solved. Summary of the Invention
[0005] The purpose of this application is to provide a method, device, electronic device, and storage medium for controlling shooting in a game character, so as to realize shooting control in non-ground scenarios and enhance the fun of shooting games.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, embodiments of this application provide a method for controlling shooting in a game, including:
[0008] In response to a trigger command for a flying item used by a game character, the flight direction of the game character is determined based on the positional relationship between the game character and a target point, wherein the target point is the location of the end of the flying item used by the game character.
[0009] Based on the flight direction of the game character, determine the flight action performed by the game character using the flight prop;
[0010] The shooting action of the game character is determined based on the game character's flight direction and the shooting direction of the game character in the flight direction;
[0011] Control the game character to perform the flight action and the shooting action.
[0012] Secondly, this application also provides a game character shooting control device, including: a determining module and a control module;
[0013] The determining module is used to respond to the trigger command of the flying prop for the game character, and determine the flight direction of the game character according to the positional relationship between the game character and the target point, wherein the target point is the position of the end of the flying prop used by the game character;
[0014] The determining module is used to determine the flight action performed by the game character using the flight prop based on the flight direction of the game character;
[0015] The determining module is used to determine the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character in the flight direction;
[0016] The control module is used to control the game character to perform the flight action and the shooting action.
[0017] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the game character shooting control method provided in the first aspect.
[0018] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, performs the game character shooting control method as provided in the first aspect.
[0019] The beneficial effects of this application are:
[0020] This application provides a method, device, electronic device, and storage medium for controlling shooting in a game, including: responding to a trigger command for a projectile targeting a game character; determining the game character's flight direction based on the positional relationship between the game character and a target point; determining the flight action performed by the game character using the projectile based on the game character's flight direction; determining the game character's shooting action based on the game character's flight direction and the shooting orientation of the game character within the flight direction; and controlling the game character to perform the flight action and the shooting action. This method can determine the flight direction based on the actual flight situation, and the flight direction conforms to kinematic principles. The flight action and shooting action are matched with the flight direction, ensuring that the determined flight action and shooting action effectively match the actual flight situation of the game character. This achieves a game mode combining flight and shooting while also ensuring the accuracy of the flight and shooting effects, thus enhancing the gaming experience.
[0021] In addition, for each flight direction and each firing direction, only a small number of flight and firing actions are needed to achieve the required flight and firing performance, which can effectively reduce the amount of resources used and the complexity of the solution is low. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 is a flowchart illustrating a game character shooting control method provided in an embodiment of this application;
[0024] Figure 2 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0025] Figure 3 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0026] Figure 4 is a schematic diagram of flight information display provided in an embodiment of this application;
[0027] Figure 5 is a schematic diagram of another flight information display provided in an embodiment of this application;
[0028] Figure 6 is a schematic diagram of another flight information display provided in an embodiment of this application;
[0029] Figure 7 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0030] Figure 8 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0031] Figure 9 is a schematic diagram illustrating a firing orientation provided in an embodiment of this application;
[0032] Figure 10 is a schematic diagram showing another firing orientation provided in an embodiment of this application;
[0033] Figure 11 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0034] Figure 12 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0035] Figure 13 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0036] Figure 14 is a schematic diagram of a flight maneuver provided in an embodiment of this application;
[0037] Figure 15 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application;
[0038] Figure 16 is a schematic diagram of a shooting action provided in an embodiment of this application;
[0039] Figure 17 is a schematic diagram of a game character shooting control device provided in an embodiment of this application;
[0040] Figure 18 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0042] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0043] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0044] The shooting control in non-ground scenarios that this application aims to achieve mainly revolves around aerial flight scenarios, that is, to achieve shooting control while flying. However, in practical applications, non-ground scenarios are not limited to aerial flight scenarios, and shooting control varies in different non-ground scenarios.
[0045] In developing a third-person shooter action game, the designers wanted to combine grappling hook flight with shooting to create a gameplay mechanic where players can shoot while flying. The player can control the shooting direction, directing the character towards the firing direction; simultaneously, during flight, the player can control the character's trajectory using directional keys or a joystick, and can also break the grappling hook in specific ways to freefall at a certain speed. This style of presentation frequently appears in various films and television shows; if implemented in a third-person shooter game, it would significantly enhance the game's entertainment value and replayability.
[0046] Most games on the market today rarely combine aerial flight and shooting; instead, they often refine one of the functions, such as using spider webs to fly in Spider-Man or characters parachuting and shooting in Knives Out.
[0047] In the games mentioned above, there are very few solutions that combine the two. Currently, the solutions implemented in film or CG (Computer Graphics) require animators to spend a lot of time refining and iterating. At the same time, if a multi-directional shooting experience is to be achieved through action, the required animation resources are immeasurable, and there are also higher performance requirements for the operating devices.
[0048] To address the aforementioned issues, this solution provides a game character shooting control method. Based on the positional relationship between the game character and the target point at the end of the projectile, as well as the player-inputted offset trajectory control information, the method can control the game character's flight direction and determine the flight action matching the flight direction. Simultaneously, by combining the shooting orientation under the flight direction, the matching shooting action is determined, and the shooting action is adjusted using inverse dynamics principles. Finally, the flight and shooting actions are combined and played, achieving game control where the game character flies and shoots simultaneously. Furthermore, by pre-producing a small number of flight actions under different flight directions and a small number of shooting actions under different shooting orientations under different flight directions, precise flight and shooting action performance can be achieved, requiring fewer resources and having lower processing complexity.
[0049] Figure 1 is a flowchart illustrating a game character shooting control method provided in an embodiment of this application; the executing entity of this method can be a computer device, as shown in Figure 1, and the method may include:
[0050] S101, In response to the trigger command of the flying item for the game character, determine the flight direction of the game character based on the positional relationship between the game character and the target point.
[0051] The target point is the location of the end of the flying device used by the game character.
[0052] A game character refers to a character controlled by the player to perform game actions. The target point is the location of the end of a projectile used by the game character. Projectiles can be, for example, grappling hooks or ziplines. The game character can use these projectiles to fly or glide from the starting point to the designated target point. The location of the projectile's end can be set by the player controlling the game character or pre-set in the game environment. For example, with a grappling hook, the game character can throw out the end of the grappling hook and fix it at a designated location, which is the target point. Then, the game character uses the pulling force of the grappling hook to fly continuously towards the target point from any starting point. Similarly, with a zipline, the starting and ending points are usually pre-defined, with the ending point referring to the target point. The game character can use the zipline to fly from the starting point to the ending point.
[0053] Each frame update within the game allows for control of the game character's shooting behavior in that frame using the methods provided in this solution. Therefore, the following examples will use the shooting control processing of any given current frame as an example for illustration.
[0054] Optionally, the flight direction of the game character can be determined based on the positional relationship between the game character and the target point in the current frame. The flight direction is usually determined by multiple factors, including but not limited to the initial velocity of the game character and the speed of the game character when flying towards the target point. The flight direction must conform to the basic principles of kinematics so that the game character eventually gets closer to the target point and can reach the target point.
[0055] S102. Based on the flight direction of the game character, determine the flight actions performed by the game character using flight props.
[0056] For different flight directions, flight maneuvers can be pre-made to match the flight direction. The flight maneuvers can accurately reflect the flight performance under the flight direction. The flight maneuvers match the actual flight performance under the flight direction, making the flight maneuvers more in line with the actual scenario.
[0057] Optionally, based on the flight direction of the game character, a flight action that matches the flight direction can be determined. The flight action is the action that the game character performs when using flight props to fly.
[0058] S103. Determine the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character in the flight direction.
[0059] For each flight direction, there are further subdivisions into different shooting directions. Taking upward flight as an example, when flying upwards, there might be situations where shooting is directed to the left or right of the flight direction. To improve the shooting effect, shooting actions corresponding to different shooting directions under different flight directions can be pre-made, thus determining the game character's shooting actions based on the game character's flight direction and shooting direction within that flight direction.
[0060] In other words, the flight direction and the shooting direction can be used to determine the matching shooting action, which enables the precise depiction of the shooting action and makes the shooting performance richer and more accurate.
[0061] S104. Control the game character to perform flight and shooting actions.
[0062] Based on the determined flight and shooting actions to be performed by the game character in the current frame, the game character can be controlled to perform flight and shooting actions at the current flight position and direction, achieving a game performance of flying and shooting simultaneously.
[0063] Because shooting and flying actions are matched with the flight direction, and the flight direction is determined based on the actual flight situation, which conforms to the principles of kinematics, the shooting and flying actions can effectively match the actual flight situation of the game character. This achieves a game mode that combines flight and shooting, while also ensuring the accuracy of the flight and shooting effects, thus enhancing the gaming experience.
[0064] In summary, the game character shooting control method provided in this embodiment includes: responding to a trigger command for a projectile targeting the game character, determining the game character's flight direction based on the positional relationship between the game character and the target point; determining the flight action performed by the game character using the projectile based on the game character's flight direction; determining the game character's shooting action based on the game character's flight direction and the shooting orientation of the game character within the flight direction; and controlling the game character to perform the flight action and the shooting action. This method can determine the flight direction based on the actual flight situation, and the flight direction conforms to kinematic principles. The flight action and shooting action are matched with the flight direction, ensuring that the determined flight action and shooting action effectively match the actual flight situation of the game character. This achieves a game mode combining flight and shooting while also ensuring the accuracy of the flight and shooting effects, thus enhancing the gaming experience.
[0065] Figure 2 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S101, responding to a trigger command for a flying item for the game character, determining the flight direction of the game character based on the positional relationship between the game character and the target point may include:
[0066] S201. In response to the trigger command of the flying item for the game character, determine the first flight information of the game character based on the positional relationship between the game character and the target point.
[0067] The first flight information is used to control the game character to fly towards the target point using flight tools.
[0068] Under normal circumstances, the game character will move towards the target point and eventually reach it. The first flight information is used to control the game character to fly towards the target point using flight tools.
[0069] As the game character flies towards the target point, the positional relationship between the game character and the target point constantly changes, and thus the game character's initial flight information also changes continuously. Therefore, the positional relationship between the game character and the target point in the current frame can be collected in real time to determine the game character's initial flight information for that frame.
[0070] S202. Determine the second flight information of the game character based on the input control command.
[0071] The second flight information is used to control the trajectory deviation of the game character as it flies towards the target point.
[0072] Normally, directly controlling a game character to fly towards a target point results in a mediocre flight experience. To increase the variety of flight paths, a second flight information input by the player can cause the game character to deviate from its trajectory during flight. In other words, the second flight information is used to control the trajectory deviation of the game character as it flies towards the target point. The game character will eventually reach the target point, but the flight path can deviate to some extent during the journey, and this deviation can be controlled by the player through input commands.
[0073] Optionally, players can input control commands via an external game controller or virtual controls on a terminal to add secondary flight information to the game character.
[0074] S203. Determine the flight direction of the game character based on the game character's first flight information and the game character's second flight information.
[0075] Therefore, the game character's first flight information and the game character's second flight information can be used to determine the game character's flight direction.
[0076] Figure 3 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S201, in response to a trigger command for a flight prop targeting the game character, determining the first flight information of the game character based on the positional relationship between the game character and the target point may include:
[0077] S301. Based on the vertical positional relationship between the game character and the target point, determine the first sub-flight information of the game character in the vertical direction;
[0078] The first flight information includes the first flight speed and the first flight direction.
[0079] Figure 4 is a schematic diagram of flight information display provided by an embodiment of this application. Figure 5 is a schematic diagram of flight information display provided by an embodiment of this application. As shown in Figure 4, V1 is the vertical component of the first flight information, that is, V1 is the first sub-flight information.
[0080] Using the game character's hand position as the game character's position, and taking the coordinate system shown in the figure as an example, when the game character's vertical position is lower than the target point, that is, when the game character's ordinate is less than the target point's ordinate (as shown in Figure 4), the direction of V1 is as indicated in Figure 4. The size of V1 can be matched and set according to the difference between the game character and the target point in the vertical direction. The direction of V1 is the first sub-flight direction, and the size of V1 is the first sub-flight speed.
[0081] As shown in Figure 5, when the game character's vertical position is higher than the target point, that is, when the game character's ordinate is greater than the target point's ordinate, then V1 needs to be reversed. This allows us to determine the first sub-flight speed and the first sub-flight direction.
[0082] S302. Based on the horizontal positional relationship between the game character and the target point, determine the second sub-flight information of the game character in the horizontal direction.
[0083] The second sub-flight information includes the second sub-flight speed and the second sub-flight direction.
[0084] Similarly, V2 is the horizontal component of the first flight information, which is also the second sub-flight information.
[0085] When the game character is horizontally to the left of the target point (i.e., when the horizontal coordinate of the game character is smaller than the horizontal coordinate of the target point, as shown in Figure 4), the direction of V2 is as indicated in Figure 4. The size of V2 can be matched and set according to the difference in the horizontal direction between the game character and the target point. The direction of V2 is the second sub-flight direction, and the size of V2 is the second sub-flight speed.
[0086] Figure 6 is a schematic diagram illustrating another flight information display provided in an embodiment of this application. As shown in Figure 6, when the game character is located to the right of the target point in the horizontal direction, that is, when the horizontal coordinate of the game character is greater than the horizontal coordinate of the target point, and the game character gradually moves away from the target point in the horizontal direction, V2 needs to be reversed. If it is not reversed, the game character will not be able to reach the target point. Thus, the second sub-flight speed and the second sub-flight direction can be determined.
[0087] S303, take the first sub-flight information of the game character in the vertical direction and the second sub-flight information of the game character in the horizontal direction as the first flight information of the game character.
[0088] Therefore, the first sub-flight information and the second sub-flight information of the game character together constitute the first flight information of the game character.
[0089] Figure 7 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S202, determining the second flight information of the game character based on the input control command may include:
[0090] S401: Respond to the input centrifugal acceleration control command and obtain the velocity direction and magnitude of the centrifugal acceleration.
[0091] The direction of the centrifugal acceleration is perpendicular to the line connecting the game character and the target point.
[0092] Players can input control commands using a gamepad. For example, sliding the gamepad to the right applies a counter-clockwise centrifugal acceleration, and sliding it to the left applies a clockwise centrifugal acceleration. Furthermore, the magnitude of the applied centrifugal acceleration can be controlled by the degree of sliding the gamepad.
[0093] Typically, the direction of the input centrifugal acceleration is perpendicular to the line connecting the game character and the target point.
[0094] As shown in Figure 4, V3 represents the applied centrifugal acceleration. When the direction of V3 is as shown in Figure 4, V3 causes the game character to generate a counterclockwise centrifugal acceleration. Conversely, when the direction of V3 is opposite to that in Figure 4, a clockwise centrifugal acceleration is applied.
[0095] The magnitude of the applied centrifugal acceleration can be determined by the extent to which the player drags the game controller.
[0096] Of course, in practical applications, centrifugal acceleration is not limited to being applied through a game controller; it can also be achieved through physical buttons on the terminal or virtual controls.
[0097] S402. Determine the second flight information of the game character based on the direction and magnitude of the centrifugal acceleration.
[0098] Optionally, the direction and magnitude of the centrifugal acceleration applied by the player constitute the game character's second flight information. Based on the second flight information, the game character can be controlled to produce a certain trajectory deviation during its flight toward the target point.
[0099] Optionally, in step S203, determining the flight direction of the game character based on the game character's first flight information and second flight information may include: determining the game character's flight direction based on the game character's first flight information, second flight information, and initial velocity information.
[0100] In one feasible approach, when determining the flight direction of a game character, the initial velocity information of the game character can also be taken into account. The game character has a certain initial velocity at any frame, and the direction of the initial velocity is determined by the current movement direction of the game character. The direction of the initial velocity is not fixed, so it is not shown in the figure.
[0101] By combining the game character's initial velocity information, first flight information, and second flight information in the current frame, a vector calculation of the velocity can be performed to determine the game character's flight direction. For specific vector calculation methods, please refer to the physics calculation implementation.
[0102] Figure 8 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, before determining the shooting action of the game character based on the game character's flight direction and the shooting orientation of the game character in the flight direction in step S103, the method may further include:
[0103] S501. Based on the position information of the game character and the viewing direction of the virtual camera, determine the angle information between the viewing direction of the game character and the viewing direction of the virtual camera.
[0104] With the game character's flight direction fixed, the character may need to shoot to the left or right of the flight direction depending on the flight direction. To improve the accuracy of the shooting action, different shooting actions can be determined for different shooting directions under a certain flight direction.
[0105] The direction of the shot is determined by the direction of the player's crosshair and the position of the game character. The direction of the player's crosshair is the same as the direction of the crosshair on the current screen, and can also refer to the direction of the virtual camera's view. The game character is presented in a third-person perspective in the game screen.
[0106] Figure 9 is a schematic diagram illustrating one shooting orientation provided in an embodiment of this application. Figure 10 is a schematic diagram illustrating another shooting orientation provided in an embodiment of this application. Assuming the cube represents a virtual camera and the cylinder represents a game character, the relationship between the virtual camera's viewing angle and the game character's position from a top-down perspective is shown in Figure 9.
[0107] When the player moves the crosshair, the virtual camera's viewpoint rotates. The vector formed by the virtual camera's viewpoint and the position of the virtual camera and the game character creates an angle, as shown in Figure 10. When the virtual camera faces left, the two vectors form an angle 'a'. This angle 'a' represents the angle between the game character's position and the virtual camera's viewpoint.
[0108] S502. Based on the included angle information, determine the shooting direction of the game character in the flight direction.
[0109] When the angle α is greater than 30°, we consider the game character's shooting direction to be slightly to the left; similarly, when the virtual camera's view is rotated to the right, when the angle α is greater than 30°, we can consider the game character's shooting direction to be slightly to the right. When the angle after left and right rotation is less than 30°, we can consider the game character's shooting direction to be positive.
[0110] It is worth noting that the firing direction can be determined in the above manner regardless of the flight direction.
[0111] Optionally, in step S102, determining the flight action performed by the game character using the flight prop based on the game character's flight direction includes: determining the flight action that matches the flight direction based on the game character's flight direction.
[0112] During the animation resource production process, animators can create corresponding flight actions for each flight direction. Based on the game character's flight direction, a matching flight action can be determined from the pre-made flight actions.
[0113] Figure 11 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S103, determining the shooting action of the game character based on the game character's flight direction and the shooting orientation of the game character in the flight direction may include:
[0114] S601. Based on the flight direction of the game character and the shooting direction of the game character under the flight direction, determine the initial shooting action that matches the flight direction and the shooting direction under the flight direction.
[0115] Similarly, for each firing direction under each flight direction, the corresponding firing action can be pre-made for each firing direction under each flight direction. That is, the firing action can be determined by combining the flight direction with the firing direction.
[0116] S602. Determine the shooting action of the game character based on the initial shooting action and the orientation of the virtual camera.
[0117] It's worth noting that the pre-made shooting animations are not linked to the shooting direction; they can be considered generic shooting animations that only demonstrate the shooting effect but cannot achieve precise shooting. Therefore, the initial shooting animation can be further adjusted by combining the virtual camera's viewing angle, i.e., the crosshair position, so that the muzzle of the shooting prop is pointed in the specified shooting direction. This allows for adjustments to the shooting animation to enable shooting in the designated direction. In shooting games, the virtual camera's viewing angle is used to represent the shooting direction.
[0118] Figure 12 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S602, determining the shooting action of the game character based on the initial shooting action and the viewing angle of the virtual camera may include:
[0119] S701. Determine the muzzle orientation of the virtual shooting prop based on the viewing angle of the virtual camera.
[0120] After matching the initial shooting action, you can point the muzzle of the virtual shooting prop at the shooting direction determined on the screen during the initial shooting action to determine the muzzle orientation of the virtual shooting prop.
[0121] S702. Adjust the position of the game character's arm during the initial shooting action according to the muzzle orientation of the virtual shooting prop, and determine the adjusted arm position information.
[0122] Then, based on the direction the gun muzzle is pointing, the position of the arm holding the virtual shooting prop on the game character is adjusted to determine the position of the arm when the gun muzzle is pointing in the shooting direction, and this position is used as the adjusted arm position information.
[0123] S703. Determine the shooting action of the game character based on the muzzle orientation of the virtual shooting prop and the adjusted arm position information.
[0124] Then, by combining the muzzle orientation of the virtual shooting prop with the adjusted arm position information, the shooting action of the game character can be determined.
[0125] Optionally, in step S702, adjusting the position of the game character's arm in the initial shooting action according to the muzzle orientation of the virtual shooting prop, and determining the adjusted arm position information, may include: performing inverse dynamics calculation according to the muzzle orientation of the virtual shooting prop, controlling the position of the game character's arm to align with the muzzle orientation, and obtaining the adjusted arm position information.
[0126] The distance from the muzzle to the shoulder can be considered as a parent-child joint chain, with the muzzle as the child node. Based on the muzzle orientation, IK calculations are used to align the corresponding parent node with the shooting direction, thereby determining the actual position of the arm and achieving precise shooting performance.
[0127] Figure 13 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S102, before determining the flight action matching the flight direction based on the game character's flight direction, the following may be included:
[0128] S801, pre-create multiple flight maneuvers.
[0129] In some embodiments, for each flight direction, at least one flight action corresponding to the flight direction can be pre-created. That is, multiple flight actions can be created for one flight direction. Of course, in order to reduce the amount of resources used, only one or two optional flight actions can be created for one flight direction.
[0130] S802. Establish the mapping relationship between each flight direction of the game character and at least one flight action.
[0131] Then, a mapping relationship can be established between the game character's flight directions and flight actions. Based on this mapping relationship, the flight action for each flight direction can be quickly matched. When there are multiple flight actions corresponding to a flight direction, the player can select one of the multiple flight actions to perform according to personal preference.
[0132] Figure 14 is a schematic diagram of a flight action provided in an embodiment of this application. In this embodiment, the flight direction of the game character can be divided into 6 directions, mainly including upward flight and downward flight. Upward flight can be further subdivided into leftward deviation, rightward deviation, and no deviation.
[0133] Figure 14(1) shows the flight maneuver when flying upward and deviating to the right; Figure 14(2) shows the flight maneuver when flying upward and not deviating; Figure 14(3) shows the flight maneuver when flying upward and deviating to the left; Figure 14(4) shows the flight maneuver when flying downward and deviating to the right; Figure 14(5) shows the flight maneuver when flying downward and not deviating; Figure 14(6) shows the flight maneuver when flying downward and deviating to the left.
[0134] Figure 15 is a flowchart illustrating another game character shooting control method provided in an embodiment of this application; optionally, in step S103, before determining the initial shooting action matching the flight direction and the shooting orientation under the flight direction based on the game character's flight direction and the shooting orientation under the flight direction, the following may be included:
[0135] S901, pre-create multiple shooting actions.
[0136] Similar to the creation of flight actions, shooting actions corresponding to different shooting directions under different flight directions can be created in advance. One or more shooting actions can be created under one shooting direction for one flight direction.
[0137] S902. Establish a mapping relationship between each shooting direction of the game character under each flight direction and at least one shooting action.
[0138] Establish a mapping relationship between the shooting orientation and shooting action of the game character in each flight direction. A flight direction plus a shooting orientation can correspond to one or more shooting actions.
[0139] Figure 16 is a schematic diagram of a shooting action provided in an embodiment of this application. Taking the flight action shown in (4) of Figure 14 as an example, there are three shooting actions corresponding to the shooting directions. (1) in Figure 16 represents the shooting action when flying downward and deflecting to the right, with the shooting direction facing forward; (2) in Figure 16 represents the shooting action when flying downward and deflecting to the right, with the shooting direction facing left; and (3) in Figure 16 represents the shooting action when flying downward and deflecting to the right, with the shooting direction facing right.
[0140] Of course, Figures 14 and 16 are only schematic representations of one possible flight maneuver under each flight direction, and one possible shooting maneuver under different shooting directions under one flight direction. Actual flight maneuvers and shooting maneuvers can also be shown in other ways, as long as they conform to the principles of kinematics and the actual flight and shooting situation.
[0141] In summary, the game character shooting control method provided in this embodiment includes: responding to a trigger command for a projectile targeting a game character, determining the game character's flight direction based on the positional relationship between the game character and a target point; determining the flight action performed by the game character using the projectile based on the game character's flight direction; determining the game character's shooting action based on the game character's flight direction and the shooting orientation of the game character within the flight direction; and controlling the game character to perform the flight action and the shooting action. This method can determine the flight direction based on the actual flight situation, and the flight direction conforms to kinematic principles. The flight action and shooting action are matched with the flight direction, ensuring that the determined flight action and shooting action effectively match the actual flight situation of the game character. This achieves a game mode combining flight and shooting while also ensuring the accuracy of the flight and shooting effects, thus enhancing the gaming experience.
[0142] In addition, for each flight direction and each firing direction, only a small number of flight and firing actions are needed to achieve the required flight and firing performance, which can effectively reduce the amount of resources used and the complexity of the solution is low.
[0143] The following describes the apparatus, device, and storage medium used to execute the game character shooting control method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.
[0144] Figure 17 is a schematic diagram of a game character shooting control device provided in an embodiment of this application. The functions implemented by the game character shooting control device correspond to the steps performed by the above-described method. The device can be understood as the server or the processor of the server, or it can be understood as a component that implements the functions of this application under the control of the server, independent of the server or the processor. As shown in Figure 17, the device may include: a determining module 710 and a control module 720.
[0145] The determination module 710 is used to respond to the trigger command of the flying prop for the game character, and determine the flight direction of the game character based on the positional relationship between the game character and the target point, where the target point is the position of the end of the flying prop used by the game character;
[0146] The determination module 710 is used to determine the flight actions performed by the game character using flight props based on the game character's flight direction;
[0147] The determination module 710 is used to determine the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character in the flight direction;
[0148] The control module 720 is used to control the game character to perform flight and shooting actions.
[0149] Optionally, the determining module 710 is specifically used to respond to the trigger command of the flying prop for the game character, and determine the first flight information of the game character based on the positional relationship between the game character and the target point; the first flight information is used to control the game character to fly towards the target point using the flying prop;
[0150] Based on the input control commands, the game character's second flight information is determined; the second flight information is used to control the game character's trajectory deviation during flight towards the target point.
[0151] The flight direction of the game character is determined based on the game character's first flight information and the game character's second flight information.
[0152] Optionally, the determining module 710 is specifically used to determine the first sub-flight information of the game character in the vertical direction based on the positional relationship between the game character and the target point in the vertical direction. The first sub-flight information includes the first sub-flight speed and the first sub-flight direction.
[0153] Based on the horizontal positional relationship between the game character and the target point, the second sub-flight information of the game character in the horizontal direction is determined. The second sub-flight information includes the second sub-flight speed and the second sub-flight direction.
[0154] The first sub-flight information of the game character in the vertical direction and the second sub-flight information of the game character in the horizontal direction are taken as the first flight information of the game character.
[0155] Optionally, the determining module 710 is specifically used to respond to the input centrifugal acceleration control command and obtain the velocity direction and magnitude of the centrifugal acceleration; the velocity direction of the centrifugal acceleration is perpendicular to the line connecting the game character and the target point;
[0156] The second flight information of the game character is determined based on the direction and magnitude of the centrifugal acceleration.
[0157] Optionally, the determining module 710 is specifically used to determine the flight direction of the game character based on the game character's first flight information, the game character's second flight information, and the game character's initial velocity information.
[0158] Optionally, the determining module 710 is also used to determine the angle information between the game character and the virtual camera's viewing direction based on the game character's position information and the virtual camera's viewing direction.
[0159] Based on the angle information, determine the shooting direction of the game character in the flight direction.
[0160] Optionally, the determining module 710 is specifically used to determine a flight action that matches the flight direction of the game character.
[0161] Optionally, the determining module 710 is specifically used to determine an initial shooting action that matches the flight direction and the shooting direction of the game character based on the game character's flight direction and the shooting direction of the game character in the flight direction.
[0162] The shooting action of the game character is determined based on the initial shooting action and the orientation of the virtual camera.
[0163] Optionally, the determining module 710 is specifically used to determine the muzzle orientation of the virtual shooting prop based on the viewing angle of the virtual camera;
[0164] The position of the game character's arm in the initial shooting action is adjusted based on the muzzle orientation of the virtual shooting prop to determine the adjusted arm position information;
[0165] The shooting action of the game character is determined based on the muzzle orientation of the virtual shooting prop and the adjusted arm position information.
[0166] Optionally, the determining module 710 is specifically used to perform inverse dynamics calculation based on the muzzle orientation of the virtual shooting prop, control the position of the game character's arm to align with the muzzle orientation, and obtain the adjusted arm position information.
[0167] Optionally, it also includes: creating modules;
[0168] Create a module for pre-creating multiple flight maneuvers;
[0169] Establish a mapping relationship between each flight direction of the game character and at least one flight action.
[0170] Optionally, the creation module can also be used to pre-create multiple shooting actions;
[0171] Establish a mapping relationship between each shooting direction of the game character under each flight direction and at least one shooting action.
[0172] These 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 digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0173] The modules described above can be connected or communicate with each other via wired or wireless connections. Wired connections can include metal cables, optical fibers, hybrid cables, or any combination thereof. Wireless connections can include connections via LAN, WAN, Bluetooth, ZigBee, or NFC, or any combination thereof. Two or more modules can be combined into a single module, and any module can be divided into two or more units. Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here.
[0174] Figure 18 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application, including: a processor 801, a storage medium 802, and a bus 803. The storage medium 802 stores machine-readable instructions executable by the processor 801. When the electronic device runs a game character shooting control method as described in the embodiment, the processor 801 communicates with the storage medium 802 through the bus 803. The processor 801 executes the machine-readable instructions to perform the following steps:
[0175] In response to the trigger command of the flying item for the game character, the flight direction of the game character is determined according to the positional relationship between the game character and the target point, which is the position of the end of the flying item used by the game character;
[0176] Based on the game character's flight direction, determine the flight actions performed by the game character using flight props;
[0177] The shooting action of the game character is determined based on the game character's flight direction and the shooting direction of the game character in the flight direction;
[0178] Control the game character to perform flight and shooting actions.
[0179] In one feasible implementation, when the processor 801 executes a trigger command for a flying item for a game character and determines the flight direction of the game character based on the positional relationship between the game character and the target point, it is specifically used to: determine first flight information of the game character based on the positional relationship between the game character and the target point in response to the trigger command for a flying item for the game character; the first flight information is used to control the game character to fly towards the target point using the flying item;
[0180] Based on the input control commands, the game character's second flight information is determined; the second flight information is used to control the game character's trajectory deviation during flight towards the target point.
[0181] The flight direction of the game character is determined based on the game character's first flight information and the game character's second flight information.
[0182] In one feasible implementation, when the processor 801 executes a trigger command in response to a flying item for a game character and determines the first flight information of the game character based on the positional relationship between the game character and the target point, it is specifically used to: determine the first sub-flight information of the game character in the vertical direction based on the positional relationship between the game character and the target point in the vertical direction, wherein the first sub-flight information includes a first sub-flight speed and a first sub-flight direction;
[0183] Based on the horizontal positional relationship between the game character and the target point, the second sub-flight information of the game character in the horizontal direction is determined. The second sub-flight information includes the second sub-flight speed and the second sub-flight direction.
[0184] The first sub-flight information of the game character in the vertical direction and the second sub-flight information of the game character in the horizontal direction are taken as the first flight information of the game character.
[0185] In one feasible implementation, when the processor 801 executes the second flight information of the game character based on the input control command, it is specifically used to: respond to the input centrifugal acceleration control command, and obtain the velocity direction and magnitude of the centrifugal acceleration; the velocity direction of the centrifugal acceleration is perpendicular to the line connecting the game character and the target point;
[0186] The second flight information of the game character is determined based on the direction and magnitude of the centrifugal acceleration.
[0187] In one feasible implementation, when the processor 801 executes the function of determining the flight direction of the game character based on the first flight information and the second flight information of the game character, it is specifically used to: determine the flight direction of the game character based on the first flight information, the second flight information, and the initial velocity information of the game character.
[0188] In one feasible implementation, before executing the determination of the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character in the flight direction, the processor 801 is also used to: determine the angle information between the game character and the virtual camera's viewing direction based on the game character's position information and the virtual camera's viewing direction.
[0189] Based on the angle information, determine the shooting direction of the game character in the flight direction.
[0190] In one feasible implementation, when the processor 801 is executing the determination of the flight action performed by the game character using a flight prop based on the game character's flight direction, it is specifically used to: determine the flight action that matches the flight direction based on the game character's flight direction.
[0191] In one feasible implementation, when the processor 801 determines the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character under the flight direction, it is specifically used to: determine an initial shooting action that matches the flight direction and the shooting direction of the game character under the flight direction.
[0192] The shooting action of the game character is determined based on the initial shooting action and the orientation of the virtual camera.
[0193] In one feasible implementation, when the processor 801 performs the action of determining the shooting action of the game character based on the initial shooting action and the viewing direction of the virtual camera, it is specifically used to: determine the muzzle orientation of the virtual shooting prop based on the viewing direction of the virtual camera.
[0194] The position of the game character's arm in the initial shooting action is adjusted based on the muzzle orientation of the virtual shooting prop to determine the adjusted arm position information;
[0195] The shooting action of the game character is determined based on the muzzle orientation of the virtual shooting prop and the adjusted arm position information.
[0196] In one feasible implementation, when the processor 801 performs the adjustment of the game character's arm position in the initial shooting action based on the muzzle orientation of the virtual shooting prop and determines the adjusted arm position information, it specifically performs: inverse dynamics calculation based on the muzzle orientation of the virtual shooting prop, controls the game character's arm position to align with the muzzle orientation, and obtains the adjusted arm position information.
[0197] In one feasible implementation, before executing the determination of a flight action matching the flight direction based on the game character's flight direction, the processor 801 is also used to: pre-create multiple flight actions;
[0198] Establish a mapping relationship between each flight direction of the game character and at least one flight action.
[0199] In one feasible implementation, before executing the initial shooting action that matches the flight direction and the shooting direction based on the game character's flight direction and the shooting direction of the game character under the flight direction, the processor 801 is also used to: pre-create multiple shooting actions;
[0200] Establish a mapping relationship between each shooting direction of the game character under each flight direction and at least one shooting action.
[0201] The storage medium 802 stores program code, which, when executed by the processor 801, causes the processor 801 to perform various steps in the game character shooting control method according to various exemplary embodiments of this application as described in the "Exemplary Methods" section above.
[0202] The processor 801 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0203] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory can include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disk, etc. Memory is any other medium capable of carrying or storing desired program code having an instruction or data structure form and accessible by a computer, but is not limited thereto. Storage medium 802 in this embodiment can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0204] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program, which is executed by a processor, and the processor performs the following steps:
[0205] In response to the trigger command of the flying item for the game character, the flight direction of the game character is determined according to the positional relationship between the game character and the target point, which is the position of the end of the flying item used by the game character;
[0206] Based on the game character's flight direction, determine the flight actions performed by the game character using flight props;
[0207] The shooting action of the game character is determined based on the game character's flight direction and the shooting direction of the game character in the flight direction;
[0208] Control the game character to perform flight and shooting actions.
[0209] In one feasible implementation, when the processor 801 executes a trigger command for a flying item for a game character and determines the flight direction of the game character based on the positional relationship between the game character and the target point, it is specifically used to: determine first flight information of the game character based on the positional relationship between the game character and the target point in response to the trigger command for a flying item for the game character; the first flight information is used to control the game character to fly towards the target point using the flying item;
[0210] Based on the input control commands, the game character's second flight information is determined; the second flight information is used to control the game character's trajectory deviation during flight towards the target point.
[0211] The flight direction of the game character is determined based on the game character's first flight information and the game character's second flight information.
[0212] In one feasible implementation, when the processor 801 executes a trigger command in response to a flying item for a game character and determines the first flight information of the game character based on the positional relationship between the game character and the target point, it is specifically used to: determine the first sub-flight information of the game character in the vertical direction based on the positional relationship between the game character and the target point in the vertical direction, wherein the first sub-flight information includes a first sub-flight speed and a first sub-flight direction;
[0213] Based on the horizontal positional relationship between the game character and the target point, the second sub-flight information of the game character in the horizontal direction is determined. The second sub-flight information includes the second sub-flight speed and the second sub-flight direction.
[0214] The first sub-flight information of the game character in the vertical direction and the second sub-flight information of the game character in the horizontal direction are taken as the first flight information of the game character.
[0215] In one feasible implementation, when the processor 801 executes the second flight information of the game character based on the input control command, it is specifically used to: respond to the input centrifugal acceleration control command, and obtain the velocity direction and magnitude of the centrifugal acceleration; the velocity direction of the centrifugal acceleration is perpendicular to the line connecting the game character and the target point;
[0216] The second flight information of the game character is determined based on the direction and magnitude of the centrifugal acceleration.
[0217] In one feasible implementation, when the processor 801 executes the function of determining the flight direction of the game character based on the first flight information and the second flight information of the game character, it is specifically used to: determine the flight direction of the game character based on the first flight information, the second flight information, and the initial velocity information of the game character.
[0218] In one feasible implementation, before executing the determination of the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character in the flight direction, the processor 801 is also used to: determine the angle information between the game character and the virtual camera's viewing direction based on the game character's position information and the virtual camera's viewing direction.
[0219] Based on the angle information, determine the shooting direction of the game character in the flight direction.
[0220] In one feasible implementation, when the processor 801 is executing the determination of the flight action performed by the game character using a flight prop based on the game character's flight direction, it is specifically used to: determine the flight action that matches the flight direction based on the game character's flight direction.
[0221] In one feasible implementation, when the processor 801 determines the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character under the flight direction, it is specifically used to: determine an initial shooting action that matches the flight direction and the shooting direction of the game character under the flight direction.
[0222] The shooting action of the game character is determined based on the initial shooting action and the orientation of the virtual camera.
[0223] In one feasible implementation, when the processor 801 performs the action of determining the shooting action of the game character based on the initial shooting action and the viewing direction of the virtual camera, it is specifically used to: determine the muzzle orientation of the virtual shooting prop based on the viewing direction of the virtual camera.
[0224] The position of the game character's arm in the initial shooting action is adjusted based on the muzzle orientation of the virtual shooting prop to determine the adjusted arm position information;
[0225] The shooting action of the game character is determined based on the muzzle orientation of the virtual shooting prop and the adjusted arm position information.
[0226] In one feasible implementation, when the processor 801 performs the adjustment of the game character's arm position in the initial shooting action based on the muzzle orientation of the virtual shooting prop and determines the adjusted arm position information, it specifically performs: inverse dynamics calculation based on the muzzle orientation of the virtual shooting prop, controls the game character's arm position to align with the muzzle orientation, and obtains the adjusted arm position information.
[0227] In one feasible implementation, before executing the determination of a flight action matching the flight direction based on the game character's flight direction, the processor 801 is also used to: pre-create multiple flight actions;
[0228] Establish a mapping relationship between each flight direction of the game character and at least one flight action.
[0229] In one feasible implementation, before executing the initial shooting action that matches the flight direction and the shooting direction based on the game character's flight direction and the shooting direction of the game character under the flight direction, the processor 801 is also used to: pre-create multiple shooting actions;
[0230] Establish a mapping relationship between each shooting direction of the game character under each flight direction and at least one shooting action.
[0231] In this embodiment, the computer program, when run by the processor, can also execute other machine-readable instructions to perform other methods as described in the embodiments. For details on the specific execution steps and principles, please refer to the description of the embodiments, which will not be repeated here.
[0232] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0233] The units described as separate components may or may not be physically separate. The 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 the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0234] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.
[0235] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A method for controlling shooting in a game character, characterized in that, include: In response to a trigger command for a flying item used by a game character, the flight direction of the game character is determined based on the positional relationship between the game character and a target point, where the target point is the location of the end of the flying item used by the game character. The game character flies or glides from the starting point to the target point using the flying item. The flight direction of the game character is determined based on first flight information and second flight information of the game character. The first flight information is used to control the game character to fly towards the target point using the flying item. The second flight information is used to control the game character to deviate from its trajectory while flying towards the target point; The method for determining the second flight information includes: responding to an input centrifugal acceleration control command, acquiring the velocity direction and magnitude of the centrifugal acceleration; the velocity direction of the centrifugal acceleration is perpendicular to the line connecting the game character and the target point; determining the second flight information of the game character based on the velocity direction and magnitude of the centrifugal acceleration; determining the flight action performed by the game character using the flight prop based on the flight direction of the game character; determining the shooting action of the game character based on the flight direction of the game character and the shooting orientation of the game character under the flight direction; and controlling the game character to perform the flight action and the shooting action.
2. The method according to claim 1, characterized in that, The step of responding to a trigger command for a flying item targeting a game character and determining the flight direction of the game character based on the positional relationship between the game character and a target point includes: responding to a trigger command for a flying item targeting a game character and determining first flight information of the game character based on the positional relationship between the game character and the target point; determining second flight information of the game character based on an input control command; and determining the flight direction of the game character based on the first flight information and the second flight information of the game character.
3. The method according to claim 2, characterized in that, The method of responding to a trigger command for a flying item for a game character, and determining the first flight information of the game character based on the positional relationship between the game character and the target point, includes: determining the first sub-flight information of the game character in the vertical direction based on the positional relationship between the game character and the target point in the vertical direction, wherein the first sub-flight information includes a first sub-flight speed and a first sub-flight direction; determining the second sub-flight information of the game character in the horizontal direction based on the positional relationship between the game character and the target point in the horizontal direction, wherein the second sub-flight information includes a second sub-flight speed and a second sub-flight direction; and using the first sub-flight information of the game character in the vertical direction and the second sub-flight information of the game character in the horizontal direction as the first flight information of the game character.
4. The method according to claim 2, characterized in that, Determining the flight direction of the game character based on its first flight information and second flight information includes: determining the flight direction of the game character based on its first flight information, second flight information, and initial velocity information.
5. The method according to claim 1, characterized in that, Before determining the shooting action of the game character based on the game character's flight direction and the game character's shooting orientation in the flight direction, the process includes: determining the angle information between the game character and the virtual camera's viewing orientation based on the game character's position information and the virtual camera's viewing orientation; and determining the game character's shooting orientation in the flight direction based on the angle information.
6. The method according to claim 1, characterized in that, Determining the flight action performed by the game character using the flight prop based on the game character's flight direction includes: determining a flight action that matches the flight direction based on the game character's flight direction.
7. The method according to claim 1, characterized in that, The step of determining the shooting action of the game character based on the game character's flight direction and the shooting direction of the game character under the flight direction includes: determining an initial shooting action that matches the flight direction and the shooting direction of the game character under the flight direction; and determining the shooting action of the game character based on the initial shooting action and the viewing direction of the virtual camera.
8. The method according to claim 7, characterized in that, The step of determining the shooting action of the game character based on the initial shooting action and the viewing angle of the virtual camera includes: determining the muzzle orientation of the virtual shooting prop based on the viewing angle of the virtual camera; adjusting the position of the game character's arm in the initial shooting action based on the muzzle orientation of the virtual shooting prop, and determining the adjusted arm position information; and determining the shooting action of the game character based on the muzzle orientation of the virtual shooting prop and the adjusted arm position information.
9. The method according to claim 8, characterized in that, The step of adjusting the position of the game character's arm in the initial shooting action according to the muzzle orientation of the virtual shooting prop, and determining the adjusted arm position information, includes: performing inverse dynamics calculation based on the muzzle orientation of the virtual shooting prop, controlling the position of the game character's arm to align with the muzzle orientation, and obtaining the adjusted arm position information.
10. The method according to claim 6, characterized in that, Before determining the flight action matching the flight direction based on the game character's flight direction, the process includes: pre-creating multiple flight actions; and establishing a mapping relationship between each flight direction of the game character and at least one flight action.
11. The method according to claim 7, characterized in that, Before determining the initial shooting action matching the flight direction and the shooting direction of the game character based on the flight direction of the game character, the method further includes: pre-creating multiple shooting actions; and establishing a mapping relationship between each shooting direction of the game character under each flight direction and at least one shooting action.
12. A game character shooting control device, characterized in that, include: Determine the module and control module; The determining module is configured to respond to a trigger command for a flying item used by a game character, and determine the flight direction of the game character based on the positional relationship between the game character and a target point, wherein the target point is the location of the end of the flying item used by the game character; the game character flies or glides from the starting point to the target point using the flying item; the flight direction of the game character is determined based on first flight information and second flight information of the game character; the first flight information is used to control the game character to fly towards the target point using the flying item. The second flight information is used to control the game character to deviate from its trajectory while flying towards the target point; The method for determining the second flight information includes: responding to an input centrifugal acceleration control command, acquiring the velocity direction and magnitude of the centrifugal acceleration; the velocity direction of the centrifugal acceleration is perpendicular to the line connecting the game character and the target point; determining the second flight information of the game character based on the velocity direction and magnitude of the centrifugal acceleration; the determining module is used to determine the flight action performed by the game character using the flight prop based on the flight direction of the game character; the determining module is used to determine the shooting action of the game character based on the flight direction of the game character and the shooting orientation of the game character under the flight direction; The control module is used to control the game character to perform the flight action and the shooting action.
13. An electronic device, characterized in that, include: The device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the game character shooting control method as described in any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, performs the game character shooting control method as described in any one of claims 1 to 11.
Citation Information
Patent Citations
Game control method and device, electronic equipment and storage medium
CN118634489A