Passing control method, device, equipment and storage medium
By judging passing conditions and determining virtual bounce walls in ball games, the problem of unrealistic passing in closed stadiums was solved, improving the user experience.
Patent Information
- Application Number
- CN202111293441.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2041-11-03
AI Technical Summary
In ball games, the lack of wall-bounce handling when passing the ball in a closed court results in an unrealistic ball trajectory and a poor user experience.
By judging the passing distance corresponding to the passing command and the position of the controlled virtual object, it is determined whether the conditions for a bounce pass are met. If they are met, a virtual bounce wall is determined from the game scene, and a passing point is determined based on the wall. The virtual object is then controlled to bounce the ball to the receiving object.
It enhances the realism of the passing process and user engagement, thus improving the user experience.
Smart Images

Figure CN116059641B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a pass control method and device, equipment and storage medium. BACKGROUND
[0002] With the rapid development of game technology, more and more users like to play games through mobile phones and computers. Among them, the ball game is very popular among fans because it is not limited by factors such as venue and personnel.
[0003] At present, in the ball game, each user mainly controls a player, but the game lacks processing for some special situations in the process of passing the ball, for example: when colliding with a wall or an obstacle in a closed court, the movement route of the ball is not real enough, resulting in poor user experience in a closed court. SUMMARY
[0004] The purpose of the present application is to provide a pass control method, device, equipment and storage medium to consider the wall bouncing pass in a closed court and improve the user experience in the process of passing the ball.
[0005] To achieve the above purpose, the technical solutions adopted by the embodiments of the present application are as follows:
[0006] In a first aspect, an embodiment of the present application provides a pass control method, comprising:
[0007] In response to a pass instruction for a virtual ball in a game scene, determining a pass distance corresponding to the pass instruction;
[0008] According to the pass distance and the position of a controlled virtual object in the game scene, determining whether a wall bouncing pass condition is met;
[0009] If the wall bouncing pass condition is met, determining a virtual bouncing wall surface in the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object;
[0010] According to the virtual bouncing wall surface, determining a pass point of the controlled virtual object;
[0011] Controlling the controlled virtual object to bounce the virtual ball from the pass point via the virtual bouncing wall surface.
[0012] Optionally, the determination of whether the wall bouncing pass condition is met according to the pass distance corresponding to the pass instruction and the position of the controlled virtual object in the game scene comprises:
[0013] According to the pass distance and the position of the controlled virtual object, determining a target landing point;
[0014] If the target landing point is outside the virtual court in the game scene, it is determined that the bounce pass condition is met;
[0015] If the target landing point is inside the virtual court, it is determined that the bounce pass condition is not met.
[0016] Optionally, the response to the pass instruction of the virtual ball in the game scene, the pass distance corresponding to the pass instruction is determined, including:
[0017] According to the pass instruction, the pass time is determined;
[0018] According to the pass time and the size of the virtual court in the game scene, the pass distance is calculated.
[0019] Optionally, the virtual bounce wall surface is determined from the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object, including:
[0020] A ray is made from the position of the controlled virtual object to the pass direction;
[0021] The virtual wall surface in the game scene that has an intersection with the ray is determined as the virtual bounce wall surface.
[0022] Optionally, the pass point of the controlled virtual object is determined according to the virtual bounce wall surface, including:
[0023] According to the motion state of a plurality of cooperative virtual objects, a receiving virtual object is determined from the plurality of cooperative virtual objects, wherein the cooperative virtual object is another virtual object in the team of the controlled virtual object in the game scene;
[0024] The mirror point of the receiving point of the receiving virtual object relative to the virtual bounce wall surface is determined as the pass point.
[0025] Optionally, the receiving virtual object is determined from the plurality of cooperative virtual objects according to the motion state of the plurality of cooperative virtual objects, including:
[0026] According to the motion state of the plurality of cooperative virtual objects, the receiving point of each cooperative virtual object is determined;
[0027] According to the distance between the receiving point of each cooperative virtual object and the target landing point, the receiving virtual object is determined from the plurality of cooperative virtual objects.
[0028] Optionally, the receiving point of each cooperative virtual object is determined according to the motion state of the plurality of cooperative virtual objects, including:
[0029] calculating a distance between each of the cooperative virtual objects and the controlled virtual object;
[0030] determining a catching point of each of the cooperative virtual objects according to the distance between each of the cooperative virtual objects and the controlled virtual object, a motion state of each of the cooperative virtual objects, and a position of each of the cooperative virtual objects.
[0031] Optionally, before the determining the catching virtual object from the plurality of cooperative virtual objects according to the distance between the catching point of each of the cooperative virtual objects and the target landing point, the method further comprises:
[0032] judging whether the catching point of each of the cooperative virtual objects is outside the virtual court;
[0033] if the catching point of a target virtual object of the plurality of cooperative virtual objects is outside the virtual court, adjusting the catching point of the target virtual object according to a position of the target virtual object.
[0034] Optionally, the adjusting the catching point of the target virtual object according to the position of the target virtual object comprises:
[0035] if the catching point of the target virtual object passes through a preset position in the game scene, a line segment between the catching point of the target virtual object and the target virtual object intersects with the preset position at a first intersection point;
[0036] adjusting the catching point of the target virtual object to a midpoint of a line segment between the first intersection point and the target virtual object.
[0037] Optionally, if the catching point of the target virtual object does not pass through the preset position in the game scene, the method further comprises:
[0038] extending the line segment between the catching point of the target virtual object and the target virtual object to obtain an extended line;
[0039] obtaining a second intersection point of the extended line and the preset position in the game scene;
[0040] if a distance between the target virtual object and the catching point of the target virtual object is greater than a distance between the catching point of the target virtual object and the second intersection point, adjusting the catching point of the target virtual object to a midpoint of a line segment between the target virtual object and the second intersection point.
[0041] Optionally, the virtual ball is a virtual football, and the preset position in the game scene is a virtual goal in the game scene.
[0042] Optionally, before the controlling the controlled virtual object to bounce the virtual ball from the pass point via the virtual bounce wall, the method further comprises:
[0043] casting a ray from the controlled virtual object to the pass point, the ray intersecting the virtual bounce wall at a target intersection point;
[0044] adjusting the pass point according to a distance between the target intersection point and the controlled virtual object, a distance between the target intersection point and the pass point, and a position of the controlled virtual object.
[0045] Optionally, before the controlling the controlled virtual object to bounce the virtual ball from the pass point via the virtual bounce wall, the method further comprises:
[0046] obtaining a random deflection angle according to an attribute parameter of the controlled virtual object and a preset deflection factor;
[0047] adjusting the pass point according to the random deflection angle and a direction of the controlled virtual object to the pass point.
[0048] Optionally, the responding to the pass instruction for the virtual ball in the game scene comprises any one of the following operations:
[0049] a touch operation acting on a pass control in the game scene, a movement operation acting on a joystick device, or an input operation acting on an input device.
[0050] Optionally, the determining the pass time according to the pass instruction comprises:
[0051] determining a pressing time corresponding to the pass instruction as the pass time.
[0052] In a second aspect, another embodiment of the present application provides a pass control device, comprising:
[0053] a determining module configured to, in response to a pass instruction for a virtual ball in a game scene, determine a pass distance corresponding to the pass instruction;
[0054] a judging module configured to judge whether a bounce-wall pass condition is met according to the pass distance and a position of a controlled virtual object in the game scene;
[0055] If the bounce-wall pass condition is met, the determining module is further configured to, according to a pass direction corresponding to the pass instruction and the position of the controlled virtual object, determine a virtual bounce wall from the game scene, and determine a pass point of the controlled virtual object according to the virtual bounce wall.
[0056] a control module, configured to control the controlled virtual object to bounce the virtual ball from the pass point via the virtual bounce wall.
[0057] Optionally, a judging module, specifically configured to:
[0058] determine a target landing point of the virtual ball according to the pass distance and a position of the controlled virtual object;
[0059] if the target landing point is outside a virtual court in the game scene, determine that the bounce-wall pass condition is met;
[0060] if the target landing point is inside the virtual court, determine that the bounce-wall pass condition is not met.
[0061] Optionally, a determining module, specifically configured to:
[0062] determine a pass time according to the pass instruction;
[0063] calculate the pass distance according to the pass time and a size of the virtual court in the game scene.
[0064] Optionally, a determining module, specifically configured to:
[0065] cast a ray from a position of the controlled virtual object to the pass direction;
[0066] determine a virtual wall existing an intersection with the ray in the game scene as the virtual bounce wall.
[0067] Optionally, a determining module, specifically configured to:
[0068] determine a receiving virtual object from a plurality of cooperative virtual objects according to motion states of the plurality of cooperative virtual objects, wherein the cooperative virtual object is another virtual object in a team to which the controlled virtual object belongs in the game scene;
[0069] determine that a mirror point of a receiving point of the receiving virtual object relative to the virtual bounce wall is the pass point.
[0070] Optionally, a determining module, specifically configured to:
[0071] determine a receiving point of each cooperative virtual object according to the motion states of the plurality of cooperative virtual objects;
[0072] determine the receiving virtual object from the plurality of cooperative virtual objects according to distances between the receiving point of each cooperative virtual object and the target landing point.
[0073] Optionally, a determining module, specifically configured to:
[0074] calculating a distance between each of the cooperative virtual objects and the controlled virtual object;
[0075] determining a ball contact point of each of the cooperative virtual objects according to the distance between each of the cooperative virtual objects and the controlled virtual object, a motion state of each of the cooperative virtual objects, and a position of each of the cooperative virtual objects.
[0076] Optionally, the judging module is further configured to:
[0077] determine whether the ball contact points of the cooperative virtual objects are outside the virtual court;
[0078] The method further includes an adjusting module configured to:
[0079] If the ball contact point of a target virtual object in the cooperative virtual objects is outside the virtual court, the adjusting module is further configured to adjust the ball contact point of the target virtual object according to a position of the target virtual object.
[0080] Optionally, the adjusting module is specifically configured to:
[0081] If the ball contact point of the target virtual object passes through a preset position in the game scene, a line segment between the ball contact point of the target virtual object and the target virtual object intersects with the preset position at a first intersection point;
[0082] adjust the ball contact point of the target virtual object to a midpoint of a line segment between the first intersection point and the target virtual object.
[0083] Optionally, if the ball contact point of the target virtual object does not pass through the preset position in the game scene, the adjusting module is further configured to:
[0084] extend the line segment between the ball contact point of the target virtual object and the target virtual object to obtain an extended line;
[0085] obtain a second intersection point of the extended line and the preset position in the game scene;
[0086] If a distance between the target virtual object and the ball contact point of the target virtual object is greater than a distance between the ball contact point of the target virtual object and the second intersection point, adjust the ball contact point of the target virtual object to a midpoint of a line segment between the target virtual object and the second intersection point.
[0087] Optionally, the virtual ball is a virtual football, and the preset position in the game scene is a virtual goal in the game scene.
[0088] Optionally, the adjusting module is further configured to:
[0089] a ray from the controlled virtual object to the pass point, the ray intersecting the virtual bounce wall at a target intersection point;
[0090] adjusting the pass point according to a distance between the target intersection point and the controlled virtual object, a distance between the target intersection point and the pass point, and a position of the controlled virtual object.
[0091] Optionally, the adjusting module is further configured to:
[0092] obtaining a random deflection angle according to an attribute parameter of the controlled virtual object and a preset deflection factor;
[0093] adjusting the pass point according to the random deflection angle and a direction of the controlled virtual object to the pass point.
[0094] Optionally, the response to the pass instruction of the virtual ball in the game scene is any one of the following operations:
[0095] a touch operation acting on a pass control in the game scene, a movement operation acting on a joystick device, or an input operation acting on an input device.
[0096] Optionally, the determining module is specifically configured to:
[0097] determine the pressing time corresponding to the pass instruction as the pass time.
[0098] In a third aspect, another embodiment of the present application provides a pass control device, a processor, a memory, and a bus, the memory stores machine readable instructions executable by the processor, when the pass control device is running, the processor and the memory communicate through the bus, and the processor executes the machine readable instructions to execute the method of the first aspect.
[0099] In a fourth aspect, another embodiment of the present application provides a computer readable storage medium, the computer readable storage medium stores a computer program, and the computer program is executed by a processor to execute the method of the first aspect.
[0100] The present application has the following beneficial effects:
[0101] The ball passing control method, device, equipment and storage medium provided by the embodiments of the present application, wherein the method comprises: in response to a ball passing instruction for a virtual ball in a game scene, determining a ball passing distance corresponding to the ball passing instruction, judging whether a wall bouncing ball passing condition is met according to the ball passing distance and the position of a controlled virtual object in the game scene, if the wall bouncing ball passing condition is met, determining a virtual bouncing wall surface from the game scene according to the ball passing direction corresponding to the ball passing instruction and the position of the controlled virtual object, determining a ball passing point of the controlled virtual object according to the virtual bouncing wall surface, and controlling the controlled virtual object to bounce the virtual ball from the ball passing point via the virtual bouncing wall surface. The present application takes into account the wall bouncing ball passing condition in a closed ball court, enhances the authenticity and participation of the user in ball passing, and improves the user experience. BRIEF DESCRIPTION OF DRAWINGS
[0102] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. Other related drawings can also be obtained by those skilled in the art without creative labor.
[0103] Figure 1 The flowchart of the ball passing control method provided by the embodiments of the present application is shown Figure One ;
[0104] Figure 2 The flowchart of the ball passing control method provided by the embodiments of the present application is shown Figure Two ;
[0105] Figure 3 The flowchart of the ball passing control method provided by the embodiments of the present application is shown Figure Three ;
[0106] Figure 4 The flowchart of the ball passing control method provided by the embodiments of the present application is shown Figure Four ;
[0107] Figure 5 The flowchart of the ball passing control method provided by the embodiments of the present application is shown Figure Five ;
[0108] Figure 6 The schematic diagram of the ball receiving point passing through the virtual goal is shown
[0109] Figure 7 The schematic diagram of the ball receiving point not passing through the virtual goal is shown
[0110] Figure 8 The flowchart of the ball passing control method provided by the embodiments of the present application is shownFigure Six ;
[0111] Figure 9 Fig. 1 shows a flowchart of a pass control method provided by an embodiment of the present application. Figure Seven ;
[0112] Figure 10 Fig. 2 shows a structural diagram of a pass control device provided by an embodiment of the present application.
[0113] Figure 11 Fig. 3 shows a structural diagram of a pass control device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0114] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. It should be understood that the drawings in the present application are only used for the purpose of description and illustration, and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowchart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowchart or one or more operations can be removed from the flowchart under the guidance of the content of the present application.
[0115] In addition, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0116] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0117] In view of the problem that some special situations are not handled in the pass process of the ball game, the present application provides a pass control method to consider the wall bounce pass situation in a closed court, thereby enhancing the authenticity and participation of the user pass, and improving the user experience.
[0118] The pass control method provided by the present application will be described in detail below in combination with several specific embodiments.
[0119] Figure 1 Fig. 1 shows a flowchart of a pass control method provided by an embodiment of the application Figure One The execution subject of the embodiment can be a pass control device, for example, a mobile phone, a game console, a computer, or other devices with data processing capability.
[0120] As shown in Figure 1 The method can include the following steps.
[0121] S101, in response to a pass instruction for a virtual ball in a game scene, determining a pass distance corresponding to the pass instruction.
[0122] The game scene can be a game scene of any ball game. After downloading a ball game on the pass control device, opening and logging in, the game scene can be displayed on the graphical user interface. The ball game includes but is not limited to soccer game, basketball game, volleyball game, ice hockey game, and hockey game.
[0123] The pass instruction for the virtual ball in the game scene can be any one of the following operations: touch operation on the pass control in the game scene, movement operation on the joystick device, and input operation on the input device.
[0124] The game scene can provide a pass control. The user can pass the ball by touching the pass control. The touch operation can be a pressing operation. Alternatively, the pass control device can be connected to the joystick device through wired or wireless connection. The user can move the joystick device to pass the ball. Alternatively, the pass control device can be connected to the input device through wired or wireless connection. The input device can be a keyboard. The input operation can be a pass operation, for example, passing the ball through the shortcut keys on the keyboard.
[0125] The user inputs the pass instruction for the virtual ball in the game scene. The pass control device responds to the pass instruction and determines the pass distance corresponding to the pass instruction. It should be noted that the pass instruction is associated with the pass distance. The longer the pass time corresponding to the pass instruction, the farther the pass distance. The shorter the pass time corresponding to the pass instruction, the closer the pass distance. The pass time corresponding to the pass instruction can be the pressing time corresponding to the pass instruction. Taking the touch operation on the pass control in the game scene as an example, the pass time is the time of pressing the pass control.
[0126] S102, according to the pass distance and the position of the controlled virtual object in the game scene, determining whether the wall bounce pass condition is met.
[0127] The controlled virtual object in the game scene can be a controlled player in the game scene, and the wall bounce pass can be a virtual ball bouncing off a wall and then being passed, that is, after the controlled virtual object controlled by the user passes the virtual ball, the virtual ball bounces off the wall.
[0128] In some embodiments, according to the pass distance corresponding to the pass instruction and the position of the controlled virtual object in the game scene, the landing point of the virtual ball can be determined. Since the virtual court is a closed court, if the determined landing point is outside the virtual court, it means that the wall bounce pass condition is met, that is, the wall bounce pass needs to be performed. If the determined landing point is inside the virtual court, it is determined that the wall bounce pass condition is not met, that is, the wall bounce pass does not need to be performed.
[0129] S103, if the wall bounce pass condition is met, a virtual bounce wall surface is determined from the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object.
[0130] The pass direction corresponding to the pass instruction can be determined according to the position of the coordinated virtual object determined by the user, wherein the coordinated virtual object is another virtual object in the team of the controlled virtual object in the game scene, that is, the receiving player.
[0131] Usually, the controlled virtual object controlled by the user passes the virtual ball to the coordinated virtual object, so when the coordinated virtual object is located at the upper left of the game scene, the pass direction corresponding to the pass instruction is also at the upper left of the game scene.
[0132] Since the virtual court is a closed court, virtual walls are provided around the court, and the top can be open, therefore, if the wall bounce pass condition is met, a virtual bounce wall surface can be determined from the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object.
[0133] In some embodiments, a ray can be drawn from the position of the controlled virtual object to the pass direction, and a virtual wall surface intersecting the ray in the game scene is determined as the virtual bounce wall surface.
[0134] The pass direction can be the orientation or joystick direction of the controlled virtual object, and a ray is drawn from the position of the controlled virtual object to the pass direction, and a virtual wall surface intersecting the ray is determined as the virtual bounce wall surface, that is, the virtual ball passed by the controlled virtual object bounces off the virtual bounce wall surface.
[0135] S104, determining a pass point of the controlled virtual object according to the virtual bounce wall surface.
[0136] S105, controlling the controlled virtual object to bounce the virtual ball off the virtual bounce wall surface from the pass point.
[0137] The pass point is a point where the virtual ball is passed by the controlled virtual object. If the bounce-wall pass condition is not met, the pass point of the controlled virtual object is the receiving point of the collaborative virtual object. The receiving point is a point where the collaborative virtual object is to receive the virtual ball. If the bounce-wall pass condition is met, the pass point of the controlled virtual object is not the receiving point of the collaborative virtual object, and the factor of the virtual bounce wall surface needs to be considered. The pass point of the controlled virtual object is determined according to the virtual bounce wall surface.
[0138] Then, the controlled virtual object is controlled to bounce the virtual ball from the pass point via the virtual bounce wall surface to the receiving point of the collaborative virtual object. It should be noted that the pass point of the controlled virtual object determined according to the virtual bounce wall surface is outside the virtual court, and the receiving point of the collaborative virtual object bounced via the virtual bounce wall surface is inside the virtual court.
[0139] The pass control method of the embodiment includes: in response to a pass instruction for a virtual ball in a game scene, determining a pass distance corresponding to the pass instruction, judging whether a bounce-wall pass condition is met according to the pass distance and a position of a controlled virtual object in the game scene, if the bounce-wall pass condition is met, determining a virtual bounce wall surface from the game scene according to a pass direction corresponding to the pass instruction and the position of the controlled virtual object, determining a pass point of the controlled virtual object according to the virtual bounce wall surface, and controlling the controlled virtual object to bounce the virtual ball from the pass point via the virtual bounce wall surface. In the embodiment, the bounce-wall pass condition in a closed court is considered, the authenticity and participation of the user in passing are enhanced, and the user experience is improved.
[0140] Figure 2 A flowchart of a pass control method provided by an embodiment of the application is shown Figure Two As shown in Figure 2 Step S101, in response to a pass instruction for a virtual ball in a game scene, a pass distance corresponding to the pass instruction is determined, which can include:
[0141] S201, determining a pass time according to the pass instruction.
[0142] In some embodiments, the pressing time corresponding to the pass instruction can be determined as the pass time.
[0143] The pass instruction can be any one of the following operations: a touch operation acting on a pass control in the game scene, a movement operation acting on a joystick device, and an input operation acting on an input device.
[0144] If the pass instruction is a touch operation acting on the pass control, the pass time is the pressing time corresponding to the touch operation. For example, the touch operation is a click operation, and the pass time is the time of pressing the pass control.
[0145] If the pass instruction is a movement operation acting on the rocker device, the pass time is the time of moving the rocker and pressing the rocker.
[0146] If the pass instruction is an input operation acting on the input device, the pass time is the pressing time corresponding to the input operation, for example, the input device is a keyboard, the pass instruction is issued by a shortcut key Shift, and the pressing time of pressing the shortcut key Shift is the pass time.
[0147] S202, according to the pass time and the size of the virtual court in the game scene, the pass distance is calculated.
[0148] Wherein, the pass time and the pass ratio have a certain mapping relationship, after obtaining the pass time, the pass time is converted into the pass ratio according to the mapping relationship, and then the pass distance can be calculated according to the pass ratio and the size of the virtual court, wherein the maximum value of the pass ratio is 1, and the mapping relationship between the pass time and the pass ratio is not particularly limited in the embodiment.
[0149] Exemplarily, the pass distance (virtual_dist) = basis distance (basis_dist) + pass ratio (press_ratio) * pass ratio (press_ratio) * maximum distance affected by pressing (max_dist), that is, the pass distance is equal to the product of the pass ratio, the pass ratio and the maximum distance affected by pressing, and the sum of the basis distance.
[0150] Wherein, the basis distance has a certain mapping relationship according to the virtual court, for example, if the size of the virtual court is 30*20, the corresponding basis distance is 5, and the maximum distance affected by pressing can be selected according to the actual situation, and the embodiment can select 30. The mapping relationship between the virtual court and the basis distance, and the maximum distance affected by pressing are not particularly limited in the embodiment.
[0151] The pass control method of the embodiment determines the pass time according to the pass instruction, and calculates the pass distance according to the pass time and the size of the virtual court in the game scene. By calculating the pass distance according to the input pass instruction, it can be convenient to judge whether the wall bounce pass condition is met according to the pass distance subsequently.
[0152] Figure 3 The flowchart of the pass control method provided by the embodiment of the application is shown Figure Three As shown in Figure 3 Step S102, according to the pass distance corresponding to the pass instruction and the position of the controlled virtual object in the game scene, it is judged whether the wall bounce pass condition is met, including:
[0153] S301, according to the pass distance and the position of the controlled virtual object, the target landing point is determined.
[0154] In some embodiments, the target landing point can be determined according to the target landing point (detect_pos) = the position of the controlled virtual object (player_pos) + the unit vector of the pass direction (joystick_direction) * the pass distance (virtual_dist), wherein the unit vector of the pass direction is the unit vector of the joystick direction if the pass instruction is a movement operation on the joystick device, or the unit vector of the pass direction can be the unit vector of the direction in which the controlled virtual object is facing if the pass instruction is a touch operation on the pass control in the game scene or an input operation on the input device. The target landing point can be expressed in the form of horizontal and vertical coordinates, and the controlled virtual object is located in the virtual court.
[0155] It should be noted that the facing direction of the controlled virtual object can be determined according to the position of the collaborative virtual object determined by the user, that is, when the collaborative virtual object is located at the upper left of the game scene, the controlled virtual object also faces the upper left of the game scene.
[0156] S302, if the target landing point is outside the virtual court in the game scene, it is determined that the bounce wall pass condition is met.
[0157] S303, if the target landing point is in the virtual court, it is determined that the bounce wall pass condition is not met.
[0158] Exemplarily, the size of the virtual court is 30*20, the center of the virtual court is taken as the coordinate origin (0, 0), and the four boundary points of the virtual court are (15, 10), (15, -10), (-15, -10), and (-15, 10). The relative positions of the target landing point and the virtual court are determined, and if the target landing point is outside the virtual court in the game scene, it is determined that the bounce wall pass condition is met, and if the target landing point is in the virtual court, it is determined that the bounce wall pass condition is not met.
[0159] The pass control method of the embodiment determines the target landing point according to the pass distance and the position of the controlled virtual object, and if the target landing point is outside the virtual court in the game scene, it is determined that the bounce wall pass condition is met, and if the target landing point is in the virtual court, it is determined that the bounce wall pass condition is not met. By calculating the target landing point and determining whether the target landing point is outside the virtual scene, it is further determined whether the bounce wall pass condition is met, and the accuracy of the bounce wall pass determination is high.
[0160] Figure 4 A flowchart of the pass control method provided by the embodiment of the application is shown Figure Four As shown in Figure 4 Step S104, the pass point of the controlled virtual object is determined according to the virtual bounce wall surface, which can include:
[0161] S401. Determine, from the plurality of cooperative virtual objects, a receiving virtual object according to motion states of the plurality of cooperative virtual objects.
[0162] The cooperative virtual objects are other virtual objects in a team of the controlled virtual object in the game scene, i.e., teammates of the controlled player, and the number of the cooperative virtual objects can be at least two.
[0163] The motion state of the cooperative virtual object can include a motion speed and a motion direction of the cooperative virtual object. According to the motion state of each cooperative virtual object in the game scene, a position reachable by each cooperative virtual object after a pass time can be determined, and then a cooperative virtual object whose distance to the receiving point of the controlled virtual object satisfies a preset condition can be determined as the receiving virtual object. The preset condition can be that the distance to the receiving point is the shortest.
[0164] In some embodiments, step S401, determining, from the plurality of cooperative virtual objects, a receiving virtual object according to motion states of the plurality of cooperative virtual objects, can include:
[0165] Determining a receiving point of each cooperative virtual object according to the motion state of the plurality of cooperative virtual objects.
[0166] Determining, from the plurality of cooperative virtual objects, a receiving virtual object according to a distance between the receiving point of each cooperative virtual object and the target landing point.
[0167] Determining a receiving point of each cooperative virtual object according to the motion state of each cooperative virtual object, and then calculating a distance between the receiving point of each cooperative virtual object and the target landing point, the cooperative virtual object corresponding to the smallest distance can be determined as the receiving virtual object.
[0168] Optionally, determining a receiving point of each cooperative virtual object according to the motion state of the plurality of cooperative virtual objects can include:
[0169] Calculating a distance between each cooperative virtual object and the controlled virtual object;
[0170] Determining a receiving point of each cooperative virtual object according to the distance between each cooperative virtual object and the controlled virtual object, the motion state of each cooperative virtual object, and a position of each cooperative virtual object.
[0171] Wherein, the position of each cooperative virtual object is the position of each cooperative virtual object when the pass instruction is received, optionally, the pass time can be determined according to t=k*d+b first, wherein, k is a preset configuration parameter, and the recommended value is 0.02, generally the greater the distance, the greater the value, b is the bottom guarantee time, that is, the maximum value of the pass time, and the recommended value is 0.3, d is the distance between each cooperative virtual object and the controlled virtual object when the pass instruction is received, and t is the pass time.
[0172] Then, the receiving point of each cooperative virtual object can be determined according to recv_pos=entity_pos+entity_yaw*v*t, wherein, recv_pos is the position of each cooperative virtual object when the pass instruction is received, entity_pos is the unit vector of the cooperative virtual object when the pass instruction is received, v is the movement speed of the cooperative virtual object when the pass instruction is received, and recv_pos is the position of the receiving point of each cooperative virtual object. Wherein, the movement state includes movement speed and movement direction (towards).
[0173] It should be noted that for a 3v3 ball game, the controlled virtual object has two cooperative virtual objects, so the receiving points of the two cooperative virtual objects need to be determined.
[0174] Then, the distance D between the receiving point of each cooperative virtual object and the target landing point can be calculated, and if D is greater than a preset parameter (effective_max_dist), the cooperative virtual object corresponding to the receiving point is not the receiving virtual object.
[0175] Optionally, the cooperative virtual object corresponding to the smallest D is selected as the receiving virtual object.
[0176] In some cases, if no receiving virtual object is selected, a bottom guarantee receiving virtual object screening process is entered, and the bottom guarantee receiving virtual object screening process is: the cooperative virtual object closest to the controlled virtual object is the receiving virtual object.
[0177] Then, the pass control device can send indication information to the control device corresponding to the receiving virtual object, so that the control device controls the receiving virtual object to receive the ball at the receiving point.
[0178] S402, determining that the mirror point of the receiving point of the receiving virtual object relative to the virtual rebound wall is the pass point.
[0179] After the ball-catching virtual object is determined, the mirror point of the ball-catching point of the ball-catching virtual object relative to the virtual rebound wall surface can be taken as the pass point of the controlled virtual object, that is, the controlled virtual object passes the virtual ball to the pass point, rebounds via the virtual rebound wall surface, and rebounds to the ball-catching point of the ball-catching virtual object, so that the ball-catching virtual object can catch the ball at the ball-catching point.
[0180] The pass control method of the embodiment determines the ball-catching virtual object from the plurality of cooperative virtual objects according to the motion states of the plurality of cooperative virtual objects, and determines the mirror point of the ball-catching point of the ball-catching virtual object relative to the virtual rebound wall surface as the pass point. In the embodiment, the rebound wall surface is taken as a consideration factor to determine the pass point of the controlled virtual object, so that the pass point has high accuracy and the ball-catching success rate is improved.
[0181] In some embodiments, if the ball-catching point of the cooperative virtual object is within the virtual court, no adjustment is needed, and if the ball-catching point of the cooperative virtual object is outside the virtual court, the ball-catching point can be adjusted. The adjustment of the ball-catching point of the cooperative virtual object will be described in detail below with reference to the embodiments. Figure 5
[0182] Figure Five The pass control method provided by the embodiments of the present application is shown in the flowchart Figure 5 As shown in Figure 6 Before the ball-catching virtual object is determined from the plurality of cooperative virtual objects according to the distances between the ball-catching points of the cooperative virtual objects and the target landing points, the method can include:
[0183] S501, determining whether the ball-catching points of the plurality of cooperative virtual objects are outside the virtual court.
[0184] S502, if the ball-catching point of the target virtual object in the plurality of cooperative virtual objects is outside the virtual court, adjusting the ball-catching point of the target virtual object according to the position of the target virtual object.
[0185] Generally, when the cooperative virtual object runs towards the virtual rebound wall surface, the ball-catching point of the cooperative virtual object can be outside the virtual court, so the ball-catching point of the cooperative virtual object needs to be pulled back into the virtual court. Therefore, it is necessary to determine whether the ball-catching points of the plurality of cooperative virtual objects are outside the virtual court, and if the ball-catching point of the target virtual object in the plurality of cooperative virtual objects is outside the virtual court, the ball-catching point of the target virtual object can be adjusted according to the position of the target virtual object to pull the ball-catching point of the target virtual object back into the virtual court.
[0186] In some embodiments, the adjustment of the ball-catching point of the target virtual object includes the following two cases:
[0187] The first kind, if the ball receiving point of the target virtual object passes through the preset position in the game scene, a line segment between the ball receiving point of the target virtual object and the target virtual object is made, the line segment intersects with the preset position at a first intersection point.
[0188] In some embodiments, the virtual ball is a virtual football, and the preset position in the game scene is a virtual goal in the virtual scene, that is, if the ball receiving point of the target virtual object passes through the virtual goal in the virtual scene, the first intersection point of the line segment between the ball receiving point of the target virtual object and the target virtual object and the preset position is obtained, and the ball receiving point of the target virtual object is adjusted to the midpoint of the line segment between the first intersection point and the target virtual object.
[0189] Referring to Figure Six , Figure 6 A schematic diagram of the ball receiving point passing through the virtual goal is shown, if the ball receiving point of the target virtual object passes through the virtual goal in the game scene, a line segment between the ball receiving point of the target virtual object and the target virtual object is made, the line segment intersects with the virtual goal at a first intersection point (point P in Figure 6 ), and the ball receiving point of the target virtual object (point B in Figure 6 ) is adjusted to the midpoint of the line segment between the first intersection point and the target virtual object (point M in Figure 6 ). Wherein, the preset position can be the goal of the opposite team.
[0190] The second kind, if the ball receiving point of the target virtual object does not pass through the preset position in the game scene, the line segment between the ball receiving point of the target virtual object and the target virtual object is extended to obtain an extended line;
[0191] A second intersection point of the extended line and the preset position in the game scene is obtained;
[0192] If the distance between the target virtual object and the ball receiving point is greater than the distance between the ball receiving point of the target virtual object and the second intersection point, the ball receiving point of the target virtual object is adjusted to the midpoint of the line segment between the target virtual object and the second intersection point.
[0193] In some embodiments, the virtual ball is a virtual football, and the preset position in the game scene is a virtual goal in the virtual scene, that is, if the ball receiving point of the target virtual object does not pass through the virtual goal in the virtual scene, the line segment between the ball receiving point of the target virtual object and the target virtual object is extended, the second intersection point of the extended line and the preset position in the game scene is obtained, and the distance between the target virtual object and the ball receiving point is obtained. If the distance between the target virtual object and the ball receiving point is greater than the distance between the ball receiving point of the target virtual object and the second intersection point, the ball receiving point of the target virtual object is adjusted to the midpoint of the line segment between the target virtual object and the second intersection point.
[0194] Referring to Figure 7 , Figure Seven Fig. 6 shows a schematic diagram of a ball receiving point not passing through a virtual goal according to an embodiment of the present application. If the ball receiving point of the target virtual object does not pass through the virtual goal in the game scene, a line segment between the ball receiving point and the target virtual object is extended to obtain an extended line, and a second intersection point (point Q in Fig. 6) of the extended line and the virtual goal in the game scene is obtained. The distance between the target virtual object and the ball receiving point is d1, and the distance between the ball receiving point and the second intersection point is s. If d1 > s, the ball receiving point (point A in Fig. 6) is adjusted to the midpoint (point N in Fig. 6) of the line segment between the target virtual object and the second intersection point. Figure 7 Figure 7 Figure 8
[0195] If d1 ≤ s, the existing ball receiving point is maintained, that is, the ball receiving point does not need to be adjusted.
[0196] The pass control method of the embodiment judges whether the ball receiving points of the plurality of collaborative virtual objects are outside the virtual soccer field. If the ball receiving point of the target virtual object in the plurality of collaborative virtual objects is outside the virtual soccer field, the ball receiving point of the target virtual object is adjusted according to the position of the target virtual object. When the ball receiving points of the collaborative virtual objects are outside the virtual soccer field, the ball receiving points of the collaborative virtual objects are adjusted to avoid the ball receiving points being outside the virtual soccer field, so that the collaborative virtual objects cannot receive the virtual ball, and the success rate of receiving the ball is improved.
[0197] In some embodiments, if the pass point of the controlled virtual object is in the virtual soccer field, no adjustment is needed. If the pass point of the controlled virtual object is outside the virtual soccer field, the pass point needs to be adjusted inversely, because the speed of the ball is attenuated when the ball rebounds off the wall, so that the virtual ball cannot reach the ball receiving point of the collaborative virtual object. The following will be described in detail with reference to the embodiments. Figure Eight
[0198] Fig. 6 shows a schematic diagram of a pass control method according to an embodiment of the present application. Figure Six Figure 8 As shown in Fig. 6, in step S105, before the controlled virtual object rebounds the virtual ball off the virtual rebound wall, the method further includes: Figure 9
[0199] S601, a ray is made from the controlled virtual object to the pass point.
[0200] S602, the pass point is adjusted according to the distance between the target intersection point and the controlled virtual object, the distance between the target intersection point and the pass point, and the position of the controlled virtual object.
[0201] A ray is made from the controlled virtual object to the pass point, the ray intersects the virtual bounce wall surface at a target intersection point, then a distance between the target intersection point and the controlled virtual object is calculated, a distance between the target intersection point and the pass point is calculated, and the position of the pass point is determined according to the distance between the target intersection point and the controlled virtual object, the distance between the target intersection point and the pass point, and the position of the controlled virtual object, so as to adjust the pass point, so that the virtual object can reach the receiving point after bouncing on the virtual bounce wall and receiving the virtual ball.
[0202] In some embodiments, the pass point correction ratio can be determined according to the distance between the target intersection point and the controlled virtual object, and the distance between the target intersection point and the pass point, and the pass point is adjusted according to the pass point correction ratio and the position of the controlled virtual object.
[0203] For example, the pass point correction ratio ratio is determined according to ratio = (d1 + d2 * Fix(2)) / (d1 + d2), where d1 is the distance between the target intersection point and the controlled virtual object, d2 is the distance between the target intersection point and the pass point, and Fix(2) is a Gaussian distribution function, and then the position pass_pos of the new pass point is determined according to pass_pos = op_pos + pass_dir * pass_dis * ratio, where op_pos is the position of the controlled virtual object, pass_dir is the unit ray from the controlled virtual object to the pass point, and pass_dis is the distance between the controlled virtual object and the pass point.
[0204] The pass control method of the embodiment makes a ray from the controlled virtual object to the pass point, and adjusts the pass point according to the distance between the target intersection point and the controlled virtual object, the distance between the target intersection point and the pass point, and the position of the controlled virtual object. The pass point is more accurate, and the success rate of receiving the ball is improved.
[0205] In some embodiments, a random deflection angle can also be added to avoid own goals. The embodiments will be described in detail below. Figure Nine
[0206] Figure Seven The flowchart of the pass control method provided by the embodiments of the application is shown Figure 9 As shown in Figure 8 Step S105, before the controlled virtual object bounces the virtual ball from the pass point via the virtual bounce wall surface, the method further includes:
[0207] S701, a random deflection angle is obtained according to the attribute parameters of the controlled virtual object and a preset deflection factor.
[0208] S702, adjust the pass point according to the random deflection angle, and the direction of the controlled virtual object to the pass point.
[0209] The attribute parameter of the controlled virtual object can include a virtual controlled pass ability value, the preset deflection factor is a preset configuration parameter, and the recommended value is -10.
[0210] In some embodiments, a target deflection offset_angle can be calculated first according to offset_angle=factor*(pass ability / 100)*(pass ability / 100)+datum, where factor is a preset deflection factor, datum is a preset basic deflection, and the recommended value is 15, and then a random deflection angle offset_res can be calculated according to offset_res=random*offset_angle / Fix(3.7), where random is a normally distributed random number with a value range of [-pi, pi], and Fix is an integer function.
[0211] Then, the pass point is rotated according to the random deflection angle in the direction of the controlled virtual object to the pass point, so as to adjust the pass point.
[0212] In some embodiments, before the controlled virtual object bounces the virtual ball from the pass point via the virtual bounce wall, the pass point can be adjusted first according to Figure 10 The embodiment adjusts the pass point, and then rotates the adjusted pass point at a random angle, and the adjusted pass point is used as the final pass point.
[0213] The pass control method of the embodiment adjusts the pass point according to the random deflection angle and the direction of the controlled virtual object to the pass point. By increasing the random deflection, the own goal can be avoided. Thus, when the pass direction passes through the own goal, the direction can be deflected to the goal post close to the pass direction, and when the pass direction passes through the opponent's goal, the direction can be deflected to the goal post close to the pass direction, so that the authenticity of the pass target and the pass target point is enhanced.
[0214] Figure Ten A structure diagram of a pass control device provided by an embodiment of the application is shown. The pass control device can be integrated in the pass control equipment. As shown in Figure 11 The pass control device 80 includes:
[0215] A determination module 801 is configured to determine a pass distance corresponding to a pass instruction for a virtual ball in a game scene in response to the pass instruction.
[0216] determining module 801 is further configured to determine a virtual bounce wall surface from the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object, and determine a pass point of the controlled virtual object according to the virtual bounce wall surface.
[0217] If the bounce wall pass condition is met, the determining module 801 is further configured to determine a virtual bounce wall surface from the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object, and determine a pass point of the controlled virtual object according to the virtual bounce wall surface.
[0218] The control module 803 is configured to control the controlled virtual object to bounce the virtual ball from the pass point via the virtual bounce wall surface.
[0219] Optionally, the determining module 802 is specifically configured to:
[0220] determine a target drop point according to the pass distance and the position of the controlled virtual object;
[0221] If the target drop point is outside a virtual court in the game scene, it is determined that the bounce wall pass condition is met.
[0222] If the target drop point is inside the virtual court, it is determined that the bounce wall pass condition is not met.
[0223] Optionally, the determining module 801 is specifically configured to:
[0224] determine a pass time according to the pass instruction;
[0225] calculate the pass distance according to the pass time and a size of a virtual court in the game scene.
[0226] Optionally, the determining module 801 is specifically configured to:
[0227] cast a ray from the position of the controlled virtual object to the pass direction;
[0228] determine a virtual wall surface in the game scene that has an intersection with the ray as the virtual bounce wall surface.
[0229] Optionally, the determining module 801 is specifically configured to:
[0230] determine a receiving virtual object from a plurality of cooperative virtual objects according to motion states of the plurality of cooperative virtual objects, wherein the cooperative virtual object is another virtual object in a team to which the controlled virtual object belongs in the game scene;
[0231] determine a mirror point of a receiving point of the receiving virtual object relative to the virtual bounce wall surface as the pass point.
[0232] Optionally, the determining module 801 is specifically configured to:
[0233] determine the ball receiving point of each of the plurality of cooperative virtual objects according to the motion state of the plurality of cooperative virtual objects;
[0234] determine the ball receiving virtual object from the plurality of cooperative virtual objects according to the distance between the ball receiving point of each of the plurality of cooperative virtual objects and the target ball landing point.
[0235] Optionally, the determining module 801 is specifically configured to:
[0236] calculate the distance between each of the plurality of cooperative virtual objects and the controlled virtual object;
[0237] determine the ball receiving point of each of the plurality of cooperative virtual objects according to the distance between each of the plurality of cooperative virtual objects and the controlled virtual object, the motion state of each of the plurality of cooperative virtual objects, and the position of each of the plurality of cooperative virtual objects.
[0238] Optionally, the judging module 801 is further configured to:
[0239] judge whether the ball receiving point of the plurality of cooperative virtual objects is outside the virtual court;
[0240] Further comprising an adjusting module 804:
[0241] If the ball receiving point of a target virtual object in the plurality of cooperative virtual objects is outside the virtual court, the adjusting module is further configured to adjust the ball receiving point of the target virtual object according to the position of the target virtual object.
[0242] Optionally, the adjusting module 804 is specifically configured to:
[0243] If the ball receiving point of the target virtual object passes through the preset position in the game scene, a line segment between the ball receiving point of the target virtual object and the target virtual object, the line segment intersects with the preset position at a first intersection point;
[0244] adjust the ball receiving point of the target virtual object to the midpoint of the line segment between the first intersection point and the target virtual object.
[0245] Optionally, if the ball receiving point of the target virtual object does not pass through the preset position in the game scene, the adjusting module 804 is further configured to:
[0246] extend the line segment between the ball receiving point of the target virtual object and the target virtual object to obtain an extended line;
[0247] obtain the intersection point of the extended line and the preset position in the game scene;
[0248] If a distance between the target virtual object and the catching point is greater than a distance between the catching point and the second intersection point, the catching point of the target virtual object is adjusted to a midpoint of a line segment between the target virtual object and the second intersection point.
[0249] Optionally, the virtual ball is a virtual football, and the preset position in the game scene is a virtual goal in the game scene.
[0250] Optionally, the adjusting module 804 is further configured to:
[0251] a ray acting on the controlled virtual object to the passing point, the ray intersecting the virtual rebound wall surface at a target intersection point;
[0252] adjust the passing point according to a distance between the target intersection point and the controlled virtual object, a distance between the target intersection point and the passing point, and a position of the controlled virtual object.
[0253] Optionally, the adjusting module 804 is further configured to:
[0254] obtain a random deflection angle according to the attribute parameter of the controlled virtual object and a preset deflection factor;
[0255] adjust the passing point according to the random deflection angle and a direction of the controlled virtual object to the passing point.
[0256] Optionally, the response to the passing instruction of the virtual ball in the game scene is any one of the following operations:
[0257] a touch operation acting on a passing control in the game scene, a movement operation acting on a joystick device, or an input operation acting on an input device.
[0258] Optionally, the determining module 801 is specifically configured to:
[0259] determine that the pressing time corresponding to the passing instruction is the passing time.
[0260] The passing control device of the embodiment can implement the process and principle as described above with reference to the method embodiment, and thus repeated description is omitted here.
[0261] Figure Eleven A structure schematic diagram of a passing control device provided by an embodiment of the application is shown in FIG. 1. As shown, the pass control device 90 includes a processor 901, a memory 902, and a bus 903. The memory 902 stores machine readable instructions executable by the processor 901. When the pass control device 90 is running, the processor 901 communicates with the memory 902 through the bus 903. The processor 901 executes the machine readable instructions to perform the above method embodiments.
[0262] The embodiments of the present application further provide a computer readable storage medium, which stores a computer program. The computer program is run by a processor to perform the above method embodiments.
[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of the description, the specific working process of the above-described system and device can refer to the corresponding process in the method embodiments, which will not be described herein. In the several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The above-described device embodiments are only schematic, for example, the division of the modules is only a logical function division, and there can be another division manner in actual implementation, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed modules can be indirect coupling or communication connection through some communication interfaces, and can be electrical, mechanical or other forms.
[0264] In addition, each functional unit in the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. If the function is realized in the form of software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that makes contributions to the prior art or the part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the embodiments of the methods of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.
[0265] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which should be covered in the protection scope of the present application.
Claims
1. A pass control method, characterized in that: include: In response to a pass instruction for a virtual sphere in a game scene, determining a pass distance corresponding to the pass instruction; determining a target ball landing point according to the passing distance and the position of the controlled virtual object; If the target ball landing point is outside the virtual court in the game scene, it is determined that the wall pass condition is met; If the target ball landing point is within the virtual court, it is determined that the wall pass condition is not satisfied; If the wall-bounce pass condition is met, determining a virtual rebound wall from the game scene according to the pass direction corresponding to the pass instruction and the position of the controlled virtual object; Determining a ball-catching virtual object from among the multiple collaborative virtual objects according to motion states of the multiple collaborative virtual objects, wherein the collaborative virtual objects are other virtual objects in the team where the controlled virtual object is located in the game scene; determining a mirror image point of the receiving point of the virtual receiving object relative to the virtual rebound wall as a passing point of the controlled virtual object, so that the controlled virtual object passes the virtual sphere to the passing point, and the sphere bounces off the virtual rebound wall to the receiving point of the virtual receiving object; The controlled virtual object is controlled to bounce the virtual sphere from the passing point via the virtual rebound wall.
2. The method according to claim 1, characterized in that The responding to a pass instruction of a virtual sphere in a game scene and determining a pass distance corresponding to the pass instruction includes: determining a passing time according to the passing instruction; The passing distance is calculated according to the passing time and the size of the virtual court in the game scene.
3. The method according to claim 1, characterized in that The step of determining a virtual rebound wall from the game scene according to the passing direction corresponding to the passing instruction and the position of the controlled virtual object includes: Draw a ray from the position of the controlled virtual object to the passing direction; A virtual wall in the game scene that intersects the ray is determined as the virtual rebound wall.
4. The method according to claim 1, wherein The step of determining the ball-catching virtual object from the plurality of cooperating virtual objects according to the motion states of the plurality of cooperating virtual objects comprises: determining a ball receiving point for each collaborative virtual object according to the motion states of the plurality of collaborative virtual objects; The ball-catching virtual object is determined from the plurality of cooperative virtual objects according to the distance between the ball-catching point of each cooperative virtual object and the target ball-landing point.
5. The method according to claim 4, characterized in that The step of determining a ball receiving point of each collaborative virtual object according to the motion states of the plurality of collaborative virtual objects includes: calculating the distance between each collaborative virtual object and the controlled virtual object; The ball receiving point of each cooperative virtual object is determined according to the distance between each cooperative virtual object and the controlled virtual object, the motion state of each cooperative virtual object, and the position of each cooperative virtual object.
6. The method according to claim 4, characterized in that Before determining the ball-catching virtual object from the plurality of collaborative virtual objects based on the distance between the ball-catching point of each collaborative virtual object and the target ball landing point, the method further includes: determining whether the ball receiving points of the plurality of cooperative virtual objects are outside the virtual court; If the ball receiving point of a target virtual object among the multiple cooperative virtual objects is outside the virtual court, the ball receiving point of the target virtual object is adjusted according to the position of the target virtual object.
7. The method according to claim 6, characterized in that The step of adjusting the ball contact point of the target virtual object according to the position of the target virtual object includes: If the ball receiving point of the target virtual object passes through a preset position in the game scene, a line segment is drawn between the ball receiving point of the target virtual object and the target virtual object, wherein the line segment intersects the preset position at a first intersection point; The ball contact point of the target virtual object is adjusted to the midpoint of the line segment between the first intersection point and the target virtual object.
8. The method according to claim 7, characterized in that If the ball receiving point of the target virtual object does not pass through the preset position in the game scene, the method further includes: Extending a line segment between a ball receiving point of the target virtual object and the target virtual object to obtain an extension line; Obtaining a second intersection point of the extension line and a preset position in the game scene; If the distance between the target virtual object and the contact point of the target virtual object is greater than the distance between the contact point of the target virtual object and the second intersection point, the contact point of the target virtual object is adjusted to the midpoint of the line segment between the target virtual object and the second intersection point.
9. The method according to claim 7 or 8, characterized in that The virtual sphere is a virtual football, and the preset position in the game scene is a virtual goal in the game scene.
10. The method according to claim 1, characterized in that Before controlling the controlled virtual object to bounce the virtual sphere from the passing point via the virtual rebound wall, the method further includes: Draw a ray from the controlled virtual object to the passing point, wherein the ray intersects the virtual rebound wall at a target intersection point; The passing point is adjusted according to the distance between the target intersection point and the controlled virtual object, the distance between the target intersection point and the passing point, and the position of the controlled virtual object.
11. The method according to claim 1 or 10, characterized in that Before controlling the controlled virtual object to bounce the virtual sphere from the passing point via the virtual rebound wall, the method further includes: Obtaining a random deflection angle according to the attribute parameters of the controlled virtual object and a preset deflection factor; The passing point is adjusted according to the random deflection angle and the direction of the controlled virtual object to the passing point.
12. The method according to claim 1, characterized in that The response to the passing instruction of the virtual sphere in the game scene is any one of the following operations: The touch operation acting on the pass control in the game scene, the movement operation acting on the joystick device, and the input operation acting on the input device.
13. The method according to claim 2, characterized in that Determining the passing time according to the passing instruction includes: The pressing time corresponding to the passing instruction is determined as the passing time.
14. A pass control device, characterized in that: include: a determination module, configured to respond to a pass instruction for a virtual sphere in a game scene and determine a pass distance corresponding to the pass instruction; A judgment module, configured to determine a target ball landing point based on the passing distance and the position of the controlled virtual object; If the target ball landing point is outside the virtual court in the game scene, it is determined that the wall pass condition is met; if the target ball landing point is inside the virtual court, it is determined that the wall pass condition is not met; If the wall pass condition is met, the determination module is further configured to determine a virtual rebound wall from the game scene according to the passing direction corresponding to the passing instruction and the position of the controlled virtual object; determine a receiving virtual object from the multiple cooperating virtual objects according to the motion states of the multiple cooperating virtual objects, wherein the cooperating virtual objects are other virtual objects in the team where the controlled virtual object is located in the game scene; determine a mirror image point of the receiving virtual object's receiving point relative to the virtual rebound wall as the passing point of the controlled virtual object, so that the controlled virtual object passes the virtual ball to the passing point, and the ball bounces off the virtual rebound wall to the receiving point of the receiving virtual object; The control module is used to control the controlled virtual object to bounce the virtual sphere from the passing point through the virtual rebound wall.
15. A ball control device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the pass control device is running, the processor and the memory communicate via the bus, and the processor executes the machine-readable instructions to perform the method according to any one of claims 1 to 13.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 13 is executed.
Citation Information
Patent Citations
Operation control method and device of virtual object in game and mobile terminal
CN110064193A
Prop control method and device, storage medium and electronic device
CN112107858A