Search

CN-116059642-B - Pass control method, pass control device, pass control equipment and storage medium

CN116059642BCN 116059642 BCN116059642 BCN 116059642BCN-116059642-B

Abstract

The application provides a pass control method, a pass control device and a storage medium, wherein the method comprises the steps of responding to a pass instruction of a virtual sphere in a game scene, obtaining a pass direction corresponding to the pass instruction, determining a pass virtual object from a plurality of collaborative virtual objects of a team where a controlled virtual object is located according to the pass direction, determining a pass point according to the obtained movement direction of the pass virtual object, and controlling the virtual sphere to move towards the pass point so as to enable the pass virtual object to receive a ball from the pass point. According to the method, various conditions of passing are considered, the passing virtual object and the passing point can be determined according to the passing instruction, and the virtual sphere is controlled to move towards the passing point, so that the passing virtual object receives the ball from the passing point, the authenticity of the passing virtual object and the passing point is enhanced, and the game experience is improved.

Inventors

  • LI SHENGNAN

Assignees

  • 网易(杭州)网络有限公司

Dates

Publication Date
20260505
Application Date
20211103

Claims (15)

  1. 1. A pass control method, comprising: responding to a pass instruction aiming at a virtual sphere in a game scene, and acquiring a pass direction corresponding to the pass instruction; Determining a pass virtual object from a plurality of collaborative virtual objects of a team where the controlled virtual object is located according to the pass direction; Determining a pass point according to the acquired moving direction of the pass virtual object; Controlling the virtual sphere to move to the pass point so that the pass virtual object receives balls from the pass point; the determining the pass point according to the acquired moving direction of the pass virtual object comprises the following steps: Determining a pass selection point direction of the controlled virtual object pointing to the pass point according to the moving direction; Acquiring an included angle corresponding to the moving direction and the passing point selecting direction; According to the included angle between the moving direction and the passing point selecting direction, determining a passing point in the passing point selecting direction, wherein the passing point is a distance between the passing virtual object and the passing point determined according to the included angle, and is determined in the passing point selecting direction according to the distance; and determining a pass selection direction of the controlled virtual object pointing to the pass according to the moving direction, including: dividing the virtual court into a central area and an edge area according to goal posts of two virtual goals in the game scene; If the pass virtual object is in the central area, connecting edge points of the pass virtual object and a counterpart virtual goal on a goal line, and acquiring candidate areas in the pass point selection direction; and if the moving direction is within the coverage range of the candidate area, determining the moving direction as the pass point selecting direction.
  2. 2. The method of claim 1, wherein determining a pass virtual object from a plurality of collaborative virtual objects of a team on which the controlled virtual object is located based on the pass direction comprises: Determining a plurality of directions in which the controlled virtual object points to each cooperative virtual object; And determining the pass virtual object from the plurality of collaborative virtual objects according to the directions and the pass direction.
  3. 3. The method of claim 2, wherein the determining the pass virtual object from the plurality of collaborative virtual objects according to the plurality of directions and the pass direction comprises: Acquiring angle differences corresponding to the directions and the pass direction; Judging whether at least one target virtual object with the angle difference smaller than or equal to a preset angle exists in the plurality of cooperative virtual objects; And if the at least one target virtual object exists, determining the pass virtual object from the at least one target virtual object.
  4. 4. A method according to claim 3, wherein said determining said pass virtual object from said at least one target virtual object comprises: determining the pass time according to the pass instruction; calculating a pass distance according to the pass time and the size of the virtual court in the game scene; Determining a pass detection point of the virtual sphere according to the pass distance; and determining a target virtual object, of the at least one target virtual object, the distance between the target virtual object and the pass detection point meets a preset condition, as the pass virtual object.
  5. 5. The method of claim 1, wherein if the direction of movement is not within the coverage of the candidate area, the method further comprises: acquiring a first direction of the passing virtual object pointing to a first edge point of the opponent virtual goal on a goal line, and an included angle corresponding to the moving direction; Acquiring a second direction of the passing virtual object pointing to a second edge point of the opposite virtual goal on a goal line, and an included angle corresponding to the moving direction; And determining the minimum value of the included angles between the first direction and the moving direction and the included angles between the second direction and the moving direction, and the corresponding direction is the pass point selecting direction.
  6. 6. The method of claim 1, wherein if the pass virtual object is in the edge region, the method further comprises: obtaining a vertical line from the pass virtual object to a goal line of the opponent virtual goal; Determining a first moving point and a second moving point in the direction of the goal line according to the intersection point of the vertical line and the goal line, the edge point of the virtual court and the edge point of the virtual goal of the opposite side on the goal line; Acquiring a judging area according to the first moving point and the second moving point; And if the moving direction is within the coverage range of the judging area, determining the moving direction as the pass point selecting direction.
  7. 7. The method of claim 6, wherein if the direction of movement is not within the coverage area of the decision region, the method further comprises: acquiring a third direction of the pass virtual object pointing to the first edge point of the judging area and an included angle corresponding to the moving direction; Acquiring a fourth direction of the pass virtual object pointing to the second edge point of the judging area and an included angle corresponding to the moving direction; And determining the minimum value of the included angles between the third direction and the moving direction and the included angles between the fourth direction and the moving direction, and the corresponding direction as the pass point selecting direction.
  8. 8. The method of claim 6, wherein the acquiring a decision region from the first moving point and the second moving point comprises: If the first moving point and the second moving point are both in the virtual court, connecting the pass virtual object, the first moving point and the second moving point to acquire the judging area; And if the first moving point and the second moving point are moving points outside the virtual court, acquiring the judging area according to the passing virtual object and a target edge point of the virtual court, wherein the target edge point is an edge point closest to the moving point outside the virtual court in a plurality of edge points of the virtual court.
  9. 9. The method of claim 1, wherein prior to said controlling the movement of the virtual sphere toward the pass point, the method further comprises: And if the distance between the pass point and the virtual wall in the virtual court is smaller than or equal to the preset distance, adjusting the pass point according to the distance from the controlled virtual object to the pass point.
  10. 10. The method of claim 9, wherein adjusting the pass point according to the distance of the controlled virtual object to the pass point comprises: obtaining a virtual boundary box with the distance from the virtual wall being equal to the preset distance; taking the controlled virtual object as a circle center and the distance from the controlled virtual object to the pass point as a radius to make a circle; and adjusting the pass point according to the intersection point of the circle and the virtual boundary box in the boundary direction.
  11. 11. The method of claim 10, wherein adjusting the pass point based on the intersection of the circle and the virtual bounding box in the boundary direction comprises: Acquiring a plurality of candidate pass points according to the intersection points of the circle and the virtual boundary frame in the boundary direction; and adjusting the pass points according to the candidate pass points.
  12. 12. The method of claim 11, wherein the adjusting the pass points based on the plurality of candidate pass points comprises: obtaining the distance between each candidate pass point and the virtual boundary box; determining at least one target pass point, of which the distance from the virtual boundary box meets a preset condition, from the plurality of candidate pass points; Acquiring a deflection angle of the controlled virtual object pointing to the pass point and each target pass point; and adjusting the pass point according to the target pass point corresponding to the minimum deflection angle in the at least one target pass point.
  13. 13. A pass control device, comprising: the acquisition module is used for responding to a pass instruction aiming at a virtual sphere in a game scene and acquiring a pass direction corresponding to the pass instruction; the determining module is used for determining a pass virtual object from a plurality of cooperative virtual objects of a team where the controlled virtual object is located according to the pass direction, and determining a pass point according to the acquired moving direction of the pass virtual object; the control module is used for controlling the virtual sphere to move towards the pass point so that the pass virtual object receives balls from the pass point; the determining module is specifically configured to: Determining a pass selection point direction of the controlled virtual object pointing to the pass point according to the moving direction; Acquiring an included angle corresponding to the moving direction and the passing point selecting direction; According to the included angle between the moving direction and the passing point selecting direction, determining a passing point in the passing point selecting direction, wherein the passing point is a distance between the passing virtual object and the passing point determined according to the included angle, and is determined in the passing point selecting direction according to the distance; the determining module is specifically configured to: dividing the virtual court into a central area and an edge area according to goal posts of two virtual goals in the game scene; If the pass virtual object is in the central area, connecting edge points of the pass virtual object and a counterpart virtual goal on a goal line, and acquiring candidate areas in the pass point selection direction; and if the moving direction is within the coverage range of the candidate area, determining the moving direction as the pass point selecting direction.
  14. 14. A pass control device comprising a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory in communication via the bus when the pass control device is in operation, the processor executing the machine-readable instructions to perform the method of any of claims 1-12.
  15. 15. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the method of any of claims 1-12.

