Game object control method and device
Through mutual conversion between the game object and the carrier, the problem of high operational coupling between the game object and the carrier is solved, and more accurate control is achieved, the field of vision is avoided and the game experience is improved.
Patent Information
- Application Number
- CN202310855228.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-12
- Publication Date
- 2025-01-10
AI Technical Summary
The operational coupling between the game objects and the carrier in the game world is high, resulting in the problem of wrong field of vision.
By obtaining the world position coordinates of the game object and converting it into relative position coordinates under the current orientation information of the bearer, the mutual conversion between the game object and the bearer is realized to decouple control and operation.
Improves the control accuracy of game objects, avoids misjudgment within the wrong field of vision, and improves the game experience.
Smart Images

Figure CN119280812A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for controlling a game object. Background Art
[0002] With the rapid development of Internet technology, electronic games have become an indispensable part of people's entertainment. In some games, it is usually necessary to control game objects to realize various game functions, for example, controlling game objects to realize movement functions, controlling game objects to realize interaction functions, etc.
[0003] In the related art, the game object has its own world coordinates in the game world, which are used to represent the position and interaction. However, when the game object enters the carrier, its world coordinates will change with the change of the carrier, which makes the control of the game object highly coupled with the operation of the carrier, and it is easy to cause field of view errors. Summary of the invention
[0004] In view of this, the present application provides a method and device for controlling a game object, the main purpose of which is to solve the problem in the prior art that the control of the game object is highly coupled with the operation of the carrier and is prone to field of view errors.
[0005] According to a first aspect of the present application, a method for controlling a game object is provided, comprising:
[0006] Obtain the world position coordinates of the game object, where the world position coordinates are the position coordinates of the game object in the world coordinate system;
[0007] In response to a control instruction for the game object, controlling the game object to perform an action in a world coordinate system according to the world position coordinates of the game object;
[0008] When the game object and the carrier form a carrying relationship, the world position coordinates of the game object are converted into relative position coordinates of the game object and the carrier according to the current orientation information of the carrier, and the relative position coordinates are the position coordinates of the game object in the relative coordinate system;
[0009] In response to a control instruction for the game object, the game object is controlled to perform an action in a relative position coordinate system according to the relative position coordinates of the game object and a carrier.
[0010] Furthermore, the converting the world position coordinates of the game object into the relative position coordinates of the game object and the carrier according to the current orientation information of the carrier includes:
[0011] Determine the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier;
[0012] The world position coordinates of the game object are converted into two-dimensional space, and according to the orientation information of the game object in the relative coordinate system, the position of the coordinate origin in the relative coordinate system is moved in the two-dimensional space to obtain the relative position coordinates of the game object in the two-dimensional space;
[0013] The relative position coordinates of the game object and the carrier are determined based on the relative position coordinates of the game object in the two-dimensional space and the value of the relative position coordinates in the vertical axis direction. The two-dimensional space is a plane coordinate system composed of two coordinate axes, the vertical axis direction is perpendicular to the plane coordinate system, and the value of the relative position coordinates in the vertical axis direction is obtained by difference calculation between the value of the game object's world position coordinates in the vertical axis direction and the value of the carrier's world position coordinates in the vertical axis direction.
[0014] Further, determining the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier includes:
[0015] According to the current orientation information of the object, the rotation angle of the object relative to the positive direction of the world coordinate system is calculated;
[0016] Calculate the rotation angle of the game object in the world coordinate system according to the world position coordinates of the game object and the world position coordinates of the carrier;
[0017] According to the rotation angle of the carrier relative to the positive direction of the world coordinate system, the reverse value of the rotation angle of the game object in the world coordinate system is calculated to obtain the orientation information of the game object in the relative coordinate system.
[0018] Furthermore, the world position coordinates of the game object are converted into two-dimensional space, and according to the orientation information of the game object in the relative coordinate system, the position of the coordinate origin in the relative coordinate system is moved in the two-dimensional space to obtain the relative position coordinates of the game object in the two-dimensional space, including:
[0019] Convert the world position coordinates of the game object into two-dimensional space, and calculate the relative length of the game object in the world coordinate system in the two-dimensional space;
[0020] Using the relative length of the game object in the world coordinate system, the coordinate origin in the relative coordinate system is moved along the direction of the game object in the relative coordinate system to obtain the relative position coordinates of the game object in the two-dimensional space.
[0021] Furthermore, the method further comprises:
[0022] When the game object and the carrier do not have a carrier relationship, the relative position coordinates of the game object and the carrier are converted into the world position coordinates of the game object according to the current orientation information of the carrier.
[0023] Furthermore, the converting the relative position coordinates of the game object and the carrier into the world position coordinates of the game object according to the current orientation information of the carrier includes:
[0024] Determine the orientation information of the game object in the world coordinate system based on the current orientation information of the carrier;
[0025] The relative position coordinates of the game object and the carrier are converted into two-dimensional space, and according to the orientation information of the game object in the world coordinate system, the world position coordinates of the carrier are moved in the two-dimensional space to obtain the world position coordinates of the game object in the two-dimensional space;
[0026] The world position coordinates of the game object are determined based on the world position coordinates of the game object in two-dimensional space and the value of the world position coordinates in the vertical axis direction corresponding to the world position coordinates. The value of the world position coordinates in the vertical axis direction is obtained by adding the value of the world position coordinates of the carrier in the vertical axis direction and the value of the relative position coordinates of the game object and the carrier in the vertical axis direction.
[0027] Further, determining the orientation information of the game object in the world coordinate system according to the current orientation information of the carrier includes:
[0028] According to the current orientation information of the object, the rotation angle of the object relative to the positive direction of the world coordinate system is calculated;
[0029] According to the relative position coordinates of the game object and the carrier, calculate the rotation angle of the game object in the relative coordinate system;
[0030] According to the rotation angle of the carrier relative to the positive direction of the world coordinate system, the positive value of the rotation angle of the game object in the relative coordinate system is calculated to obtain the orientation information of the game object in the world coordinate system.
[0031] Furthermore, the relative position coordinates of the game object and the carrier are converted into two-dimensional space, and the world position coordinates of the carrier are moved in the two-dimensional space according to the orientation information of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space, including:
[0032] The relative position coordinates of the game object and the carrier are converted into two-dimensional space, and the relative length of the game object in the relative coordinate system is calculated in the two-dimensional space;
[0033] Using the relative length of the game object in the relative coordinate system, the world position coordinates of the carrier are moved along the direction of the game object in the world coordinate system to obtain the world position coordinates of the game object in two-dimensional space.
[0034] Further, after responding to the control instruction to the game object and controlling the game object to perform an action in the world position coordinate system according to the world position coordinates of the game object, the method further includes:
[0035] When the target world position coordinates obtained after the game object moves in the game world coordinate system are within the interactive position coordinate range of the carrier, it is determined that the game object and the carrier form a carrier relationship;
[0036] Accordingly, after controlling the action of the game object in the relative position coordinate system according to the relative position coordinates of the game object and the carrier in response to the control instruction for the game object, the method further includes:
[0037] When the target relative position coordinates obtained after the game object moves in the carrier are not within the position coordinate range covered by the carrier, it is determined that the game object and the carrier have no bearing relationship.
[0038] According to a second aspect of the present application, a control device for a game object is provided, comprising:
[0039] An acquisition unit, used to acquire the world position coordinates of the game object, wherein the world position coordinates are the position coordinates of the game object in the world coordinate system;
[0040] A first control unit, configured to control the game object to perform an action in a world coordinate system in response to a control instruction for the game object and according to the world position coordinates of the game object;
[0041] A first conversion unit is used to convert the world position coordinates of the game object into relative position coordinates of the game object and the carrier according to the current orientation information of the carrier when the game object and the carrier form a carrier relationship, wherein the relative position coordinates are the position coordinates of the game object in the relative coordinate system;
[0042] The second control unit is used to respond to the control instruction of the game object and control the game object to perform an action in the relative position coordinate system according to the relative position coordinates of the game object and the carrier.
[0043] Furthermore, the first control unit is specifically used to respond to a control instruction to the game object, obtain displacement information carried by the control instruction; use the world position coordinates of the game object as the operation starting point, and control the game object to perform actions in the world position coordinate system according to the displacement information carried by the control instruction.
[0044] Furthermore, the first conversion unit is specifically used to determine the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier; convert the world position coordinates of the game object to two-dimensional space, and according to the orientation information of the game object in the relative coordinate system, move the position of the coordinate origin in the relative coordinate system in the two-dimensional space to obtain the relative position coordinates of the game object in the two-dimensional space; determine the relative position coordinates of the game object and the carrier according to the relative position coordinates of the game object in the two-dimensional space and the value of the relative position coordinates in the vertical axis direction, the two-dimensional space is a plane coordinate system composed of two coordinate axes, the vertical axis direction is perpendicular to the plane coordinate system, and the value of the relative position coordinate in the vertical axis direction is obtained by difference calculation between the value of the world position coordinate of the game object in the vertical axis direction and the value of the world position coordinate of the carrier in the vertical axis direction.
[0045] Furthermore, the first conversion unit is specifically used to calculate the rotation angle of the carrier relative to the positive direction of the world coordinate system based on the current orientation information of the carrier; calculate the rotation angle of the game object in the world coordinate system based on the world position coordinates of the game object and the world position coordinates of the carrier; calculate the reverse value of the rotation angle of the game object in the world coordinate system based on the rotation angle of the carrier relative to the positive direction of the world coordinate system, and obtain the orientation information of the game object in the relative coordinate system.
[0046] Furthermore, the first conversion unit is specifically used to convert the world position coordinates of the game object into two-dimensional space, calculate the relative length of the game object in the world coordinate system in the two-dimensional space; use the relative length of the game object in the world coordinate system to move the coordinate origin in the relative coordinate system along the direction of the game object in the relative coordinate system to obtain the relative position coordinates of the game object in the two-dimensional space.
[0047] Furthermore, the second control unit is specifically used to respond to a control instruction to the game object and obtain displacement information carried by the control instruction; using the relative position coordinates of the game object and the carrier as the position starting point, and controlling the game object to perform an action in the relative position coordinate system according to the displacement information carried by the control instruction.
[0048] Furthermore, the device also includes:
[0049] The second conversion unit is used to convert the relative position coordinates of the game object and the carrier into the world position coordinates of the game object according to the current orientation information of the carrier when the game object and the carrier do not have a carrier relationship.
[0050] Furthermore, the second conversion unit is specifically used to determine the orientation information of the game object in the world coordinate system based on the current orientation information of the carrier; convert the relative position coordinates of the game object and the carrier to two-dimensional space, and move the world position coordinates of the carrier in the two-dimensional space according to the orientation information of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space; determine the world position coordinates of the game object according to the world position coordinates of the game object in the two-dimensional space and the value of the world position coordinates in the vertical axis direction, the value of the world position coordinates in the vertical axis direction being obtained by adding the value of the world position coordinates of the carrier in the vertical axis direction and the value of the relative position coordinates of the game object and the carrier in the vertical axis direction.
[0051] Furthermore, the second conversion unit is specifically used to calculate the rotation angle of the carrier relative to the positive direction of the world coordinate system based on the current orientation information of the carrier; calculate the rotation angle of the game object in the relative coordinate system based on the relative position coordinates of the game object and the carrier; calculate the positive value of the rotation angle of the game object in the relative coordinate system based on the rotation angle of the carrier relative to the positive direction of the world coordinate system, and obtain the orientation information of the game object in the world coordinate system.
[0052] Furthermore, the second conversion unit is specifically used to convert the relative position coordinates of the game object and the carrier into two-dimensional space, and calculate the relative length of the game object in the relative coordinate system in the two-dimensional space; using the relative length of the game object in the relative coordinate system, the world position coordinates of the carrier are moved along the direction of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space.
[0053] Furthermore, the device also includes:
[0054] a detection unit, configured to, after responding to a control instruction to the game object and controlling the game object to perform an action in a world position coordinate system according to the world position coordinates of the game object, determine that a bearing relationship is detected between the game object and the bearing object when a target world position coordinate obtained after the game object moves in the game world coordinate system is within an interactive position coordinate range of the bearing object;
[0055] Correspondingly, the detection unit is also used to determine that the game object and the carrier do not have a carrying relationship after controlling the movement of the game object in the relative position coordinate system according to the relative position coordinates of the game object and the carrier in response to the control instruction of the game object. When the target relative position coordinates obtained after the game object moves in the carrier are not within the position coordinate range covered by the carrier,
[0056] According to a third aspect of the present application, a computer device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in the first aspect when executing the computer program.
[0057] According to a fourth aspect of the present application, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented.
[0058] By means of the above technical scheme, the present application provides a method and device for controlling a game object. Compared with the current prior art method of controlling a game object using world coordinates, the present application obtains the world position coordinates of the game object, which are the position coordinates of the game object in the world coordinate system, responds to the control instruction of the game object, and controls the game object to perform actions in the world coordinate system according to the world position coordinates of the game object. When the game object and the carrier form a carrying relationship, according to the current orientation information of the carrier, the world position coordinates of the game object are converted into the relative position coordinates of the game object and the carrier, which are the position coordinates of the game object in the relative coordinate system. In response to the control instruction of the game object, according to the relative position coordinates of the game object and the carrier, the game object is controlled to perform actions in the relative position coordinate system. The whole process realizes the mutual conversion between the world position coordinates of the game object and the relative position coordinates of the game object and the carrier in combination with the current orientation of the carrier, which can decouple the control of the game object from the operation of the carrier, avoid misjudgment of the game object within the wrong field of view, and improve the accuracy of the control of the game object.
[0059] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0061] Figure 1 It is a flowchart of a method for controlling a game object provided in an embodiment of the present application;
[0062] Figure 2 yes Figure 1 A schematic flow chart of a specific implementation of step 103;
[0063] Figure 3 It is a flowchart of another method for controlling a game object provided in an embodiment of the present application;
[0064] Figure 4 yes Figure 3 A schematic flow chart of a specific implementation of step 301;
[0065] Figure 5 This is a flow chart of another method for controlling a game object provided in an embodiment of the present application.
[0066] Figure 6 is a structural schematic diagram of a control device for a game object provided in an embodiment of the present application;
[0067] Figure 7 It is a schematic diagram of the device structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] Now the content of the present invention will be discussed with reference to several exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and thus implement the content of the present invention, rather than implying any limitation on the scope of the present invention.
[0069] As used herein, the term "including" and variations thereof are to be interpreted as open-ended terms meaning "including but not limited to." The term "based on" is to be interpreted as "based, at least in part, on." The terms "one embodiment" and "an embodiment" are to be interpreted as "at least one embodiment." The term "another embodiment" is to be interpreted as "at least one other embodiment."
[0070] Related Technology In the process of controlling a game object, when the game object is in a carrier, since the game object and the carrier each have independent world coordinates, the world coordinates of the game object will be affected by the carrier. For example, when the carrier moves, turns, etc., the world coordinates of the carrier change, which will correspondingly cause the world coordinates of the game object to change. This makes the control of the game object highly coupled with the operation of the carrier, which can easily cause the game object to be misjudged within the wrong field of view.
[0071] In order to solve this problem, this embodiment provides a method for controlling a game object, such as Figure 1 As shown, the method comprises the following steps:
[0072] 101. Get the world position coordinates of the game object.
[0073] Among them, the world position coordinates are the position coordinates of the game object in the world coordinate system. In the world coordinate system, the three coordinate axes are usually marked as X, Y and Z axes. The X axis usually represents the left and right direction of the object, the Y axis represents the up and down direction of the object, and the Z axis represents the front and back direction of the object. Usually, there are two coordinate systems in the game world, one is the global coordinate system that acts on the entire game world, and the other is the local coordinate system that acts on specific game objects. For example, assuming that the entire earth is a game space, then the position of the game character can be located in the entire earth coordinate system space using a unique longitude and latitude. This longitude and latitude is the position of the game character in the world coordinate system, and taking the game character's home as a reference, it can be said that the game character is currently in the living room. Then the position in the living room is determined relative to the coordinate system of the home.
[0074] It is understandable that the world position coordinates of the game object not only directly affect the progress of the game, but also whether the player can successfully complete the task and avoid being attacked by the enemy. Therefore, the world position coordinates of the game object are particularly important. In most game scenes, the world position coordinates of the game object can be viewed through the small map or large map in the game screen. Players can understand the position and distance between themselves and the enemy by scaling the size of the small map or large map.
[0075] The execution subject of this embodiment can be a control device or equipment for the game object, which can be configured on the game server. The game server can use the world coordinate system to provide the position of the game object in the map. The world coordinate system is a three-dimensional coordinate system. It is a fixed coordinate system that is not affected by operations such as rotation, translation and scaling of the object. The position and direction of each game object or object, as well as the position and direction of the camera, can be located through the world coordinate system. Accordingly, the game object may also be associated with other objects during the control process and have other coordinate systems. By combining the world coordinate system with other coordinate systems, complex movement and positioning of the game object during the game can be achieved.
[0076] 102. In response to a control instruction for the game object, control the game object to perform an action in a world position coordinate system according to the world position coordinates of the game object.
[0077] Among them, the control instructions can be the movement control and interactive control of the game objects in the map, which can be displacement or actions such as skill release. The movement control can include but is not limited to the forward, backward, and avoidance actions of the game objects. The interactive control can include but is not limited to the attack, chase and other actions between game objects.
[0078] It is understandable that the control instructions of the game object will cause the game object to take action, and the action of the game object will cause the position of the game character to change accordingly. These position changes require the target position of the game object to be determined according to the world coordinate system. Specifically, after responding to the control instruction of the game object, the displacement information carried by the control instruction can be obtained, and then the world position coordinates of the game object are used as the operation starting point, and the game object is controlled to perform the action in the world position coordinate system according to the displacement information carried by the action instruction. For example, the current world position coordinates of the game object in the game map are position A, and the position information carried by the control instruction is to move from position A in the game map to position B, and the corresponding world position coordinates of the game object are further controlled to be updated to position B.
[0079] Taking the control of the movement of a game object as an example, in response to the game object receiving a control instruction for position movement in the game map, the control instruction carries the target world position coordinates after the position movement. The movement path of the game object is further calculated based on the current world position coordinates and the target world position coordinates of the game object, and the game object is controlled to move in the game map along the movement path.
[0080] Taking controlling a game object to release a skill as an example, in response to the game object receiving a control instruction to release a skill in the game map, the control instruction carries the target world position coordinates after the skill is released, and further changes the current world position coordinates of the game object to the target world position coordinates based on the target world position coordinates.
[0081] 103. When the game object and the carrier form a carrier relationship, the world position coordinates of the game object are converted into relative position coordinates of the game object and the carrier according to the current orientation information of the carrier.
[0082] Among them, the relative position coordinates are the position coordinates of the game object in the relative coordinate system, and the relative coordinate system is the coordinate system of the game object relative to the carrier. Usually, many different carriers are set in the game map, such as airships, spaceships, cars, etc., and the position coordinates of the game object in the game map are constantly changing. When the game object is associated with the carrier, the game object and the carrier form a carrier relationship. As an implementation method, the game object can be moved into the carrier through control instructions. For example, the game object is located in a large vehicle such as an airship. In this case, the game object can move in a large range or release skills. As another implementation method, the game object can drive a smaller vehicle through control instructions. For example, the game object rides a motorcycle or an animal. In this case, the game object has a smaller range of movement, but can still release skills normally. When the game object forms a carrying relationship with the carrier, the world position coordinates of the game object can also be obtained accordingly. Considering that the carrier and the game object each have independent world coordinate systems, the world position coordinates of the game object need to consider the world position coordinates of the carrier. For example, the game object does not receive any control instructions in the carrier, but if the carrier moves, the world position coordinates of the game object will also change with the change of the world position coordinates of the carrier. Here, the world position coordinates of the game object can be converted into the relative position coordinates of the game object and the carrier, and the relative position coordinates of the game object and the carrier are used to control the game object within the field of view of the carrier.
[0083] In one possible implementation, the relative coordinate system uses the center point of the carrier as its origin, and specifically uses the front, back, left, right, up and down directions of the carrier itself as coordinate axes. When the carrier rotates, the relative coordinate system also rotates. Therefore, it is necessary to use the current orientation of the carrier to convert the world position coordinates of the game object into the relative position coordinates of the game object within the carrier.
[0084] In actual application scenarios, the current orientation information of the carrier and the world position coordinates of the carrier are both position parameters that can be obtained in real time. Specifically, the rotation angle A of the carrier relative to the positive direction of the world coordinate system can be calculated according to the current orientation information of the carrier, and then the orientation information of the game object in the world coordinate system is calculated according to the world position coordinates of the game object and the world position coordinates of the carrier. Since the carrier uses the rotation angle A in the world coordinate system, the orientation information of the game object in the world coordinate system needs to be reversely rotated by the angle A to obtain the orientation information of the game object in the relative coordinate system. Then, after converting the world position coordinates of the game object to two-dimensional space, the relative length of the game object in the world coordinate system is calculated in the two-dimensional space, and the coordinate origin of the relative coordinate system is moved along the orientation information of the game object in the relative coordinate system by a relative length to obtain the relative position coordinates of the game object in the two-dimensional space. Finally, by subtracting the coordinate value of the world position coordinates of the game object in the z-axis direction from the coordinate value of the world position coordinates of the carrier in the z-axis direction, the coordinate value of the relative position coordinates of the game object in the z-axis direction is obtained, and then combined with the relative position coordinates of the game object in the two-dimensional space, the relative position coordinates of the game object and the carrier are obtained.
[0085] 104. In response to a control instruction for the game object, control the game object to perform an action in a relative position coordinate system according to the relative position coordinates of the game object and a carrier.
[0086] The control instructions of the game object are similar to the control instructions in step 102 above, and the control instructions may be movement operations and interaction operations of the game object relative to the carrier.
[0087] Specifically, the displacement information carried by the operation instruction can be obtained in response to the control instruction of the game object, and the relative position coordinates of the game object and the carrier are used as the position starting point, and the game object is controlled to perform an action in the relative position coordinate system according to the displacement information carried by the control instruction. For example, the relative position coordinates of the game object and the carrier are position C, and the position information carried by the control instruction is to move from position C in the carrier to position D, and the relative position coordinates of the game object and the carrier are further controlled to be updated to position D.
[0088] Taking the control of the movement of a game object as an example, in response to the game object receiving a control instruction for position movement in a carrier, the control instruction carries the target relative position coordinates after the position movement, and further calculates the movement path of the game object according to the current relative position coordinates of the game object in the carrier and the target relative position coordinates, and controls the game object to move in the carrier along the movement path. When the target relative position coordinates exceed the position coordinate range covered by the carrier, the game object is controlled to leave the carrier.
[0089] It can be understood that when the game object is in the game map, there is no associated operation between the game object and the carrier, and the game object can be controlled through the world position coordinates of the game object. When the game object forms a carrier relationship with the carrier, the operation of the game object and the operation of the carrier are highly coupled. The world position coordinates of the game object can be converted into the relative position coordinates of the game object and the carrier, and the relative position coordinates are used to control the game object to ensure that the position of the game object in the carrier will not be misjudged, which is conducive to the control of the game object.
[0090] The control method of the game object provided in the embodiment of the present application is compared with the way of controlling the game object using world coordinates in the current prior art. The present application obtains the world position coordinates of the game object, which are the position coordinates of the game object in the world coordinate system, responds to the control instruction of the game object, and controls the game object to perform actions in the world coordinate system according to the world position coordinates of the game object. When the game object and the carrier form a carrying relationship, the world position coordinates of the game object are converted into the relative position coordinates of the game object and the carrier according to the current orientation information of the carrier. The relative position coordinates are the position coordinates of the game object in the relative coordinate system, and responds to the control instruction of the game object. According to the relative position coordinates of the game object and the carrier, the game object is controlled to perform actions in the relative position coordinate system. The whole process realizes the mutual conversion between the world position coordinates of the game object and the relative position coordinates of the game object and the carrier in combination with the current orientation of the carrier, which can decouple the control of the game object from the operation of the carrier, avoid the misjudgment of the game object within the wrong visual field, and improve the accuracy of the control of the game object.
[0091] In actual application scenarios, the game object will move to different game scenes and also to different carriers. When the game object moves to a carrier and forms a carrier relationship with the carrier, specifically, in the above embodiment, step 103 includes:
[0092] 201. Determine the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier.
[0093] 202. Convert the world position coordinates of the game object to two-dimensional space, and according to the orientation information of the game object in the relative coordinate system, move the position of the coordinate origin in the relative coordinate system in the two-dimensional space to obtain the relative position coordinates of the game object in the two-dimensional space.
[0094] 203. Determine the relative position coordinates of the game object and the carrier according to the relative position coordinates of the game object in the two-dimensional space and the value of the relative position coordinates corresponding to the vertical axis direction.
[0095] It is understandable that three-dimensional coordinates are usually used in the game world. The two-dimensional space is a plane coordinate system composed of two coordinate axes, and the vertical axis is perpendicular to the plane coordinate system. That is, the coordinates of the game object in the two-dimensional space are equivalent to the plane coordinate system formed by selecting the X-axis and Y-axis directions in the three-dimensional coordinates, and the vertical axis direction is the Z-axis direction in the three-dimensional coordinates.
[0096] Specifically, in the process of determining the orientation information of the game object in the relative coordinate system based on the current orientation information of the carrier, the rotation angle of the carrier relative to the positive direction of the world coordinate system can be calculated based on the current orientation information of the carrier, and then the rotation angle of the game object in the world coordinate system can be calculated based on the world position coordinates of the game object and the world position coordinates of the carrier. Further, based on the rotation angle of the carrier relative to the positive direction of the world coordinate system, the reverse value of the rotation angle of the game object in the world coordinate system can be calculated to obtain the orientation information of the game object in the relative coordinate system.
[0097] Specifically, the world position coordinates of the game object are converted to two-dimensional space. According to the orientation information of the game object in the relative coordinate system, the position of the coordinate origin in the relative coordinate system is moved in the two-dimensional space. The world position coordinates of the game object can be converted to two-dimensional space, and the relative length of the game object in the world coordinate system is calculated in the two-dimensional space. Using the relative length of the game object in the world coordinate system, the coordinate origin in the relative coordinate system is moved along the orientation direction of the game object in the relative coordinate system to obtain the relative position coordinates of the game object in the two-dimensional space.
[0098] The value of the relative position coordinate corresponding to the vertical axis is obtained by calculating the difference between the value of the world position coordinate of the game object corresponding to the vertical axis and the value of the world position coordinate of the carrier corresponding to the vertical axis. The relative position coordinates of the game object in two-dimensional space and the value of the relative position coordinate corresponding to the vertical axis can be combined to obtain the relative position coordinates of the game object and the carrier.
[0099] In one possible implementation, during the movement of the game in the carrier, the movement can be carried out by taking the relative position coordinates of the game object in the carrier as the starting point, moving N meters in a certain direction from the starting point, and further receiving the relative starting point posStart, relative direction dir, and moving distance dis transmitted by the corresponding mobile client of the carrier. First, the relative end point posEnd of the game object's movement is calculated based on the relative direction dir and the moving distance diss, and then the validity of the relative end point posEnd relative to the game object is checked, and finally the game object is controlled to execute the movement of the relative position coordinates in the carrier. Here, the navigation data can be used to detect whether there is any obstruction between the relative starting point and the relative end point. The end point should be the farthest unobstructed point from the starting point to the end point.
[0100] Specifically, the ratio of the moving distance to the direction vector can be calculated according to the relative direction dir and the moving distance diss, and the relative end point posEnd of the game object's movement can be calculated according to the ratio of the moving distance to the direction vector.
[0101] Considering that the game object can be dynamically moved in the carrier, the specific range of movement is not limited to the carrier, and can also leave the carrier to other scenes in the game world. In order to realize the control of the game object in the game world, further, in the above embodiment, Figure 3 As shown, the method also includes the following steps:
[0102] 301. When the game object and the carrier do not have a carrier relationship, the relative position coordinates of the game object and the carrier are converted into the world position coordinates of the game object according to the current orientation information of the carrier.
[0103] It can be understood that when the game object leaves the carrier, there is no associated operation between the game object and the carrier. The game object can be controlled by the world position coordinates of the game object, and the relative position coordinates of the game object and the carrier are further converted into the world position coordinates of the game object. The world position coordinates are used to control the game object to achieve accurate control of the game object in the world coordinate system.
[0104] Specifically, in the above embodiment, Figure 4 As shown, step 301 includes the following steps:
[0105] 401. Determine the orientation information of the game object in the world coordinate system according to the current orientation information of the carrier.
[0106] 402. Convert the relative position coordinates of the game object and the carrier into two-dimensional space, and according to the orientation information of the game object in the world coordinate system, move the world position coordinates of the carrier in the two-dimensional space to obtain the world position coordinates of the game object in the two-dimensional space.
[0107] 403. Determine the world position coordinates of the game object according to the world position coordinates of the game object in the two-dimensional space and the value of the world position coordinates in the vertical axis direction corresponding to the world position coordinates.
[0108] Specifically, in the process of using the current orientation information of the carrier to determine the orientation information of the game object in the world coordinate system, the current orientation information of the carrier can be used to calculate the rotation angle of the carrier relative to the positive direction of the world coordinate system, and then the rotation angle of the game object in the relative coordinate system is calculated based on the relative position coordinates of the game object and the carrier. The rotation angle of the carrier relative to the positive direction of the world coordinate system is further used to compare the positive value of the rotation angle of the game object in the relative coordinate system to obtain the orientation information of the game object in the world coordinate system.
[0109] Specifically, the relative position coordinates of the game object in the carrier are converted to two-dimensional space. According to the orientation information of the game object in the world coordinate system, in the process of moving the world position coordinates of the carrier in the two-dimensional space, the relative position coordinates of the game object in the carrier can be converted to two-dimensional space, and the relative length of the game object in the relative coordinate system is calculated in the two-dimensional space. Using the relative length of the game object in the relative coordinate system, the world position coordinates of the carrier are moved along the orientation direction of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space.
[0110] The value of the world position coordinate corresponding to the vertical axis direction is calculated by adding the value of the world position coordinate corresponding to the vertical axis direction of the carrier and the value of the relative position coordinate corresponding to the vertical axis direction of the game object. The world position coordinate of the game object can be obtained by combining the world position coordinate of the game object in two-dimensional space with the value of the world position coordinate corresponding to the vertical axis direction.
[0111] In actual application scenarios, the carrier can move and change direction freely in the world coordinate system. In this way, the world coordinates of the game object in the relative coordinate system will also be affected by the movement of the carrier, and the current orientation of the carrier needs to be considered. Specifically, the rotation angle A of the carrier relative to the positive direction of the world coordinate system can be calculated based on the current orientation of the carrier, and then the orientation information of the game object in the relative coordinate system can be calculated based on the relative position coordinates of the game object in the carrier. Since the carrier uses the rotation angle A in the world coordinate system, the orientation information of the game object in the world coordinate system is also rotated accordingly by angle A to obtain the orientation information of the game object in the world coordinate system. Next, after the relative position coordinates of the game object in the carrier are converted to two-dimensional space, the relative length is calculated in the two-dimensional space, and the world position coordinates of the carrier are moved along the orientation information of the game object in the world coordinate system by a relative length to obtain the world position coordinates of the game object in the two-dimensional space. Finally, the coordinate value of the world position coordinates of the game object in the z-axis direction is obtained by adding the coordinate value of the relative position coordinates of the game object in the carrier in the z-axis direction to the coordinate value of the world position coordinates of the carrier in the z-axis direction, and then combined with the world position coordinates of the game object in the two-dimensional space to obtain the world position coordinates of the game object.
[0112] Considering the change in the bearing relationship between the game object and the bearing object, further, such as Figure 5 As shown, after step 102, the method further includes the following steps:
[0113] 501. When the target world position coordinates obtained after the game object moves in the game world coordinate system are within the interactive position coordinate range of the carrier, it is determined that a carrier relationship is formed between the game object and the carrier.
[0114] Accordingly, after step 104, the method further includes the following steps:
[0115] 502. When the target relative position coordinates obtained after the game object moves in the carrier are not within the position coordinate range covered by the carrier, it is determined that the game object and the carrier have no carrier relationship.
[0116] It can be understood that the world position coordinates of the game object will change with the operation instructions. Correspondingly, the position coordinate range covered by the carrier is not fixed. Here, the coordinate range covered by the carrier can be the edge point coordinate set of the carrier in the relative coordinate system. By detecting whether the target world position coordinates after the game object moves are within the range specified by the edge coordinate set, it is detected whether the game object and the carrier have moved into the carrier. When the target world position coordinates obtained after the game object moves in the world coordinate system are within the interactive position coordinate range of the carrier, it is determined that the game object and the carrier have formed a carrying relationship. Correspondingly, it is also possible to detect whether the game object leaves the carrier by detecting whether the target relative position coordinates after the game object moves in the carrier are within the range specified by the edge coordinate set. When the target relative position coordinates obtained after the game object moves in the carrier are not within the position coordinate range covered by the carrier, it is determined that the game object and the carrier do not have a carrying relationship. Further, different coordinate systems are used to control the game object according to whether the game object and the carrier have a carrying relationship, thereby improving the accuracy of game object control.
[0117] Further, as Figure 1-Figure 5 The specific implementation of the method, the embodiment of the present application provides a control device for a game object, such as Figure 6 As shown, the device includes: an acquisition unit 61, a first control unit 62, a first conversion unit 63, and a second control unit 64.
[0118] An acquisition unit 61 is used to acquire the world position coordinates of the game object, where the world position coordinates are the position coordinates of the game object in the world coordinate system;
[0119] A first control unit 62, configured to control the game object to perform an action in a world coordinate system according to the world position coordinates of the game object in response to a control instruction for the game object;
[0120] A first conversion unit 63 is used to convert the world position coordinates of the game object into relative position coordinates of the game object and the carrier according to the current orientation information of the carrier when the game object and the carrier form a carrier relationship, wherein the relative position coordinates are the position coordinates of the game object in the relative coordinate system;
[0121] The second control unit 64 is used to respond to the control instruction of the game object and control the game object to perform an action in the relative position coordinate system according to the relative position coordinates of the game object and the carrier.
[0122] Compared with the current prior art method of controlling a game object using world coordinates, the control device for a game object provided by the embodiment of the present invention obtains the world position coordinates of the game object, which are the position coordinates of the game object in the world coordinate system, responds to the control instruction of the game object, and controls the game object to perform actions in the world coordinate system according to the world position coordinates of the game object. When the game object and the carrier form a carrying relationship, the world position coordinates of the game object are converted into the relative position coordinates of the game object and the carrier according to the current orientation information of the carrier, and the relative position coordinates are the position coordinates of the game object in the relative coordinate system. In response to the control instruction of the game object, the game object is controlled to perform actions in the relative position coordinate system according to the relative position coordinates of the game object and the carrier. The whole process realizes the mutual conversion between the world position coordinates of the game object and the relative position coordinates of the game object and the carrier in combination with the current orientation of the carrier, which can decouple the control of the game object from the operation of the carrier, avoid misjudgment of the game object within the wrong field of view, and improve the accuracy of the control of the game object.
[0123] Furthermore, the first control unit 62 is specifically used to respond to a control instruction to the game object, obtain displacement information carried by the control instruction; use the world position coordinates of the game object as the operation starting point, and control the game object to perform actions in the world position coordinate system according to the displacement information carried by the control instruction.
[0124] Furthermore, the first conversion unit 63 is specifically used to determine the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier; convert the world position coordinates of the game object to two-dimensional space, and according to the orientation information of the game object in the relative coordinate system, move the position of the coordinate origin in the relative coordinate system in the two-dimensional space to obtain the relative position coordinates of the game object in the two-dimensional space; determine the relative position coordinates of the game object and the carrier according to the relative position coordinates of the game object in the two-dimensional space and the value of the relative position coordinates in the vertical axis direction, wherein the two-dimensional space is a plane coordinate system composed of two coordinate axes, the vertical axis direction is perpendicular to the plane coordinate system, and the value of the relative position coordinates in the vertical axis direction is obtained by difference calculation between the value of the world position coordinate of the game object in the vertical axis direction and the value of the world position coordinate of the carrier in the vertical axis direction.
[0125] Furthermore, the first conversion unit 63 is specifically used to calculate the rotation angle of the carrier relative to the positive direction of the world coordinate system based on the current orientation information of the carrier; calculate the rotation angle of the game object in the world coordinate system based on the world position coordinates of the game object and the world position coordinates of the carrier; calculate the reverse value of the rotation angle of the game object in the world coordinate system based on the rotation angle of the carrier relative to the positive direction of the world coordinate system, and obtain the orientation information of the game object in the relative coordinate system.
[0126] Furthermore, the first conversion unit 63 is specifically used to convert the world position coordinates of the game object into two-dimensional space, calculate the relative length of the game object in the world coordinate system in the two-dimensional space; use the relative length of the game object in the world coordinate system to move the coordinate origin in the relative coordinate system along the direction of the game object in the relative coordinate system to obtain the relative position coordinates of the game object in the two-dimensional space.
[0127] Furthermore, the second control unit 64 is specifically used to respond to the control instruction of the game object, obtain the displacement information carried by the control instruction; use the relative position coordinates of the game object and the carrier as the position starting point, and control the game object to perform actions in the relative position coordinate system according to the displacement information carried by the control instruction.
[0128] Furthermore, the device also includes:
[0129] The second conversion unit is used to convert the relative position coordinates of the game object and the carrier into the world position coordinates of the game object according to the current orientation information of the carrier when the game object and the carrier do not have a carrier relationship.
[0130] Furthermore, the second conversion unit is specifically used to determine the orientation information of the game object in the world coordinate system based on the current orientation information of the carrier; convert the relative position coordinates of the game object and the carrier to two-dimensional space, and move the world position coordinates of the carrier in the two-dimensional space according to the orientation information of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space; determine the world position coordinates of the game object according to the world position coordinates of the game object in the two-dimensional space and the value of the world position coordinates in the vertical axis direction, the value of the world position coordinates in the vertical axis direction being obtained by adding the value of the world position coordinates of the carrier in the vertical axis direction and the value of the relative position coordinates of the game object and the carrier in the vertical axis direction.
[0131] Furthermore, the second conversion unit is specifically used to calculate the rotation angle of the carrier relative to the positive direction of the world coordinate system based on the current orientation information of the carrier; calculate the rotation angle of the game object in the relative coordinate system based on the relative position coordinates of the game object and the carrier; calculate the positive value of the rotation angle of the game object in the relative coordinate system based on the rotation angle of the carrier relative to the positive direction of the world coordinate system, and obtain the orientation information of the game object in the world coordinate system.
[0132] Furthermore, the second conversion unit is specifically used to convert the relative position coordinates of the game object and the carrier into two-dimensional space, and calculate the relative length of the game object in the relative coordinate system in the two-dimensional space; using the relative length of the game object in the relative coordinate system, the world position coordinates of the carrier are moved along the direction of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space.
[0133] Furthermore, the device also includes:
[0134] a detection unit, configured to, after responding to a control instruction to the game object and controlling the game object to perform an action in a world position coordinate system according to the world position coordinates of the game object, determine that a bearing relationship is detected between the game object and the bearing object when a target world position coordinate obtained after the game object moves in the game world coordinate system is within an interactive position coordinate range of the bearing object;
[0135] Correspondingly, the detection unit is also used to determine that the game object and the carrier do not have a carrying relationship after controlling the movement of the game object in the relative position coordinate system according to the relative position coordinates of the game object and the carrier in response to the control instruction of the game object. When the target relative position coordinates obtained after the game object moves in the carrier are not within the position coordinate range covered by the carrier,
[0136] It should be noted that for other corresponding descriptions of the functional units involved in the control device for a game object provided in this embodiment, reference can be made to Figure 1-Figure 5 The corresponding description in will not be repeated here.
[0137] Based on the above Figure 1-Figure 5 The method shown in the embodiment of the present application accordingly provides a storage medium on which a computer program is stored, and when the program is executed by a processor, the above-mentioned Figure 1-Figure 6 The control methods of the game objects shown.
[0138] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.), and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0139] Based on the above Figure 1-Figure 5 The method shown, and Figure 6 In order to achieve the above-mentioned purpose, the embodiment of the present application also provides a physical device for controlling a game object, which can be a computer, a smart phone, a tablet computer, a smart watch, a server, or a network device, etc. The physical device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1-Figure 5 The control methods of the game objects shown.
[0140] Optionally, the physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.
[0141] In an exemplary embodiment, see Figure 7 The physical device includes a communication bus, a processor, a memory and a communication interface, and may also include an input / output interface and a display device, wherein each functional unit can communicate with each other through the bus. The memory stores a computer program, and the processor is used to execute the program stored in the memory and execute the control method of the game object in the above embodiment.
[0142] Those skilled in the art will appreciate that the physical device structure for controlling a game object provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.
[0143] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device for controlling and processing the game objects, and supports the operation of information processing programs and other software and / or programs. The network communication module is used to realize communication between components within the storage medium, and communication with other hardware and software in the information processing physical device.
[0144] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. By applying the technical solution of the present application, compared with the current existing methods, the present application realizes the mutual conversion between the world position coordinates of the game object and the relative position coordinates of the game object and the carrier by combining the current orientation of the carrier, which can decouple the control of the game object from the operation of the carrier, avoid misjudgment of the game object within the wrong field of view, and improve the accuracy of the control of the game object.
[0145] Those skilled in the art will appreciate that the accompanying drawings are only schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present application. Those skilled in the art will appreciate that the modules in the devices in the implementation scenario can be distributed in the devices of the implementation scenario according to the description of the implementation scenario, or can be changed accordingly and located in one or more devices different from the present implementation scenario. The modules of the above-mentioned implementation scenario can be combined into one module, or can be further split into multiple submodules.
[0146] The above serial numbers of this application are only for description and do not represent the advantages and disadvantages of the implementation scenarios. The above disclosure is only a few specific implementation scenarios of this application, but this application is not limited to them, and any changes that can be thought of by technicians in this field should fall within the scope of protection of this application.
Claims
1. A method for controlling a game object, characterized in that: include: Obtain the world position coordinates of the game object, where the world position coordinates are the position coordinates of the game object in the world coordinate system; In response to a control instruction for the game object, controlling the game object to perform an action in a world coordinate system according to the world position coordinates of the game object; When the game object and the carrier form a carrying relationship, the world position coordinates of the game object are converted into relative position coordinates of the game object and the carrier according to the current orientation information of the carrier, and the relative position coordinates are the position coordinates of the game object in the relative coordinate system; In response to a control instruction for the game object, the game object is controlled to perform an action in a relative position coordinate system according to the relative position coordinates of the game object and a carrier.
2. The method according to claim 1, characterized in that The converting the world position coordinates of the game object into the relative position coordinates of the game object and the carrier according to the current orientation information of the carrier includes: Determine the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier; The world position coordinates of the game object are converted into two-dimensional space, and according to the orientation information of the game object in the relative coordinate system, the position of the coordinate origin in the relative coordinate system is moved in the two-dimensional space to obtain the relative position coordinates of the game object in the two-dimensional space; The relative position coordinates of the game object and the carrier are determined based on the relative position coordinates of the game object in the two-dimensional space and the value of the relative position coordinates in the vertical axis direction. The two-dimensional space is a plane coordinate system composed of two coordinate axes, the vertical axis direction is perpendicular to the plane coordinate system, and the value of the relative position coordinates in the vertical axis direction is obtained by difference calculation between the value of the game object's world position coordinates in the vertical axis direction and the value of the carrier's world position coordinates in the vertical axis direction.
3. The method according to claim 2, characterized in that Determining the orientation information of the game object in the relative coordinate system according to the current orientation information of the carrier includes: According to the current orientation information of the object, the rotation angle of the object relative to the positive direction of the world coordinate system is calculated; Calculate the rotation angle of the game object in the world coordinate system according to the world position coordinates of the game object and the world position coordinates of the carrier; According to the rotation angle of the carrier relative to the positive direction of the world coordinate system, the reverse value of the rotation angle of the game object in the world coordinate system is calculated to obtain the orientation information of the game object in the relative coordinate system.
4. The method according to claim 2, characterized in that: The process of converting the world position coordinates of the game object into a two-dimensional space and moving the position of the coordinate origin in the relative coordinate system in the two-dimensional space according to the orientation information of the game object in the relative coordinate system to obtain the relative position coordinates of the game object in the two-dimensional space includes: Convert the world position coordinates of the game object into two-dimensional space, and calculate the relative length of the game object in the world coordinate system in the two-dimensional space; Using the relative length of the game object in the world coordinate system, the coordinate origin in the relative coordinate system is moved along the direction of the game object in the relative coordinate system to obtain the relative position coordinates of the game object in the two-dimensional space.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: When the game object and the carrier do not have a carrier relationship, the relative position coordinates of the game object and the carrier are converted into the world position coordinates of the game object according to the current orientation information of the carrier.
6. The method according to claim 5, characterized in that The converting the relative position coordinates of the game object and the carrier into the world position coordinates of the game object according to the current orientation information of the carrier includes: Determine the orientation information of the game object in the world coordinate system based on the current orientation information of the carrier; The relative position coordinates of the game object and the carrier are converted into two-dimensional space, and according to the orientation information of the game object in the world coordinate system, the world position coordinates of the carrier are moved in the two-dimensional space to obtain the world position coordinates of the game object in the two-dimensional space; The world position coordinates of the game object are determined based on the world position coordinates of the game object in two-dimensional space and the value of the world position coordinates in the vertical axis direction corresponding to the world position coordinates. The value of the world position coordinates in the vertical axis direction is obtained by adding the value of the world position coordinates of the carrier in the vertical axis direction and the value of the relative position coordinates of the game object and the carrier in the vertical axis direction.
7. The method according to claim 6, characterized in that Determining the orientation information of the game object in the world coordinate system according to the current orientation information of the carrier includes: According to the current orientation information of the object, the rotation angle of the object relative to the positive direction of the world coordinate system is calculated; According to the relative position coordinates of the game object and the carrier, calculate the rotation angle of the game object in the relative coordinate system; According to the rotation angle of the carrier relative to the positive direction of the world coordinate system, the positive value of the rotation angle of the game object in the relative coordinate system is calculated to obtain the orientation information of the game object in the world coordinate system.
8. The method according to claim 6, characterized in that The process of converting the relative position coordinates of the game object and the carrier into a two-dimensional space, and moving the world position coordinates of the carrier in the two-dimensional space according to the orientation information of the game object in the world coordinate system to obtain the world position coordinates of the game object in the two-dimensional space includes: The relative position coordinates of the game object and the carrier are converted into two-dimensional space, and the relative length of the game object in the relative coordinate system is calculated in the two-dimensional space; Using the relative length of the game object in the relative coordinate system, the world position coordinates of the carrier are moved along the direction of the game object in the world coordinate system to obtain the world position coordinates of the game object in two-dimensional space.
9. The method according to any one of claims 1 to 4, characterized in that: After responding to the control instruction for the game object and controlling the game object to perform an action in the world position coordinate system according to the world position coordinates of the game object, the method further includes: When the target world position coordinates obtained after the game object moves in the game world coordinate system are within the interactive position coordinate range of the carrier, it is determined that the game object and the carrier form a carrier relationship; Accordingly, after controlling the action of the game object in the relative position coordinate system according to the relative position coordinates of the game object and the carrier in response to the control instruction for the game object, the method further includes: When the target relative position coordinates obtained after the game object moves in the carrier are not within the position coordinate range covered by the carrier, it is determined that the game object and the carrier have no bearing relationship.
10. A control device for a game object, characterized in that: include: An acquisition unit, used to acquire the world position coordinates of the game object, wherein the world position coordinates are the position coordinates of the game object in the world coordinate system; A first control unit, configured to control the game object to perform an action in a world coordinate system according to the world position coordinates of the game object in response to a control instruction for the game object; A first conversion unit is used to convert the world position coordinates of the game object into relative position coordinates of the game object and the carrier according to the current orientation information of the carrier when the game object and the carrier form a carrier relationship, wherein the relative position coordinates are the position coordinates of the game object in the relative coordinate system; The second control unit is used to respond to the control instruction of the game object and control the game object to perform an action in the relative position coordinate system according to the relative position coordinates of the game object and the carrier.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for controlling the game object according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for controlling a game object according to any one of claims 1 to 9 are implemented.