Description

Pass control method, pass control device, pass control equipment and storage medium Technical Field The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for controlling a pass. Background With the rapid development of game technology, more and more users like to play games through mobile phones and computers, wherein ball games are favored by fans because the ball games are not limited by factors such as places, personnel and the like. Currently, in ball games, one player is mainly controlled by each user, however, the game lacks treatment aiming at some special conditions in the ball passing process, so that the ball passing process is not real enough, and the game experience is poor. Disclosure of Invention The application aims to provide a pass control method, a pass control device and a pass control storage medium for solving the problem of poor game experience in the prior art. In order to achieve the above purpose, the technical scheme adopted by the embodiment of the application is as follows: in a first aspect, an embodiment of the present application provides a method for controlling a pass, including: responding to a pass instruction aiming at a virtual sphere in a game scene, and acquiring a pass direction corresponding to the pass instruction; Determining a pass virtual object from a plurality of collaborative virtual objects of a team where the controlled virtual object is located according to the pass direction; Determining a pass point according to the acquired moving direction of the pass virtual object; And controlling the virtual sphere to move towards the pass point so that the pass virtual object receives the pass from the pass point. In some embodiments, the determining, according to the pass direction, a pass virtual object from a plurality of collaborative virtual objects of a team on which the controlled virtual object is located includes: Determining a plurality of directions in which the controlled virtual object points to each cooperative virtual object; And determining the pass virtual object from the plurality of collaborative virtual objects according to the directions and the pass direction. In some embodiments, the determining the pass virtual object from the plurality of collaborative virtual objects according to the plurality of directions and the pass direction includes: Acquiring angle differences corresponding to the directions and the pass direction; Judging whether at least one target virtual object with the angle difference smaller than or equal to a preset angle exists in the plurality of cooperative virtual objects; And if the at least one target virtual object exists, determining the pass virtual object from the at least one target virtual object. In some embodiments, the determining the pass virtual object from the at least one target virtual object includes: determining the pass time according to the pass instruction; calculating a pass distance according to the pass time and the size of the virtual court in the game scene; Determining a pass detection point of the virtual sphere according to the pass distance; and determining a target virtual object, of the at least one target virtual object, the distance between the target virtual object and the pass detection point meets a preset condition, as the pass virtual object. In some embodiments, the determining the pass point according to the acquired moving direction of the pass virtual object includes: Determining a pass selection point direction of the controlled virtual object pointing to the pass point according to the moving direction; And determining the pass point according to the moving direction and the pass point selecting direction. In some embodiments, the determining, according to the moving direction, a pass selection direction in which the controlled virtual object points to the pass point includes: dividing a virtual court into a central area and an edge area according to the virtual goal in the game scene; If the pass virtual object is in the central area, connecting edge points of the pass virtual object and a counterpart virtual goal on a goal line, and acquiring candidate areas in the pass point selection direction; and if the moving direction is within the coverage range of the candidate area, determining the moving direction as the pass point selecting direction. In some embodiments, if the movement direction is not within the coverage of the candidate region, the method further comprises: acquiring a first direction of the passing virtual object pointing to a first edge point of the opponent virtual goal on a goal line, and an included angle corresponding to the moving direction; Acquiring a second direction of the passing virtual object pointing to a second edge point of the opposite virtual goal on a goal line, and an included angle corresponding to the moving direction; And determining the minimum