Movement control method and device for controlled role, equipment and medium
By introducing stunt moving states in the game, and automatically controlling controlled characters to move quickly in the open world using terrain data, solving the problems of slow movement speed and difficulty in adapting to terrain in the prior art, improving the gaming experience.
Patent Information
- Application Number
- CN202310542720.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2024-11-12
AI Technical Summary
In existing games, controlled characters move slowly during open world exploration and are difficult to adapt to different terrains, resulting in insufficient movement.
The electronic terminal provides a graphical user interface, and enters the stunt movement state in response to player operations, and automatically controls the controlled character to pass the terrain objects based on the terrain data, including determining the terrain objects and terrain data in the virtual scene to adapt to the stunt movement action.
It realizes fast and smooth character movement in the open world, reduces the operating burden of players and improves the gaming experience.
Smart Images

Figure CN118925233A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a method, device, equipment and medium for controlling the movement of a controlled character. Background Art
[0002] As games featuring open world exploration become popular, such as martial arts-style open world exploration games, the vast terrain has placed higher requirements on the movement of the controlled characters.
[0003] In existing games, the movement of controlled characters usually needs to be actively controlled by players, and only simple, unified processing is used. It is difficult to adapt to different terrains and the movement speed is slow, resulting in the controlled characters not exploring the open world smoothly. Summary of the invention
[0004] In view of the above problems, a method, device, equipment and medium for controlling movement of a controlled character are proposed to overcome the above problems or at least partially solve the above problems, including:
[0005] A method for controlling movement of a controlled character, wherein a graphical user interface is provided by an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene by means of the graphical user interface, the method comprising:
[0006] In response to the operation on the controlled character, entering a stunt movement state; wherein the stunt movement state is a state in which the controlled character is controlled to automatically pass through the terrain object according to the terrain data;
[0007] In response to the controlled character moving in the virtual scene in a stunt moving state, determining terrain objects and terrain data of the terrain objects in the virtual scene;
[0008] Control the controlled character to automatically pass through the terrain object with stunt movement actions adapted to the terrain data.
[0009] A mobile control device for a controlled character, which provides a graphical user interface through an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene through the graphical user interface, and the device includes:
[0010] A module for entering a stunt movement state in response to an operation is used to enter a stunt movement state in response to an operation on a controlled character; wherein the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data;
[0011] A terrain object and terrain data determination module, for determining terrain objects and terrain data of the terrain objects in the virtual scene in response to the controlled character moving in the virtual scene in a stunt moving state;
[0012] The module for controlling terrain objects with stunts is used to control the controlled character to automatically pass through the terrain objects with stunt movement actions adapted to the terrain data.
[0013] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the above-mentioned movement control method of a controlled character is implemented.
[0014] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned movement control method of a controlled character is implemented.
[0015] The embodiments of the present invention have the following advantages:
[0016] In an embodiment of the present invention, by responding to an operation on a controlled character, a stunt movement state is entered, and the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data. Then, in response to the movement of the controlled character in the virtual scene in the stunt movement state, the terrain objects in the virtual scene and the terrain data of the terrain objects are determined, and the controlled character is controlled to automatically pass through the terrain objects with a stunt movement action adapted to the terrain data. This realizes the use of stunt movement actions adapted to the terrain data to control the controlled character to automatically move, can adapt to different terrain conditions and can obtain a faster movement speed, thereby improving the smoothness of the controlled character's exploration in the open world. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution of the present invention, the accompanying drawings required for use in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0018] Figure 1 is a flow chart of steps of a method for controlling movement of a controlled character provided by one embodiment of the present invention;
[0019] Figure 2 is a schematic diagram of a mobile scenario provided by an embodiment of the present invention;
[0020] Figure 3 is a flowchart of another method for controlling movement of a controlled character provided by an embodiment of the present invention;
[0021] Figure 4a is another schematic diagram of a climbing trajectory provided by an embodiment of the present invention;
[0022] Figure 4b is another schematic diagram of a climbing trajectory provided by an embodiment of the present invention;
[0023] Figure 4c This is a schematic diagram of a secondary crossing trajectory provided by an embodiment of the present invention;
[0024] Figure 4d This is a schematic diagram of an upward jump trajectory provided by an embodiment of the present invention;
[0025] Figure 4e This is a schematic diagram of an upward jump trajectory provided by an embodiment of the present invention;
[0026] Figure 5 is a flowchart of another method for controlling movement of a controlled character provided by an embodiment of the present invention;
[0027] Figure 6a is a schematic diagram of a mobile scenario provided by an embodiment of the present invention;
[0028] Figure 6b is a schematic diagram of a capsule body provided by an embodiment of the present invention;
[0029] Figure 6c is a schematic diagram of a mobile scenario 1 provided by an embodiment of the present invention;
[0030] Figure 6d is a schematic diagram of a second mobile scenario provided by an embodiment of the present invention;
[0031] Figure 6e is a schematic diagram of a moving direction fusion provided by an embodiment of the present invention;
[0032] Figure 6f is a schematic diagram of a virtual camera adjustment provided by an embodiment of the present invention;
[0033] Figure 7 The present invention is a structural block diagram of a mobile control device for a controlled character provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0035] Reference Figure 1 , showing a step flow chart of a method for controlling the movement of a controlled character provided by an embodiment of the present invention, a graphical user interface is provided through an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene through the graphical user interface.
[0036] Specifically, the following steps may be included:
[0037] Step 101, in response to an operation on a controlled character, entering a stunt movement state; wherein the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data.
[0038] In open world exploration games, such as martial arts-themed open world exploration games, because the terrain is too large, the controlled character sometimes needs to move quickly (such as traveling quickly) or explore in the vertical space. In this case, you can set a stunt movement state. For example, the stunt movement state can be the movement state corresponding to the skill of flying over eaves and walls, which can achieve fast movement and exploration in the vertical space.
[0039] During the game, you can monitor whether the player triggers the specified key, such as long pressing the ctrl key. If you monitor the player triggering the specified key, you can enter the stunt move state.
[0040] For the controlled character, it can be configured with a basic movement state and a stunt movement state. In the basic movement state, the player needs to control all movement operations of the controlled character, while in the stunt movement state, the player can only control the movement direction of the controlled character. As for other actions of the controlled character passing through terrain objects, the game application can automatically control the controlled character according to the terrain data in the virtual scene. Specifically, when the controlled character is in the basic movement state, the player needs to control the movement direction and movement actions (running, jumping, crawling, etc.) of the controlled character; when the controlled character is in the stunt movement state, the player only needs to control the movement direction of the controlled character, and the terminal can automatically control the controlled character according to the terrain data in the movement direction of the controlled character in the virtual scene. The player moves according to the movement actions adapted to the terrain data. By comparison, in the basic movement state, the movement of the controlled character not only requires the player to input more control operations, but also the obstacle avoidance depends on the player's subjective decision, which brings more operation burden to the player. In the stunt movement state, the player only needs to control the movement direction of the controlled character, and other movement controls can be automatically controlled by the terminal according to the terrain data, which greatly reduces the player's operation burden. For example, when the controlled character needs to climb a mountain, in the basic movement state, the player needs to control the movement direction, climbing action, climbing timing, etc. of the controlled character, while in the stunt movement state, the player only needs to control the movement direction of the controlled character, and the climbing action, climbing timing, etc. can all be executed by the terminal.
[0041] It should be noted that, from the perspective of player operation, the basic movement state and the stunt movement state can effectively reduce the player's operating burden, and from the perspective of game performance, the controlled character in the stunt movement state can move in the virtual scene at a higher speed than the basic movement state, and can automatically avoid obstacles in the virtual scene. At the same time, during the movement process, corresponding actions can be performed and corresponding action effects can be added to improve the smoothness of movement and picture performance.
[0042] In the game, for a controlled character in a basic moving state, a player can input an operation for the controlled character in a terminal to make it perform a stunt moving state, so as to simplify the movement control operation of the controlled character in the game and improve the moving speed of the virtual character. Among them, the virtual scene includes different terrains, and the terrain objects where the controlled character is located when entering the stunt moving state may be different. Therefore, when the controlled character enters the stunt moving state from different terrain objects, the controlled character can perform different actions. Specifically, when the controlled character moves in a lateral terrain object (i.e., ground movement), in the basic moving state, it can include walking, running, sprinting, etc., corresponding to different actions and different moving speeds respectively. When entering the stunt moving state, the controlled character can move at a moving speed faster than sprinting, and the present invention does not limit this.
[0043] Optionally, corresponding detection nodes can be configured in the game application to detect game parameters involved in the running of the game application through the corresponding detection nodes, and when it is detected that the conditions are met, corresponding events are executed, including controlling the controlled character to perform corresponding actions.
[0044] In a specific implementation, a state trigger node corresponding to the stunt movement state can be configured. When the player controls the controlled character to enter the stunt movement state from the basic movement state, the terminal can switch the state trigger node from 0 to 1 and control the controlled character to enter the stunt movement state. At the same time, for the controlled character, in the basic movement state, the corresponding basic movement node corresponds to events such as "walk", "run", and "sprint". After entering the stunt movement state, the event corresponding to the basic movement node can be replaced with the "stunt movement" event, so as to control the controlled character to move in the virtual scene according to the movement action corresponding to the stunt movement state. In addition, in the process of moving in the stunt movement state, the terminal can also set the posture control node corresponding to the controlled character to the start state to control the body of the controlled character to tilt forward at a preset angle, simulate the posture of the corresponding point of the body of the controlled character in the case of rapid movement, and improve the authenticity of the movement of the controlled character.
[0045] In an optional embodiment, when the controlled character moves on the lateral terrain object of the virtual scene in a basic movement state, the terminal can enter a stunt movement state in response to an operation on the controlled character, the basic movement state is a state in which the controlled character is controlled to move according to the player's operation on the controlled character, and then the terminal can control the controlled character to move on the lateral terrain object of the virtual scene in a stunt movement state, and the movement speed corresponding to the stunt movement state is greater than the movement speed corresponding to the basic movement state.
[0046] In another optional embodiment, when the controlled character is in the air, the terminal can respond to the operation on the controlled character, such as the player controlling the movement state of the controlled character through a preset physical key or virtual control (for example, a key on the keyboard can be used as a control key to trigger the controlled character to enter the stunt movement state, or a corresponding trigger control can be set in the graphical user interface to control the controlled character to enter the stunt movement state), so that the controlled character enters the stunt movement state and controls the controlled character to perform a sprint action in the movement direction. For the controlled character in the air, there are at least two situations in the process of entering the stunt movement state and performing a sprint action in the movement direction:
[0047] In one case, after the sprint action is completed, there is no longitudinal terrain object in the moving direction of the controlled character to hinder its normal horizontal movement. In this case, after the sprint action is completed, the controlled character can fall from the air to the lateral terrain object in a uniformly accelerated manner, and after landing, move on the lateral terrain object with the action corresponding to the stunt moving state;
[0048] In the second case, when the controlled character is performing a sprint action, the terminal can respond to the process of the controlled character performing the sprint action and the existence of a longitudinal terrain object that meets the preset climbing conditions in the moving direction, and control the controlled character to move from the air to the longitudinal terrain object. Therefore, for the controlled character in the air, the player can control it to enter a stunt movement state, so that the controlled character can move more flexibly and reduce the player's operating burden.
[0049] Optionally, taking the PC game as an example, the player can control the controlled character through the mouse and keyboard. Assuming that the movement state of the controlled character is moved by the ctrl key on the keyboard, in the game, when the player does not touch the ctrl key, the movement of the controlled character is controlled by the direction keys or preset direction keys on the keyboard (W to move forward, A to move left, S to move backward, D to move right), and the controlled character moves in a basic movement state; when the player presses the ctrl key (single point or long press), the movement speed of the controlled character on the horizontal terrain object can be accelerated, and when a vertical terrain object that meets the preset climbing conditions is detected in the moving direction of the controlled character, the terminal can control the controlled character to automatically move from the horizontal terrain object to the vertical terrain object.
[0050] In one example, referring to Figure 2 , shows a schematic diagram of a moving scene provided in an embodiment of the present invention, wherein ① shows a moving trajectory of the controlled character from the ground to the wall when the controlled character moves in a stunt moving state on the ground (i.e., a horizontal terrain object), there is a corresponding wall (i.e., a vertical terrain object) in the moving direction and the wall meets the climbing condition; ② shows a moving trajectory of the controlled character from the air to the wall when the controlled character receives an instruction to enter a stunt moving state in the air, enters the stunt moving state, sprints forward, and detects that there is a corresponding wall (i.e., a vertical terrain object) in the sprinting direction and the wall meets the climbing condition. It should be noted that when the controlled character sprints in the air, if no wall that meets the conditions is detected, the character can move according to the stunt movement state after landing. If a wall is detected again, the character can climb the wall according to process ①. Therefore, for the controlled character that is in the stunt movement state, when it encounters a vertical terrain object during its movement, the terminal can control it to automatically move to the vertical terrain object, so that the player no longer needs to judge the timing of "climbing the wall" and no longer needs to input the corresponding control operation of "climbing the wall", which greatly reduces the player's operating burden.
[0051] Optionally, in the second case above, if the controlled character is in a basic movement state, the player needs to wait for the controlled character to fall to the horizontal terrain object, and then trigger the movement control to control the controlled character to move to the corresponding vertical terrain object, and then control the controlled character to climb up the vertical terrain object with a corresponding climbing action, or trigger the jump control to control the virtual object to cross the vertical terrain object with a corresponding jumping action. When the controlled character is in the air, if the player presses the movement state control key (or movement state control control, such as the ctrl key or the corresponding virtual control, etc.) while keeping the movement joystick (or movement control key) triggered, when controlling the controlled character to enter the stunt movement state, the controlled character in the stunt movement state can perform a corresponding sprint action in the air, approach the vertical terrain object, and when approaching the vertical terrain object and detecting that the conditions are met, move directly from the air to the vertical terrain object. The sprint action and the "wall climbing" action are executed in a continuous manner, which simplifies the player's operation, reduces the player's operating burden, and improves the player's corresponding game immersion when controlling the controlled character to move in the virtual scene.
[0052] In a specific implementation, when entering a stunt movement state from the air and detecting the presence of a longitudinal terrain object that meets the climbing condition in the moving direction, the terminal can control the controlled character to perform a sprint action to move to the first detection point corresponding to the longitudinal terrain object, and control the controlled character to perform a jump action from the first detection point to the longitudinal terrain object, and control the controlled character to move along the longitudinal surface of the longitudinal terrain object. The first detection point can be a jumping point from the air to the longitudinal terrain object. When the controlled character performs a sprint action, it is detected that there is a longitudinal terrain object in the moving direction, and the longitudinal terrain object meets the climbing condition, the terminal can select the first detection point from the moving direction of the controlled character, and then when the controlled character performs a sprint action to move to the first detection point, the terminal is triggered to control the controlled character to move from the first detection point to the longitudinal terrain object, so as to achieve displacement between the air and the longitudinal terrain object.
[0053] In one example, for a controlled character in the air, it may include a controlled character in a jumping state and a controlled character falling from a height. In this case, the air detection node can be used to determine whether the controlled character is in the air, and to determine what kind of animation to select after the controlled character enters the stunt movement state, including an animation of climbing up a wall in the air and an animation of climbing up a wall from the ground after landing in the air.
[0054] In addition, for the detection of terrain data, the terminal can emit multiple first rays in the moving direction of the controlled character, and emit second rays in a preset direction at multiple positions on the first rays, so as to detect the position information of terrain objects within a preset distance in the moving direction of the controlled character through the second rays. When a longitudinal terrain object that meets the climbing conditions is detected within 1 meter in the moving direction of the controlled character based on the ray detection method, an event of moving from the air to the longitudinal terrain object is triggered, and then the terminal can control the controlled character to perform a corresponding action to move from the air to the longitudinal terrain object.
[0055] Optionally, after the controlled character moves to the longitudinal terrain object, the terminal can also perform continuous terrain data detection on the longitudinal terrain object. Specifically, the terminal can emit multiple first rays in the moving direction of the controlled character, and emit second rays in a preset direction at multiple positions on the first rays, thereby detecting the position information of the longitudinal surface of the longitudinal terrain object within a preset distance in the moving direction of the controlled character through the second rays, so as to obtain terrain data corresponding to the longitudinal terrain object, and then control the controlled character to move on the longitudinal terrain object according to the terrain data.
[0056] Step 102, in response to the controlled character moving in the virtual scene in a stunt moving state, determining terrain objects and terrain data of the terrain objects in the virtual scene.
[0057] After entering the stunt movement state, during the movement of the controlled character, the virtual scene in which the controlled character is located can be automatically detected, such as detecting obstacles in front, detecting terrain, etc., and then the terrain objects in the virtual scene and the terrain data of the terrain objects can be determined.
[0058] Step 103, controlling the controlled character to automatically pass through the terrain object with a stunt movement action adapted to the terrain data.
[0059] In order to adapt to different terrain conditions in the virtual scene, multiple stunt movement actions can be set in the stunt movement state. The stunt movement actions can be set according to whether the controlled character mainly moves horizontally or vertically in the virtual scene, such as ground movement, wall movement, and water movement. Among them, ground movement is mainly horizontal movement (due to the existence of obstacles, it will also move vertically for a short time), that is, moving on the ground, wall movement is vertical movement, that is, moving on the wall, and water movement can be a special ground movement, that is, moving on the water surface (it will also move vertically on the water surface, such as jumping on the water surface, which can realize the water light work in martial arts).
[0060] Whether moving horizontally or vertically, there will be different terrains, obstacles and other obstacles. In order to avoid obstacles and adapt to the terrain for fast movement, different stunt movements can be set according to different terrain conditions. Under different stunt movements, the movement of the controlled character and its corresponding animation performance are also different.
[0061] During the movement of the controlled character, the terrain conditions in the virtual environment are detected in real time, such as whether the controlled character will move vertically or horizontally next, or whether it is on the water, and then the stunt movement that matches the terrain data is determined. The controlled character is controlled to automatically pass through the terrain object to achieve fast movement to adapt to different terrain conditions, thereby improving the smoothness of the controlled character's exploration of the open world, and can display different target movement animations according to different target movement strategies, thereby enriching the action performance and enabling more special effects performance.
[0062] It should be noted that since the main function of the stunt movement state is to facilitate the controlled character to move quickly, after entering the stunt movement state, during the movement of the controlled character, controlling the controlled character to enter different movement actions is automatically triggered according to the terrain conditions, and no user operation is required.
[0063] In an embodiment of the present invention, by responding to an operation on a controlled character, a stunt movement state is entered, and the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data. Then, in response to the movement of the controlled character in the virtual scene in the stunt movement state, the terrain objects in the virtual scene and the terrain data of the terrain objects are determined, and the controlled character is controlled to automatically pass through the terrain objects with a stunt movement action adapted to the terrain data. This realizes the use of stunt movement actions adapted to the terrain data to control the controlled character to automatically move, can adapt to different terrain conditions and can obtain a faster movement speed, thereby improving the smoothness of the controlled character's exploration in the open world.
[0064] In open world games, the state of the controlled character can be divided into a standing standby state or a moving state according to whether the position of the controlled character changes. When the controlled character is in the standing standby state, the position of the controlled character does not change, and when the controlled character is in the moving state, the position of the controlled character changes.
[0065] The movement state of the controlled character can be divided into a basic movement state and a stunt movement state according to different movement logics. When the controlled character is in the basic movement state, the first movement logic of the controlled character is: when there is an obstacle in front of the movement, when the player does not intervene in the operation of the controlled character, the controlled character stops moving at the obstacle due to being blocked. When the player intervenes in the operation of the controlled character, the player can operate according to experience to control the controlled character to pass through the obstacle. When the controlled character is in the stunt movement state, the second movement logic of the controlled character is: according to the terrain data of the controlled character's surrounding environment, the controlled character is controlled to automatically pass through the terrain object. For example, when the terrain object is a horizontal terrain object, when there is an obstacle, the controlled character can automatically pass from above or on the surface of the obstacle without relying on the player's operation. Wherein, when the horizontal terrain object can be a ground terrain object or a water surface terrain object.
[0066] It should be noted that, in the embodiment of the present invention, the obstacle may be a protruding obstacle on the lateral terrain object, such as a low building within a preset height, etc.; the obstacle may also be a terrain object.
[0067] In one example, the ground may be uneven due to protruding dirt or stone piles. When the current ground height of the controlled object is lower than the ground height in front of the controlled object, and the height difference meets the preset conditions, the ground object in front can be regarded as an obstacle to the current position of the controlled character.
[0068] In another example, when there is water in front of the controlled character, the water surface object can be regarded as an obstacle to the controlled character; when the controlled character is in a basic movement state, when the player does not intervene in the operation, the controlled character moves from the ground to the water surface, and the controlled character can pass through the water surface object with a water surface specific movement posture, and the water surface specific movement posture can be specifically expressed as a swimming posture of the controlled character in the water; when the controlled character is in a stunt movement state, the controlled character can automatically pass over the water surface terrain.
[0069] It should be noted that the water surface objects in the embodiments of the present invention not only refer to lakes, streams and other water surface objects in virtual games, but also refer to puddles, etc. The water surface objects in the embodiments of the present invention may also include swamps, wetlands and other terrain objects with similar water properties.
[0070] In one example, the basic moving state can be divided into a first basic moving state and a second basic moving state according to the moving speed and the moving posture. When the controlled character moves on a terrain object, without the need to cross obstacles (i.e., blockers), the moving speed and the moving posture of the stunt moving state are different from the moving speed and the moving posture in the basic moving state, wherein the moving speeds of the basic moving state and the stunt moving state are arranged from small to large as follows: first basic moving state < second basic moving state < stunt moving state.
[0071] In the embodiment of the present invention, in the stunt moving state, obstacles in the lateral terrain data can be passed according to the terrain data. Compared with the player climbing over the obstacles based on experience, the obstacles can be climbed over quickly, thereby improving the game fun of the player.
[0072] Reference Figure 3 , showing a step flow chart of a method for controlling the movement of a controlled character provided by an embodiment of the present invention, a graphical user interface is provided through an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene through the graphical user interface.
[0073] Specifically, the following steps may be included:
[0074] Step 301, in response to an operation on a controlled character, enter a stunt movement state, wherein the stunt movement state is a state in which the controlled character is controlled to pass through a terrain object according to terrain data.
[0075] When the controlled character is in the basic movement state, when the player performs a target operation on the basic movement state, the controlled character can be controlled to switch from the basic movement state to the stunt movement state. In the stunt movement state, the controlled character can automatically pass through the obstacle when encountering an obstacle.
[0076] Among them, the target operation may refer to a long press operation on a certain control on the input device. While the player holds down the control, the controlled character is in a stunt movement state. When the player releases the control, the controlled character exits the stunt movement state. After exiting the movement state, the controlled character can switch to a basic movement state or a standing standby state.
[0077] Step 302, in response to the controlled character moving on the lateral terrain object in a stunt moving state, obtaining terrain data of the lateral terrain object, wherein the lateral terrain object is a ground object or a water surface object; and the lateral terrain object includes one or more obstacles.
[0078] After the controlled character enters the special effect movement state, the environment in which the controlled character is located can be monitored during the movement on the lateral terrain object to obtain the terrain data of the lateral terrain object.
[0079] In some embodiments, terrain data may refer to convexity and concavity information in the direction of movement of the controlled character or information on changes in terrain objects (such as from a ground object to a water surface object or from a ground object to a longitudinal terrain object), wherein the convexity and concavity information may be the convexity and concavity caused by the unevenness of the transverse terrain object itself, and the convexity and concavity information may also be the convexity and concavity formed in the virtual scene due to the combination of other objects placed on the transverse terrain object (for example, a table placed on the ground) and the transverse terrain object.
[0080] In one example, terrain data may include, but is not limited to, being characterized by the following types:
[0081] Type 1: There is a first obstacle in the moving direction of the controlled character, wherein the first obstacle is a convex land in the moving direction of the controlled character.
[0082] Type 2: There is a first depression in the moving direction of the controlled character.
[0083] In one example, in the special effect moving state, the first forward detection along the moving direction of the controlled character can be turned on to obtain the terrain data of the controlled character in the moving direction. The first forward detection is used to detect whether there is an obstacle within a first preset distance in front of the controlled character, and the first preset distance can be set according to actual detection requirements.
[0084] In one embodiment of the present invention, obtaining terrain data of a lateral terrain object includes: setting a collision ball that moves with the movement of the controlled character in front of the controlled character, and detecting obstacles at the position of the collision ball to obtain terrain data.
[0085] In practical applications, a collision ball can be set in the moving direction of the controlled character, and the collision ball can move with the movement of the controlled character. During the movement of the controlled character, it is possible to continuously detect whether there are obstacles at the position of the collision ball, thereby realizing the detection of terrain data in the moving direction.
[0086] In an embodiment of the present invention, the method further includes: acquiring movement parameters of the controlled character, and adjusting the positional relationship between the collision ball and the controlled character according to the movement parameters.
[0087] In practical applications, the movement parameters of the controlled character, such as movement speed, movement direction and other movement parameters, can be determined, and then during the movement of the controlled character, the position relationship between the collision ball and the controlled character can be adjusted to better perform the detection of terrain data in the virtual scene.
[0088] In one embodiment of the present invention, the method further includes: obtaining the moving speed of the controlled character, and adjusting the distance between the collision ball and the controlled character according to the magnitude of the moving speed, so that the distance between the collision ball and the controlled character is positively correlated with the magnitude of the moving speed at least within a set distance range.
[0089] In practical applications, the distance between the collision ball and the controlled character can be adjusted according to the moving speed of the controlled character. Specifically, when the controlled character is in a stunt move state, the moving speed of the controlled character can be obtained, and the target distance between the controlled character and the collision ball corresponding to the moving speed can be determined, and then the distance between the collision ball and the controlled character can be adjusted according to the target distance.
[0090] Among them, the distance between the collision ball and the controlled character is positively correlated with the moving speed within the set distance range, that is, within the set distance range, the greater the moving speed of the controlled character, the farther the distance between the collision ball and the controlled character, and the smaller the moving speed of the controlled character, the smaller the distance between the collision ball and the controlled character.
[0091] For example, the distance threshold can be set to 1 meter to 3 meters. When the moving speed is slow to a certain extent, the distance between the collision ball and the controlled character is fixed at 1 meter. When the moving speed of the controlled character decreases further, the detection distance will not be further shortened; when the moving speed increases to a certain extent, the distance between the collision ball and the controlled character is fixed at 3 meters. When the moving speed of the controlled character continues to increase, the detection distance will not be further increased.
[0092] In one embodiment of the present invention, obstacle information at the location of the collision ball is detected to obtain terrain data, including: when it is detected that the collision ball collides with a first obstacle, detecting upward along the first obstacle to determine the height information of the first obstacle, and detecting forward along the current moving direction of the controlled character to determine the width information of the first obstacle.
[0093] In practical applications, after the collision ball detects the obstacle, the height and width of the obstacle can be determined. Specifically, when the collision ball detects the obstacle, the surface of the obstacle can be detected upward and forward along the moving direction to determine the height and width of the obstacle.
[0094] In one example, the collision ball can also detect the type of obstacle, and the obstacle type is used to determine whether the obstacle is a passable obstacle for the controlled object. When it is determined that the controlled object is a passable obstacle, a stunt move action adapted to the terrain data is performed to control the controlled character to pass over or on the surface of the obstacle of the lateral terrain object.
[0095] For example, in a virtual scene, when a controlled character is performing a stunt move on the ground or water, for a higher wall, the virtual character can only climb up the wall but cannot directly climb over it.
[0096] Step 303: Control the controlled character to pass over or on the surface of an obstacle of the lateral terrain object by using a stunt movement action adapted to the terrain data.
[0097] After acquiring the terrain data, a stunt movement action adapted to the terrain data may be determined, and then the stunt movement action may be used to selectively pass over or on the surface of an obstacle of a lateral terrain object.
[0098] In one embodiment of the present invention, controlling the controlled character to pass over or on the surface of an obstacle of a lateral terrain object by a stunt movement action adapted to terrain data may include the following sub-steps:
[0099] Obtaining character parameters of a controlled character; determining a target stunt move action from a plurality of candidate stunt move actions according to terrain data; adjusting the target stunt move action according to the character parameters, and controlling the controlled character to pass over or on the surface of an obstacle of a lateral terrain object according to the adjusted target stunt move action.
[0100] The character parameters include at least one of a character footstep parameter and a character gender parameter.
[0101] The preset animation library may be pre-set with candidate stunt movement actions corresponding to various terrain data, and the candidate stunt movement actions may be used as stunt movement action templates set for the character, so that after determining the terrain data, the target stunt movement action corresponding to the terrain data may be determined.
[0102] The candidate stunt movement actions can be divided into three categories: a vaulting action, an upward jump action, and a downward jump action. Different actions can be set for the vaulting action, the upward jump action, and the downward jump action according to the height.
[0103] For example, the climbing action (Cross animation) can be divided into four animations according to the height: CrossLow, CrossMiddle, CrossMidst and CrossHigh. Each animation is set with an applicable height. When the climbing action is determined to be used, a highly adapted animation can be determined in the preset animation according to the height of the obstacle as the climbing action performed by the controlled character in the process of climbing over the obstacle. Among them, the height of the climbing action is higher than the height of the obstacle.
[0104] JumpUp animation can be divided into three different heights. JumpUp animations below 0.65m are used to speed up the running animation on the ground in stunt moves. Small jumps between 0.65m and 1.5m correspond to stride animations. In practical applications, the jump time and frequency can be calculated based on the footstep parameters of the controlled character. JumpUp animations above 1.5m correspond to jump animations.
[0105] The jumping action can be divided into acceleration running, small jumping animation, 1.8m-4m jumping animation, 4m-10m jumping animation, and leap of faith over 10m.
[0106] In actual applications, the vaulting action, the upward jump action, and the downward jump action can also set the animation of the controlled character in different vaulting directions of the left and right feet.
[0107] When the first obstacle is detected, the action type is determined according to the terrain information of the obstacle and the width information of the first size parameter (wherein the action type may include a climbing action, an upward jump action, and a downward jump action), and then, based on the height information, a candidate stunt movement action (i.e., animation) matching the height information can be determined from the corresponding action type, and then the candidate stunt movement action with different climbing directions can be selected according to the left and right foot states of the controlled character.
[0108] In practical applications, the special effect movement action performed by the controlled character can be a target special effect movement action obtained by adaptively adjusting the preset candidate special effect movement actions in combination with the state of the controlled character itself and the environment in which the controlled character is located.
[0109] It should be noted that in actual applications, different candidate stunt movement actions can be pre-set according to different scenes, so that when the controlled character is in a stunt movement state, the corresponding candidate stunt movement actions can be used in combination with the scene to enrich the action performance of the controlled character in the virtual scene.
[0110] After determining the target stunt movement, the target stunt movement can be adjusted according to the character parameters to obtain the target stunt movement corresponding to the controlled character. Specifically, the relative angle position of the current footsteps of the controlled character can be matched to the footstep position of the target stunt movement, and the start time of the target stunt movement can be changed to achieve the connection of the footsteps and avoid slipping. The character gender parameter is used to switch between male and female characters.
[0111] In one embodiment of the present invention, when the controlled character moves on the lateral terrain object in a stunt move state, the distance between the virtual camera in the virtual scene and the controlled character is increased.
[0112] In actual applications, when the controlled character moves on a horizontal terrain object in a stunt move state, the movement speed of the controlled character can be faster than the movement speed in the basic move state. The distance between the virtual camera in the virtual scene and the controlled character can be increased to increase the field of view of the lens and adjust the focal length to be smaller, making it easier for players to see the terrain clearly and perform operations.
[0113] In one example, after increasing the distance between the virtual camera and the controlled character in the virtual scene, the virtual camera is controlled to gradually follow the controlled character, thereby enhancing the feeling of fast movement through the lens of the virtual camera.
[0114] In one embodiment of the present invention, it also includes: when the controlled character moves on the lateral terrain object in a stunt move state, determining the current angle of the virtual camera in the virtual scene; when the current angle is the side angle of the controlled object, adjusting the current angle of the virtual camera to the back angle of the controlled character.
[0115] In actual applications, when the virtual camera faces the side of the controlled character, due to the limited viewing angle, the lens of the virtual camera can be automatically and gradually turned to the back of the controlled character to facilitate player operation.
[0116] In one embodiment of the present invention, the method further includes: when the controlled character is in a turning state or a stationary state, stopping acquiring terrain data in the lateral terrain object.
[0117] When the controlled character is in a stunt moving state, it can be determined whether the controlled character is in a turning or stationary state. When it is determined that the controlled character is in a turning or stationary state, the acquisition of terrain data in the lateral terrain object can be stopped.
[0118] In one embodiment of the present invention, after acquiring the terrain data of the lateral terrain object, it also includes: in the process of controlling the controlled character to pass over or on the surface of an obstacle of the lateral terrain object with a stunt move action adapted to the terrain data, in response to the controlled character exiting the stunt move state, controlling the controlled character to keep moving when detecting that the controlled character is in the air.
[0119] In actual applications, when exiting the stunt move state, the controlled character may be in a standing still state, and when the controlled character exits the stunt move state while passing over or on the surface of an obstacle of a lateral terrain object, if the controlled character is in a suspended state, the controlled character can be controlled to fall from the air, that is, to keep moving.
[0120] In one embodiment of the present invention, when a controlled character moves on a lateral terrain object in a stunt moving state, a detection ray is emitted along a preset ray direction with the controlled character as the ray emission point to determine material information of the collision position of the detection ray; the category of the lateral terrain object is determined based on the material information, and the category includes at least ground objects and water objects.
[0121] Through ray detection, it can be determined whether the object in front of the controlled character is a ground object or a water object.
[0122] When the terrain data representation switches from a ground object to a water surface object, it is possible to pass over or on the water surface with a stunt move action adapted to the water surface object.
[0123] In an embodiment of the present invention, in response to an operation on a controlled character, a stunt movement state is entered, wherein the stunt movement state is a state in which the controlled character is controlled to pass through a terrain object according to terrain data; in response to the movement of the controlled character on a lateral terrain object in the stunt movement state, terrain data of the lateral terrain object is obtained, wherein the lateral terrain object is a ground object or a water surface object; the lateral terrain object includes one or more obstacles; the controlled character is controlled to pass over or on the surface of the obstacles of the lateral terrain object by a stunt movement action adapted to the terrain data, thereby achieving that in the stunt movement state, obstacles in the lateral terrain data can be passed according to the terrain data, and obstacles can be quickly climbed over compared to players climbing over obstacles based on experience, thereby increasing the game fun of players.
[0124] In one embodiment of the present invention, controlling a controlled character to pass over or on a surface of an obstacle of a lateral terrain object by using a stunt movement action adapted to terrain data includes:
[0125] When the terrain data indicates that there is a first obstacle in the moving direction of the controlled character, a first size parameter of the first obstacle is determined; and the controlled character is controlled to pass over or on the surface of the first obstacle with a stunt movement action adapted to the first size parameter.
[0126] Among them, the first obstacle is the convex ground in front of the controlled character. The convex ground can be the convexity and concavity caused by the unevenness of the ground object itself. The convexity and concavity information can also be the convexity and concavity formed in the virtual scene due to the ground object or other objects placed on the water surface (for example, a table placed on the ground or a boat on the water surface).
[0127] In one example, the stunt movement action for the first obstacle may specifically be a jumping action, which may include a climbing action over the first obstacle, an upward jumping action to jump to the first obstacle, and a downward jumping action.
[0128] In one embodiment of the present invention, the first size parameter includes at least height information and width information of the first obstacle, the width information of the first obstacle is the width along the moving direction of the controlled character, and the controlled character is controlled to pass over the top or surface of the first obstacle by a stunt moving action adapted to the height information. Specifically, when the width information is less than a preset width threshold, the controlled character is controlled to pass over the first obstacle from above the first obstacle according to a jumping action adapted to the height information.
[0129] In practical applications, different heights may correspond to different stunt movements. After determining the height information of the first obstacle, the appropriate stunt movement may be determined according to the height information, and then the controlled character may be controlled to pass over or on the surface of the first obstacle in a selected manner.
[0130] When the width information is less than a preset width threshold, the controlled character can directly jump over the first obstacle from above the first obstacle through a highly adapted jumping action, and the special effect moving action used in this process is a climbing action.
[0131] In one embodiment of the present invention, the method further includes: during the jumping process of the controlled character, when the controlled character moves to a first climbing position, starting a second forward detection along the moving direction of the controlled character to detect a second obstacle, wherein the first climbing position is a position on the climbing trajectory of the controlled character climbing over the first obstacle.
[0132] In actual application, the controlled character can use stunt movements to perform climbing movements, and the stunt movements can constitute a climbing trajectory of the controlled character. When the controlled character moves to the first climbing position according to the climbing trajectory, the second forward detection can be triggered to detect the second obstacle along the moving direction of the controlled character.
[0133] In one example, the preset distance of the second forward detection is smaller than the detection distance of the first forward detection. For example, the detection distance of the second forward detection may be 1 m, and the detection distance of the first forward detection may be 3 m.
[0134] The second forward detection can detect the distance to the obstacle, and when an obstacle is detected, it will trigger the aerial wall climbing; the first forward detection can detect the distance to the obstacle, and when an obstacle is detected, the size parameters of the obstacle can be determined, so as to perform the jumping action against the obstacle again in the air according to the size parameters.
[0135] It should be noted that the first crossing position can be set according to actual needs, and no excessive restrictions are imposed on this in the embodiment of the present invention.
[0136] like Figure 4a The figure shows a schematic diagram of a climbing trajectory: First, the climbing trajectory of the climbing action is divided into three sections, the jump section (i.e. Figure 4a The first stage consists of the track that is crossed before point B), the loop stage (i.e. Figure 4a The 2 stages from point B to point C), the end segment (i.e. Figure 4a 3 stages after point C).
[0137] Among them, the second forward detection can be enabled at point A in the jump segment (i.e., the first climbing position), and the detection is a wall climbing detection. When an obstacle is detected, the wall climbing action can be executed.
[0138] At the end of the jump segment, the speed information of the jump can be obtained at point B, and the loop can be switched based on the speed information to achieve the connection between different stages of the climbing action.
[0139] In actual applications, different loop animations are set in combination with parameters such as the height of the controlled character from the ground and the action type to enrich the actions of the controlled character.
[0140] When the controlled character moves from point B to point C, the loop segment can be connected to the end stage when the controlled character lands.
[0141] After reaching point B, the action selection of the controlled character after landing is determined according to the real-time status of the controlled character. The action of the controlled character after landing may include standing still after landing or continuing to run after landing. When continuing to run after landing is chosen, the character continues to run with special effects moving actions and detects terrain data with the first forward detection during the running process.
[0142] In one embodiment of the present invention, the method further includes: when the controlled character moves to a second climbing position, turning off a first forward detection for acquiring terrain data, wherein the second climbing position is a position before the first climbing position on the climbing trajectory, and a detection distance of the first forward detection is greater than a detection distance of the second forward detection.
[0143] In practical applications, when the controlled character moves to the second climbing position according to the climbing trajectory, the first forward detection for obtaining terrain data can be turned off to avoid confusion in the entire climbing trajectory due to the controlled character continuously detecting the first obstacle by the first forward detection.
[0144] When the controlled character moves along the climbing trajectory, the controlled character can first turn off the long-distance first forward detection at the second climbing position, and then turn on the short-distance second forward detection at the first climbing position.
[0145] In one embodiment of the present invention, the method further includes: when the controlled character moves to a third flipping position, turning off the second forward detection and turning on the first forward detection along the moving direction of the controlled character, the third flipping position being a position at a preset height in the falling stage of the flipping trajectory after the first flipping position.
[0146] In actual application, on the climbing trajectory, the controlled character passes through the second climbing position, the first climbing position, and the third climbing position in sequence. When moving to the third climbing position, the short-distance first forward detection can be turned off and the long-distance first forward detection can be turned on at the same time.
[0147] In one embodiment of the present invention, the method further includes: if the controlled character detects a second obstacle in the moving direction of the controlled character after starting the first forward detection at the third climbing position, determining a second size parameter of the second obstacle; and controlling the controlled character to pass over or on the surface of the second obstacle with a stunt movement action adapted to the second size parameter.
[0148] The second size parameter may include relative height information and / or thickness information of the second obstacle, and the relative height information is the relative height information of the second obstacle relative to the baseline with the current height of the controlled character as the baseline.
[0149] The way in which the controlled character passes through the second obstacle is similar to the description of passing through the first obstacle, and will not be described in detail here.
[0150] In one embodiment of the present invention, the method further includes: if the controlled character turns on the second forward movement at the first climbing position and detects a second obstacle, controlling the controlled character to perform a sprint action in the moving direction, and when the second obstacle meets a preset climbing condition, moving from the air to the longitudinal terrain object formed by the second obstacle.
[0151] In actual application, when the controlled character detects the second obstacle forward, the controlled character performs a sprint action to prepare to climb the wall. When the second obstacle meets the preset climbing conditions, the controlled character moves from the air to the longitudinal terrain object formed by the second obstacle to achieve climbing the wall in the air.
[0152] When the controlled character performs a climbing action, the controlled character is in an air-borne state. The controlled character in a stunt moving state can perform a corresponding sprint action in the air, approaching the longitudinal terrain object (i.e., the second obstacle), and when approaching the longitudinal terrain object and detecting that the conditions are met, directly move from the air to the longitudinal terrain object. The sprint action and the "wall climbing" action are executed continuously, which simplifies the player's operation, reduces the player's operating burden, and improves the player's corresponding sense of game immersion when controlling the controlled character to move in the virtual scene.
[0153] In a specific implementation, when entering a stunt movement state from the air and detecting the presence of a longitudinal terrain object that meets the climbing condition in the moving direction, the terminal can control the controlled character to perform a sprint action to move to the first detection point corresponding to the longitudinal terrain object, and control the controlled character to perform a jump action from the first detection point to the longitudinal terrain object, and control the controlled character to move along the longitudinal surface of the longitudinal terrain object. The first detection point can be a jumping point from the air to the longitudinal terrain object. When the controlled character performs a sprint action, it is detected that there is a longitudinal terrain object in the moving direction, and the longitudinal terrain object meets the climbing condition, the terminal can select the first detection point from the moving direction of the controlled character, and then when the controlled character performs a sprint action to move to the first detection point, the terminal is triggered to control the controlled character to move from the first detection point to the longitudinal terrain object, so as to achieve displacement between the air and the longitudinal terrain object.
[0154] In one embodiment of the present invention, the method further includes: when the controlled character moves to a fourth climbing position, downwardly detecting the current distance of the controlled character from the ground, wherein the fourth climbing position is a position after the highest point on the climbing trajectory of the controlled character climbing over the first obstacle.
[0155] Among them, the fourth flipping position can be a flipping position before the third flipping position, which is used to detect the distance of the controlled character from the ground. When the distance from the ground is the first distance from the ground, it is determined that the controlled character has moved to the third flipping position, triggering the execution of closing the second forward detection and opening the first forward detection.
[0156] In one example, the fourth climbing position is a position after the highest point on the climbing trajectory of the controlled character climbing over the first obstacle.
[0157] In an embodiment of the present invention, the method further includes: when it is detected that the current distance from the ground is a second distance from the ground, controlling the controlled object to perform a landing action.
[0158] In actual applications, when it is detected downward that the controlled character is at the second ground distance, it is determined that the controlled character is about to land. When the controlled character is about to land, the preset landing action can be performed, and the landing action can be the action of standing still after landing, or the action of continuing to run after landing, so as to connect the entire special effects moving action of the controlled character landing from the air.
[0159] like Figure 4bThe figure shows another schematic diagram of the climbing trajectory, wherein point D is the second climbing position, and the first forward detection is turned off at point D; point A is the first climbing position, and the second forward detection is turned on at point A; point E corresponds to the third climbing position, and the second forward detection is turned off at point E, and the first forward detection is turned on. Point E corresponds to the first distance from the ground (such as set at 1.7m), and the fourth climbing position is set before point E. The downward detection is turned on at the fourth climbing position to determine the distance from the ground. When it is detected that the controlled character is at the second distance from the ground (such as 0.4m), it is used to connect the loop segment to the end to determine that the landing action is del (standing still) or run (running).
[0160] like Figure 4c It is a schematic diagram of a secondary climb. When the second obstacle is detected by the first forward detection at point E, the climb over the second obstacle is performed again. If the second obstacle is detected by the second forward detection performed between point A and point E, the aerial wall climbing is performed.
[0161] In one embodiment of the present invention, after controlling the controlled character to climb over the first obstacle object from above the first obstacle, the method further includes: when the controlled character is in a moving state, acquiring terrain data of a lateral terrain object.
[0162] In practical applications, after the climbing action is completed, at the landing point, if the controlled object is in a moving state, the first forward detection can be continued to obtain the terrain data of the lateral terrain object.
[0163] When the controlled character completes the climbing action and is in a standing still state at the landing point, the first forward detection is turned off.
[0164] In one example, when the climbing action is completed and the controlled character is in a moving state, the footstep synchronization track can be performed.
[0165] In one embodiment of the present invention, the first size parameter includes height information and width information of the first obstacle, and controlling the controlled character to pass over or on the surface of the first obstacle with a stunt move action adapted to the height information may include: when the width information is not less than a preset width threshold, controlling the controlled character to jump from the surface of the lateral terrain object to the first obstacle according to a jumping action adapted to the height information, so as to pass through the first obstacle from the surface of the first obstacle.
[0166] In actual applications, when the width of the first obstacle is not less than the preset width threshold, that is, when the first obstacle is too wide, it is difficult for the controlled character to directly climb over it. Therefore, an adaptive jumping action can be determined according to the height information to control the controlled character to jump from the current position to the first obstacle, so that it can pass through the surface of the first obstacle.
[0167] like Figure 4d, which is a schematic diagram of a jumping trajectory in an embodiment of the present invention. The entire jumping process can be divided into running before jumping, jumping and running after jumping.
[0168] In an embodiment of the present invention, in response to an operation on a controlled character, a stunt movement state is entered, wherein the stunt movement state is a state in which the controlled character is controlled to pass through a terrain object according to terrain data; in response to the controlled character moving on a lateral terrain object in a stunt movement state, terrain data of the lateral terrain object is obtained, wherein the lateral terrain object is a ground object or a water surface object; the lateral terrain object includes one or more obstacles; when the terrain data indicates that there is a first obstacle in the moving direction of the controlled character, a first size parameter of the first obstacle is determined; and the controlled character is controlled to pass above or on the surface of the first obstacle with a stunt movement action adapted to the first size parameter. In the stunt movement state, obstacles in the lateral terrain data can be passed according to the terrain data, and obstacles can be quickly crossed compared to players climbing over obstacles based on experience, thereby improving the game fun of players.
[0169] In one embodiment of the present invention, controlling a controlled character to pass over or on a surface of an obstacle of a lateral terrain object by using a stunt movement action adapted to terrain data includes:
[0170] When the terrain data indicates that there is a first depression in the moving direction of the controlled character, the height information between the current position of the controlled character and the first depression is determined; and the controlled character is controlled to jump down from the current position to the first depression according to a jumping action adapted to the height information.
[0171] Among them, when the front position of the controlled character is concave relative to the current position of the controlled character, and the height difference between the front position of the controlled character and the current position of the controlled character meets the preset conditions, it is determined that the terrain data represents the existence of a first depression in the moving direction of the controlled character, wherein the preset conditions can be set according to the implementation scenario, and no excessive restrictions are made on this in the embodiments of the present invention.
[0172] The first concave land may include but is not limited to the following types:
[0173] Type 1: When the controlled character is on flat ground or water, the first concave area in the front of the moving direction may be a sunken land or water surface (for example, a waterfall).
[0174] Type 2: When the controlled character is located on the first obstacle (due to a ground object or other objects placed on the water surface forming a convex land, for example, a table placed on the ground or a boat on the water surface), the concave land is flat land or water surface.
[0175] After determining the height information, a jumping action adapted to the height information can be determined, and then the controlled character is controlled to jump down to the first concave area according to the jumping action. Figure 4eShown is a schematic diagram of a down jump trajectory in an embodiment of the present invention.
[0176] In one example, during the down-jump process, since the controlled character is suspended in the air, the detection mode can be switched to the second forward detection, that is, the first forward detection is turned off and the second forward detection is turned on.
[0177] When the second obstacle is detected forward, when the controlled character moves along the downward jumping trajectory until it touches the second obstacle, the control controls the controlled character to perform a sprint action in the moving direction, and when the second obstacle meets the preset climbing conditions, moves from the air to the longitudinal terrain object formed by the second obstacle, that is, climbs the wall in the air.
[0178] When the controlled character's distance from the ground is the first distance from the ground, the first forward detection can be turned on again. When a second obstacle in the moving direction of the controlled character is detected after the first forward detection is turned on, the second size parameter of the second obstacle is determined; and the controlled character is controlled to pass over or on the surface of the second obstacle with a stunt move action adapted to the second size parameter.
[0179] In one example, a different turning time may be set for each jump at a different height, and the higher the jump height, the longer the turning time.
[0180] In an embodiment of the present invention, in response to an operation on a controlled character, a stunt movement state is entered, wherein the stunt movement state is a state in which the controlled character is controlled to pass through a terrain object according to terrain data; in response to the controlled character moving on a lateral terrain object in a stunt movement state, terrain data of the lateral terrain object is obtained, wherein the lateral terrain object is a ground object or a water surface object; the lateral terrain object includes one or more obstacles; when the terrain data indicates that there is a first concave land in the moving direction of the controlled character, the height information of the current position of the controlled character and the first concave land is determined; according to a jumping action adapted to the height information, the controlled character is controlled to jump down from the current position to the first concave land. In the stunt movement state, when encountering the first concave land, a downward jump is performed, and compared with the player climbing over the obstacle based on experience, the obstacle can be quickly climbed over, thereby improving the game fun of the player.
[0181] In open world games, a vast game world can be presented to players, where players can freely explore the game content in the game world, greatly enriching the game content and improving the playability of the game. For such games, the mainstream gameplay is to explore and collect the game world. During the exploration and collection process, the different terrains in the game world bring rich and diverse changes to the players, but also easily increase the corresponding operational burden on the players. That is, the players need to perform different mobile control operations according to the changes in the terrain during the movement of the controlled character. Therefore, how to simplify the player's control of the movement of the controlled character according to the terrain and enhance the player's sense of involvement in the movement of the controlled character in the game world has become the main influencing factor for the player to obtain a good game experience. For example, when the player needs to control the controlled character to move to the destination, if the movement control of the controlled character can be simplified, it will undoubtedly bring a good game experience to the player. Among them, in open world games, there are various terrain objects, such as grasslands, plains, hills, mountains, forests, buildings, etc. The controlled characters can move in the horizontal direction of the game scene (such as running on the grassland, etc.), and can also move in the vertical direction of the game scene (such as climbing on the wall of the building, etc.). However, in the vertical exploration process (such as climbing walls, cliffs, etc.), the controlled characters can move in the vertical exploration through corresponding climbing actions. In this process, the whole process depends on the player's autonomous operation. The player not only needs to judge the operation timing (such as when encountering an obstacle, it is necessary to judge when to input the corresponding operation to control the controlled character to cross the obstacle, etc.), which easily brings a great burden to the player's game operation, but also the controlled character moves slowly, which greatly reduces the player's exploration efficiency of the game world.
[0182] In this regard, in the game application of the present invention, for the controlled character controlled by the player, it can be configured with different basic movement states and stunt movement states. In the basic movement state, the player needs to control all movement operations of the controlled character, while in the stunt movement state, the player can only control the movement direction of the controlled character, and for other actions of the controlled character passing through terrain objects, the game application can automatically control the controlled character according to the terrain data in the virtual scene. Specifically, during the game process, the terminal can enter the stunt movement state in response to the operation on the controlled character. When the controlled character moves on the lateral terrain object of the virtual scene in the stunt movement state, in response to the existence of a longitudinal terrain object that meets the preset climbing condition in the movement direction of the controlled character, the controlled character is controlled to move from the lateral terrain object of the virtual scene to the longitudinal terrain object, that is, after entering the stunt movement state, when it is detected that the condition meets the preset climbing condition, the controlled character is controlled to move from the lateral terrain object of the virtual scene to the longitudinal terrain object. When there is a longitudinal terrain object with certain conditions, the controlled character can automatically move from the transverse terrain object to the longitudinal terrain object. During the displacement process, the player does not need to perform other operations except for controlling the moving direction, which effectively reduces the player's operating burden. At the same time, the terminal can also respond to the movement of the controlled character on the longitudinal surface of the longitudinal terrain object in a stunt moving state, obtain the terrain data of the longitudinal surface, and control the controlled character to move along the longitudinal surface of the longitudinal terrain object with a moving action adapted to the terrain data. In addition to controlling the displacement changes of the controlled character on different terrain objects, when the movement action on the corresponding terrain object changes, the terminal can also control the controlled character to move on the corresponding terrain object based on the terrain data, further reducing the player's operating burden, simplifying the player's control method for the controlled character, allowing the player to focus more on other content of the game and enhancing the player's sense of game immersion and other game experiences.
[0183] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, some technical features involved in the embodiments of the present invention are explained and illustrated below:
[0184] Virtual scenes use devices to output scenes that are different from the real world. With the help of naked eyes or devices, visual perception of virtual scenes can be formed. For example, two-dimensional images are output through a display screen, and three-dimensional images are output through stereo display technologies such as stereo projection, virtual reality and augmented reality. In addition, various perceptions that simulate the real world, such as auditory perception, tactile perception, olfactory perception and motion perception, can also be formed through various possible hardware.
[0185] In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed can be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0186] A controlled character is an object that interacts in a virtual scene. It is controlled by a user or a robot program (for example, an artificial intelligence-based robot program) and can be still, move, and perform various behaviors in a virtual scene, such as various characters in a game.
[0187] Terrain objects, which can be objects of the terrain constituting the game scene, include grasslands, plains, hills, mountains, forests, buildings, etc. In particular, terrain objects can also include obstacle objects located in the aforementioned terrain objects, such as boxes and stones located on the ground. Among them, terrain objects can be divided into horizontal terrain objects and vertical terrain objects. Horizontal terrain objects include terrain objects that move in a way that does not require overcoming gravity, such as hills, grasslands, plains and other horizontal or quasi-horizontal terrains; vertical terrain objects include terrain objects that need to move in a way that overcomes gravity with specific actions, such as the longitudinal surface of a mountain, trees, walls of a building, etc. The controlled character needs to perform corresponding actions (such as climbing, etc.) to achieve movement in the horizontal terrain objects. For vertical terrain objects, the controlled character's hands are involved in the process of climbing (inverse kinematics), and the movement needs to be carried out from the hands to the shoulders. In this process, the terminal needs to perform complex calculations, which increases the performance overhead of the terminal. In addition, this simple climbing action has a slow movement speed. When encountering complex terrain, the controlled character needs to be controlled to perform corresponding actions according to the player's judgment to pass the corresponding terrain, which brings a great operational burden to the player.
[0188] Reference Figure 5 , shows a flow chart of steps of another method for controlling movement of a controlled character provided by an embodiment of the present invention, wherein a graphical user interface is provided by an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene through the graphical user interface, and specifically may include the following steps:
[0189] Step 501, in response to an operation on a controlled character, entering a stunt movement state, wherein the stunt movement state is a state in which the controlled character is controlled to pass through a terrain object according to terrain data.
[0190] Optionally, the electronic terminal may include a mobile terminal and a PC terminal, etc., and a game application may be stored in the local terminal device. It is understandable that the terminal device may also be a cloud client, and the corresponding game functions may be provided in the game application. In the embodiment of the present invention, the electronic terminal is a PC terminal, and the player may control the controlled character through a mouse, keyboard, or game controller, etc., for illustrative explanation, and the present invention is not limited to this.
[0191] Step 502, when the controlled character moves on the lateral terrain object of the virtual scene in a stunt moving state, in response to the existence of a longitudinal terrain object that meets a preset climbing condition in the moving direction of the controlled character, the controlled character is controlled to move from the lateral terrain object of the virtual scene to the longitudinal terrain object.
[0192] Optionally, in addition to the above-mentioned situation of entering the stunt movement state from the air and moving to the longitudinal terrain object from the air, when the controlled character moves on the lateral terrain object of the virtual scene in the stunt movement state, the terminal can also detect the terrain in the moving direction of the controlled character. When it is detected that there is a longitudinal terrain object that meets the preset climbing conditions in the moving direction, the terminal can control the controlled character to move from the lateral terrain object of the virtual scene to the longitudinal terrain object in response to the presence of the longitudinal terrain object that meets the preset climbing conditions in the moving direction of the controlled character, and then further perform terrain detection on the longitudinal surface of the longitudinal terrain object to control the controlled character to move on the longitudinal terrain object according to the corresponding terrain data.
[0193] In a specific implementation, the terminal can control the controlled character to move from the horizontal terrain object of the virtual scene to the vertical terrain object in response to the presence of a vertical terrain object within a preset distance threshold in the direction of movement of the controlled character, and the height of the vertical terrain object is greater than or equal to the preset height threshold. After determining that the controlled character can move from the horizontal terrain object to the vertical terrain object, the terminal can obtain a posture tilt angle for jumping to the vertical terrain object in response to the controlled character moving to the second detection point of the horizontal terrain object. The second detection point is the jumping point from the horizontal terrain object to the vertical terrain object. Then, based on the relative distance between the second detection point and the vertical terrain object, and the posture tilt angle, the attachment point of the controlled character is determined from the vertical terrain object. Then, the controlled character is controlled to jump from the second detection point to the attachment point at the posture tilt angle. In this process, when the controlled character moves to the second detection point, the controlled character is still a certain distance away from the vertical terrain object. However, for the controlled character in the stunt moving state, the player does not need to control the controlled character to move from the horizontal terrain object to the vertical terrain object, but the terminal can directly "pull" the controlled character from the position of the second detection point to the attachment point on the vertical terrain object (including controlling the controlled character to jump from the second detection point to the attachment point, flying from the second detection point to the attachment point, etc.), so as to realize automatic control of the controlled character from the horizontal terrain object to the vertical terrain object according to the terrain change, and automatically control the movement of the controlled character on different terrain objects through the terrain change, which simplifies the player's control over the controlled character and strengthens the player's sense of involvement in the movement of the controlled character in the virtual scene. Among them, the posture tilt angle can be the angle at which the controlled character moves from the horizontal terrain object to the vertical terrain object in the corresponding moving direction. For example, when the posture tilt angle is 30 degrees, the controlled character can jump from the horizontal terrain object to the vertical terrain object in the moving direction with an angle of 30 degrees with the horizontal line.
[0194] In one example, for the process of a controlled character moving from a horizontal terrain object to a vertical terrain object, it can move from the horizontal terrain object to the vertical terrain object through different moving directions (including left, right and front) (hereinafter referred to as a "wall-going event"), and detect through the corresponding wall-going node, so as to perform mapping selection according to the longitudinal surface of the vertical terrain object corresponding to the orientation of the controlled character. Specifically, for the "wall climbing event", it may involve wall detection nodes, wall climbing nodes, animation connection nodes, speed control nodes, and event nodes, etc. Then, when the controlled character triggers the "wall climbing event" on the horizontal terrain object with Run / Rush, the terminal can detect the corresponding "wall climbing event" through the wall detection node, enter the wall climbing node of the "wall climbing" fusion tree, and play the animation corresponding to the wall climbing node. For the animation playback process, the wall climbing animation can be divided into two sections and connected through the animation connection node. The first section is the wall climbing section, and the second section is the action stretching section. The speed control node controls the controlled character to "climb the wall" at a corresponding speed in the action stretching section to ensure that the controlled character can touch the longitudinal surface of the longitudinal terrain object at the position of climbing the wall. At the same time, the event node triggers the selection connection between the first animation and the second animation, and the second animation can be controlled by a custom event to control the animation to jump to the longitudinal surface movement and stop climbing state, etc., to indicate that the animation needs to jump when it plays to the last frame. Reference Figure 6a , shows a schematic diagram of a moving scene provided in an embodiment of the present invention. When a longitudinal terrain object satisfying the climbing condition is detected in the moving direction of the controlled character, by determining the corresponding detection point and the attachment point, when the controlled character moves to the detection point A, the controlled character is triggered to be controlled to jump from the detection point to the attachment point B with a preset posture tilt angle as the jumping direction, thereby realizing the movement of the controlled character from the horizontal terrain object to the longitudinal terrain object.
[0195] In addition, in the above process, when the controlled character enters the stunt movement state with Run / Rush and encounters a vertical terrain object during the movement, the camera will automatically turn to the back of the controlled character, but when the picture perspective encounters a vertical terrain object with a perspective facing the controlled character, the camera will not rotate, and the controlled character will flip backwards and cannot move from the horizontal terrain object to the vertical terrain object.
[0196] In an optional embodiment, in addition to configuring the corresponding execution node to detect the longitudinal terrain object, the virtual scene can also be spatially divided, and a capsule corresponding to the controlled character and the divided virtual scene are compared and detected to determine whether there is a corresponding longitudinal terrain object in the moving direction of the controlled character. For example, if there is a corresponding space cube (that is, a cube corresponding to the longitudinal terrain object) within 2 meters in front of the capsule, and the height of the space cube is greater than or equal to the preset height threshold, it can be determined that there is a longitudinal terrain object that meets the climbing conditions in the moving direction of the controlled character. Figure 6b , which shows a schematic diagram of a capsule provided in an embodiment of the present invention, divides the virtual scene into different space cubes, then Figure 6b The game scene is displayed in cross-section, each square can represent a space cube (unit cube, one unit is 1 meter), and the capsule (wrapped by a cuboid) can represent the position of the controlled character in the game scene. For ①, it represents that the controlled character is located on the longitudinal terrain object, and the thickness of the longitudinal terrain object is 1 meter; for ②, it represents that the controlled character is located on the longitudinal terrain object, and the farthest distance between the longitudinal terrain object and the controlled character is 3 meters, and the closest distance is 2 meters; for ③, it represents that the controlled character is located on the longitudinal terrain object, and the farthest distance between the longitudinal terrain object and the controlled character is 2 meters, and the closest distance is 1 meter; for ④, it only represents the controlled character. As the terrain object changes, the positional relationship between the controlled character and the virtual scene can change accordingly. Embodiments of the present invention include but are not limited to the above examples. Among them, for terrain detection, the grid can be divided according to the requirements of long distance and low precision, and each grid on the wall can be judged to obtain the information of each grid up, down, left and right along the wall. Its animation performance can spell out the movement trajectory and state according to the terrain and the movement direction of the controlled character. The close-range ray obtains the key position and IK (Inverse Kinematics) adjusts the posture. Its connectivity in each direction can be configured as 6 connected directions, etc., and its distance from obstacles can be configured as 4m. As an example, when performing space estimation, it can detect forward and upward, and its detection distance can be 10m, and it can scroll and refresh, and through real-time calculation of rays, the capsule height can be configured to be 2m, the upward detection distance is 2.4m, and the left and right detection distances are 1.5m.
[0197] When the controlled character moves to the longitudinal terrain object, the terminal can respond to receiving the movement control instruction for the virtual object and control the controlled character to move on the longitudinal terrain object. It should be noted that the movement control instruction can be an instruction for controlling the movement direction of the controlled character. When the player stops inputting the movement control instruction, the terminal can respond to the end of the movement control instruction and control the controlled character to stay on the longitudinal terrain object. In the stunt movement state, the terminal can remove the gravity of the controlled character in the virtual scene to control the controlled character to stay on the longitudinal terrain object, so that the controlled character can stay on the longitudinal terrain object in a similar "adsorption" manner.
[0198] Step 503, in response to the controlled character moving on the longitudinal surface of the longitudinal terrain object in a stunt moving state, obtaining terrain data of the longitudinal surface, and controlling the controlled character to move along the longitudinal surface of the longitudinal terrain object with a moving action adapted to the terrain data.
[0199] When the controlled character moves on a longitudinal terrain object in a stunt moving state, the terminal can obtain the terrain data of the longitudinal surface of the longitudinal terrain object in real time by means of ray detection, and control the controlled character to move along the longitudinal surface of the longitudinal terrain object with a moving action adapted to the terrain data, that is, after entering the stunt moving state, when a longitudinal terrain object that meets the conditions is detected, the controlled character can automatically move from the transverse terrain object to the longitudinal terrain object. During the displacement process, there is no need to reduce the player's execution of other operations except for the control of the moving direction, which effectively reduces the player's operating burden. At the same time, the terminal can also respond to the controlled character's movement on the longitudinal surface of the longitudinal terrain object in the stunt moving state. , obtain the terrain data of the longitudinal surface, and control the controlled character to move along the longitudinal surface of the longitudinal terrain object with the moving action adapted to the terrain data. In addition to controlling the displacement changes of the controlled character on different terrain objects, when moving on the corresponding terrain object, the terminal can also control the movement changes of the controlled character on the corresponding terrain object based on the terrain data. This not only realizes the rich and colorful changes of the moving action of the controlled character following the terrain, improving the player's game immersion, but also further reduces the player's operating burden, simplifies the player's control method of the controlled character, and allows the player to focus more on other content of the game, thereby improving the player's gaming experience.
[0200] Optionally, the movement of the controlled character on the longitudinal terrain object may include wall movement (Climb), wall climbing (ClimbToWall), wall descent (ClimbBackJump), and platform climbing (ClimbToPlatform), wherein Climb may be the controlled character moving (ClimbRun) and staying (ClimbIdel) on the longitudinal surface of the longitudinal terrain object, as well as some corresponding performance actions such as rolling and rotating when moving on the longitudinal surface; for ClimbToWall, it may be the process of climbing over an obstacle object protruding from the longitudinal surface of the longitudinal terrain object; for ClimbBackJump, it may be Moving from a longitudinal terrain object to a transverse terrain object, that is, the process of jumping from a high place to a low place; for ClimbToPlatform, it can be the process of moving from the longitudinal surface of a longitudinal terrain object to the transverse surface. The difference from ClimbToWall is that ClimbToWall corresponds to the protruding obstacles on the longitudinal surface. After passing the protruding obstacles, the controlled character still needs to move on the longitudinal surface, while ClimbToPlatform corresponds to the protruding platforms corresponding to the transverse surface of the longitudinal terrain object, including the inwardly recessed platforms of the longitudinal terrain objects and the outwardly protruding platforms. That is, the upper platform can refer to the controlled character jumping to the recessed area, or jumping onto the obstacle object.
[0201] For example, refer to Figure 6c , shows a schematic diagram of a moving scene 1 provided in an embodiment of the present invention (the moving scene is referred to as "ClimbToPlatform" below), for a scene in which a controlled character jumps from a longitudinal surface of a longitudinal terrain object to a platform (lateral surface) of the longitudinal terrain object, including ① executing a jumping action to jump directly from the longitudinal surface to the lateral surface; ② there is an area on the lateral surface where one cannot stand, when jumping, the character jumps from the longitudinal surface and crosses the area where one cannot stand to reach an area on the lateral surface where one can stand; ③ there is a protruding platform on the lateral surface relative to the longitudinal surface, the character climbs over the protruding platform from the longitudinal surface to reach a corresponding position on the lateral surface; ④ there is an area on the protruding platform where one cannot stand, when jumping, the character jumps from the longitudinal surface and crosses the protruding platform to reach an area on the lateral surface where one can stand; in addition, for the arcs in ①, ②, ③ and ④, they represent the moving trajectory of the controlled character, the dotted line represents an area on the terrain object where one cannot stand, and the dots represent multiple actions, specifically, ③ contains two dots, that is, the controlled character needs to perform three actions in the process of moving from the longitudinal surface to the lateral surface, such as a first jumping action, a second jumping action and a falling action, etc., and the same is true for ④, which will not be repeated here. And, refer to Figure 6d, showing a schematic diagram of a moving scene 2 provided in an embodiment of the present invention (moving scene 2 is referred to as “ClimbToWall” below), for a scene in which a controlled character moves on a longitudinal surface of a longitudinal terrain object, including ① a relatively small protruding obstacle on the longitudinal surface, directly executing a first jumping action to cross the protruding obstacle; ② a relatively large protruding obstacle on the longitudinal surface, executing at least one action to cross the protruding obstacle; ③ there is another longitudinal surface area protruding relative to the current longitudinal surface area in the moving direction, executing a corresponding jumping action to jump from the current longitudinal surface area to the longitudinal surface area; ④ there is a concave area relative to the current longitudinal surface in the moving direction, executing a corresponding jumping action to jump from the longitudinal surface to the concave area. It should be noted that for the relevant meanings of arcs, dots, etc., refer to the above description and will not be repeated here.
[0202] Optionally, for the above process, the different scenarios involved in ClimbToWall and ClimbToPlatform can be divided into terrain objects according to "protrusions" (i.e. obstacle objects) and "recesses". "Protrusions" can include moving scenes corresponding to ③ and ④ of ClimbToPlatform and moving scenes corresponding to ①, ②, and ③ of ClimbToWall, while "recesses" can include moving scenes corresponding to ① and ② of ClimbToPlatform and moving scenes corresponding to ④ of ClimbToWall. Then, according to the corresponding scenarios, the terminal can control the controlled character to move on the longitudinal terrain object based on the terrain data obtained by real-time detection, with moving actions adapted to the terrain data.
[0203] In an optional embodiment, for a "recessed" scene, the terminal can detect terrain data on the longitudinal plane of the controlled character's moving direction in response to the controlled character's longitudinal movement on the longitudinal plane of the longitudinal terrain object in a stunt move state. When the terrain data indicates that there is a recessed area in the moving direction of the controlled character, the controlled character is controlled to perform a jumping action to reach the recessed area.
[0204] In a specific implementation, if there is no non-standing area in the recessed area, the terminal can control the controlled character to perform "one jumping action" or "one jumping action and one falling action" to move from the longitudinal surface of the longitudinal terrain object to the transverse surface. For example, for scene ① of ClimbToPlatform, the terminal can control the controlled character to perform a jumping action from the longitudinal surface of the longitudinal terrain object to the transverse surface of the longitudinal terrain object (that is, the platform); for scene ④ of ClimbToWall, the terminal can control the controlled character to perform a jumping action and a falling action into the recessed area to move from the longitudinal surface of the longitudinal terrain object to the transverse surface.
[0205] In the case where there is a non-standable area on the recessed area, that is, when the terrain data represents that there is a recessed area in the moving direction of the controlled character, the first jumping action to be performed by the controlled character is determined, and then the first landing point of the controlled character in the recessed area can be determined according to the first jumping action. If the first landing point belongs to the non-standable area, the first jumping action is adjusted to a second jumping action that crosses the non-standable area, and then the controlled character is controlled to perform the second jumping action to reach the recessed area. For example, for the ② scene of ClimbToPlatform, in the case of a non-standable area, it is necessary to adjust the first jumping action with a smaller jumping range to a second jumping action that can cross the non-standable area, and then control the controlled character to perform the second jumping action from the longitudinal surface of the longitudinal terrain object to cross the non-standable area on the platform and reach the standable area of the recessed area. In addition, for the ④ scene of ClimbToWall, in the case of a non-standable area, its processing process can refer to the ② scene of ClimbToPlatform, which will not be repeated here.
[0206] In another optional embodiment, for the "protruding" scene, the terminal can detect the terrain data of the longitudinal surface of the longitudinal terrain object in the moving direction of the controlled character. When the terrain data indicates that there is an obstacle object in the moving direction of the controlled character, the moving action of the controlled character to move onto the obstacle object or over the obstacle object is determined based on the size parameters of the obstacle object, and then the controlled character is controlled to move along the longitudinal surface based on the moving action. Among them, for the obstacle object, it can include the protruding platform in the aforementioned embodiment, and the size parameter can be a protruding width that represents the obstacle object relative to the longitudinal terrain object. Different protruding widths have different effects on the movement of the controlled character. Different "passing strategies" can be adopted for obstacle objects with different protruding widths, including passing through through different moving actions, etc., and the present invention is not limited to this.
[0207] In a specific implementation, in the case where there is no non-standing area on the obstacle object, the terminal can determine that the controlled character needs to perform at least one moving action based on the size parameter, so as to control the controlled character to cross the obstacle object and reach the corresponding position through the determined moving action. Specifically, if the size parameter of the obstacle object represents that the protruding width of the obstacle object relative to the longitudinal plane is less than a first preset threshold, then determine to control the controlled character to jump from the first height of the longitudinal plane to the second height of the longitudinal plane to cross the obstacle object. Among them, the height at the first height is less than the height at the second height, and the obstacle object is located between the first height and the second height. If the size parameter of the obstacle object represents that the protruding width of the obstacle object relative to the longitudinal plane is greater than or equal to the first preset threshold, then determine that the moving action to be performed by the controlled character includes a moving away action away from the current longitudinal plane, a first jumping action, and a first falling action falling onto the obstacle. Optionally, the first preset threshold can be a threshold set according to game requirements. For example, the first preset threshold can be set to 2 meters. Obstacle objects with a protruding width less than 2 meters can be determined as simple obstacle objects and can be passed through with a simple jump. Obstacle objects with a protruding width greater than 2 meters can be determined as complex obstacle objects and require multiple movement actions to cooperate in order to pass through.
[0208] In the case where there is a non-standable area on the obstacle object, the terminal can determine the second landing point of the controlled character on the obstacle object based on the moving away action, the first jumping action and the first falling action. If the second landing point belongs to the non-standable area, the first jumping action is adjusted, and / or the first falling action is adjusted, and the standable area is determined on the obstacle object through the adjusted movement action. Among them, the adjustment of the first jumping action and / or the first falling action can include: adjusting the first jumping action to the second jumping action, and / or adjusting the first falling action to the second falling action, and then the moving away action, the second jumping action and the second falling action can be determined as the movement actions to be performed by the controlled character, or the moving away action, the second jumping action and the first falling action are determined as the movement actions to be performed by the controlled character, or the moving away action, the second jumping action and the first falling action are determined as the movement actions to be performed by the controlled character, or the moving away action, the first jumping action and the second falling action are determined as the movement actions to be performed by the controlled character.
[0209] After determining the movement actions corresponding to different scenes based on the size parameters through the above process, the terminal can control the controlled character to move in the longitudinal plane according to the determined movement actions. For example, for scene ① of ClimbToWall, the terminal can control the controlled character to perform a jumping action to cross the obstacle object from the first height of the longitudinal terrain object to the second height.
[0210] For scenario ② of ClimbToWall, the terminal can control the controlled character to perform a moving away action to jump to a first height in the air, then control the controlled character to perform a first jumping action to jump from the first height in the air to a second height in the air, and then control the controlled character to perform a first falling action to fall from the second height in the air to the lateral terrain object, wherein the first height is greater than or equal to the height corresponding to the lower lateral surface of the obstacle object and less than the height corresponding to the upper lateral surface of the obstacle object; the lateral distance in the air at the first height relative to the longitudinal terrain object is greater than the protrusion width; the second height is greater than the height corresponding to the upper lateral surface of the obstacle object. In addition, for this "passing strategy", it is also applicable to scenarios ③ and ④ of ClimbToPlatform. At the same time, it should be noted that, in the case where there is an unstandable area on the protruding obstacle or the protruding platform, the terminal can adjust the first jumping action to the second jumping action, and / or adjust the first falling action to the second falling action, and then determine the moving away action, the second jumping action and the second falling action as the moving actions to be performed by the controlled character, or determine the moving away action, the second jumping action and the first falling action as the moving actions to be performed by the controlled character, or determine the moving away action, the second jumping action and the first falling action as the moving actions to be performed by the controlled character, wherein the jumping height of the second jumping action is greater than the jumping height of the first jumping action, and the falling distance of the second falling action is greater than the falling distance of the first falling action, thereby increasing the jumping height and / or falling distance of the controlled character so that the controlled character can cross the protruding obstacle or the unstandable area on the protruding platform.
[0211] In addition, for scenario ③ of ClimbToWall, which involves terrain changes between different longitudinal plane areas, the terminal can detect the terrain data of the longitudinal plane of the longitudinal terrain object in the moving direction of the controlled character. When the terrain data indicates that there is a second longitudinal plane area in the moving direction of the controlled character, and the second longitudinal plane area protrudes relative to the first longitudinal plane area where the controlled character is currently located, the controlled character is controlled to perform a moving away action away from the current first longitudinal plane area and a jumping action to reach the second longitudinal plane area.
[0212] Optionally, the above process can be implemented based on the corresponding execution nodes and event configurations, which can be reflected in the game as playing the corresponding animations. For example, the four scene animations of ClimbToPlatform can be divided into two types: for scene ① of ClimbToPlatform, you only need to play the entire animation; for scene ② of ClimbToPlatform, you need to use a program to stretch the animation to a standing position. For scenes ③ and ④ of ClimbToPlatform, first of all, the controlled character needs to be pulled out in the first section, then pulled up to the corresponding standing point, and then connected to the loop and landed. Accordingly, after landing, the script needs to be notified to switch actions, indicating whether it can switch to landing Run (continue running in the moving direction after landing) or Idel (stay at the landing point after landing).
[0213] For ClimbBackJump, it can jump to the ground and then choose to stand on the ground or run on the ground. All of these are done by configuring the corresponding trigger event on the corresponding execution node and selecting the corresponding animation after the event is triggered.
[0214] For ClimbToWall, it is currently divided into two lengths and two groups of animations, a 0-2m obstacle jump and a 2-4m obstacle climb. Specifically, for obstacles of 0-2m length, an animation is played without displacement stretching, and the animation moves over by itself; for obstacles of 2-4m, the animation needs to be divided into three segments. For the protruding parts, the first and second segments of the animation are played, and for the recessed areas, segments 2-3 are played, first stretching the height, and then connecting the falling animation. For the 0-2m obstacle climb, you only need to mount an end jump. For the three-segment animation of the 2-4m obstacle, the previous animation finally mounts the subActionEnd event (animation jump event) to jump, and the final landing animation notifies the script to jump.
[0215] In addition, the platform type can be determined through the detection node, and assigned to the animation selection node, and then selected. There are three animations that are selected sequentially by parameter control. For protruding obstacles or protruding platforms where there are non-standing areas, you can stretch them through the stretching node to control the controlled character to move to the standing area. For example, if the detection node detects that the obstacle object is of the non-crossable type, that is, the protruding platform, it outputs "non-crossable type", then obtains the corresponding three animations, and then plays the corresponding animations in sequence; if the obstacle object is of the surmountable type, that is, the protruding obstacle, it outputs "surmountable type", then obtains the corresponding animation, and then plays the animation, so as to select the corresponding animation based on different types of obstacles, so as to present the process of the controlled character passing through the obstacle object through animation.
[0216] For scene ① in ClimbToWall, it does not need to be connected to the corresponding wall-climbing animation. It can be configured in Climb to control the controlled character to perform the corresponding jumping action.
[0217] In the above embodiment, the process of the controlled character moving on the longitudinal terrain object based on the terrain data is covered. In addition, without encountering any obstacles or recessed areas and other terrain, the terminal can respond to the movement of the controlled character on the longitudinal terrain object, and control the controlled character to perform one of the rotation actions or rolling actions during the movement. By controlling the controlled character to perform corresponding actions during the movement process, the corresponding actions are performed and corresponding action effects are added to improve the smoothness of the movement and the picture performance.
[0218] In the specific implementation, for the left, right, front and 45-degree directions of ClimbRun, the movement is the same, and the corresponding action animation can be played in a loop. You only need to add footstep synchronization points. For the 180-degree turn animation, the left and right feet are selected by input selection nodes. At the end of the animation turn, add the ClimbChangeDir event (climbing change event) to force the controlled character's climbing content ClimbDir on the vertical terrain object to be modified. For ClimbIdel, you only need to consider the left and right feet and remove gravity, and you don't need to add footstep synchronization. The stop animation needs to add footstep synchronization points, and the event StopActionEnd (stop animation event) needs to be switched to switch the stop to Idel. For some special performance actions, you only need to add ClimbSpecialEnd (climbing special action event) to jump at the end of the animation.
[0219] In one example, after the controlled character finishes playing the wall jumping animation, the controlled character enters the corresponding Idel / Run state machine (different stops) according to the movement command judgment condition received by the player. For Run, except for running forward on the longitudinal terrain object, other left, right and 45-degree runs require BlendSpace2D blending (2D blending space), and the direction selection is performed by the direction selection node. For the selection of left and right turning animations, the layer node is used to calculate the angle change between the previous and next frames and then select, climbStop (climbing stop) allows Idel to select the stop animation branch. The specific logic of Idel is mainly based on the selection of the stop animation according to the running, and then the corresponding stop animation is matched according to the stop animation. For the random rolling and rotating performance animations moving on the longitudinal terrain object, considering the direction problem, you can first make a direction range selection by mapping the direction selection node, and then map the value output by the direction selection node to obtain the corresponding ClimbBlender blending value, mix the left and right and 45-degree actions, and then get the movement direction of the controlled character on the longitudinal terrain object. For example, refer to Figure 6e , showing a schematic diagram of the movement direction fusion provided in an embodiment of the present invention, wherein the direction directly in front of F is not mixed, that is, the movement direction and the action direction do not need to be mixed; FR is the right direction, and is mixed with FR_45 of 45 degrees, that is, when the movement direction is the right direction, the movement direction is mixed with the action direction of 45 degrees in front of the right, and the corresponding performance animation when the controlled character moves to the right is obtained; FL is the left direction, and is mixed with FL_45 of 45 degrees, that is, when the movement direction is the left direction, the movement direction is mixed with the action direction of 45 degrees in front of the left, and the corresponding performance animation when the controlled character moves to the left is obtained.
[0220] In addition, when the terrain data represents that there is a transverse terrain object, such as the ground, in the moving direction of the controlled character, the controlled character is controlled to perform a falling action with uniform acceleration from the longitudinal terrain object to the transverse terrain object, and in response to the controlled character moving from the longitudinal terrain object to the transverse terrain object, when there is no obstacle object in the moving direction of the controlled character, the controlled character is controlled to perform a sprinting action.
[0221] Optionally, in an embodiment of the present invention, it can be applied to 3D games. During the game, the virtual scene displayed on the terminal graphical user interface can be switched through the corresponding virtual camera. At the same time, by controlling the focal length of the virtual camera, the field of view mapped by the virtual camera in the graphical user interface can be controlled. The larger the focal length, the smaller the field of view of the virtual scene presented in the graphical user interface, but the presented virtual scene can present more detailed game content to the player; the smaller the focal length, the larger the field of view, and a larger range of game scenes can be presented to the player in the graphical user interface. Correspondingly, the details of the game scene are reduced.
[0222] In a specific implementation, the terminal can increase the focal length of the virtual camera to reduce the field of view of the virtual camera in response to the controlled character moving on the longitudinal terrain object in a stunt move state, so as to achieve the enlargement of the virtual scene. Therefore, when the controlled character moves on the longitudinal terrain object in a stunt move state, the terminal can automatically adjust the focal length of the virtual camera to make the field of view of the virtual scene mapped to the graphical user interface smaller, thereby achieving the enlargement of the virtual scene, so that the player can intuitively perceive the details of the longitudinal terrain object where the controlled character is located, and it is convenient for the player to control the movement direction of the controlled character according to the perceived details, thereby effectively assisting the player in making decisions on game control.
[0223] Correspondingly, the terminal can also reduce the focal length of the virtual camera to increase the field of view of the virtual camera in response to the controlled character moving on the longitudinal terrain object in a stunt move state, so as to achieve the reduction of the virtual scene. By reducing the focal length, the terminal can present a virtual scene with a larger game field of view to the player in the graphical user interface, so that the player can perceive the terrain of the virtual scene through the larger game field of view, which makes it convenient for the player to control the movement direction of the controlled character according to the perceived content of the larger field of view, effectively assisting the player in making game control decisions.
[0224] It should be noted that for the above two different scenarios, they can be processed in opposite ways. In the actual game process, the focal length of a pair of virtual cameras can be adjusted according to the needs of the players, or one of them can be preset as the default adjustment solution. During the game, the player can also manually adjust the focal length of the virtual camera according to his or her actual needs. The present invention does not limit this.
[0225] In one example, when controlling the controlled character to move from a horizontal terrain object to a vertical terrain object in a virtual scene, the virtual camera is controlled to move downward by a preset distance and face the back of the controlled character at a preset elevation angle. Figure 6f, showing a schematic diagram of the virtual camera adjustment provided in an embodiment of the present invention. When the controlled character moves on the longitudinal terrain object, especially in the process of moving upward, the terminal can control the virtual camera (i.e., the lens) to gradually move downward until it reaches a 45-degree upward viewing angle of the back of the controlled character. When the controlled character moves left and right, the virtual camera will also rotate to the back of the controlled character. On the one hand, it can combine the characteristics of the game (such as the martial arts of light skills, etc.) to present a good sense of picture to the player. On the other hand, by adjusting the viewing angle, the player can better control the controlled character and reduce the player's operating burden.
[0226] In one example, the terminal may also obtain the orientation of the virtual camera in response to the movement of the controlled character on the longitudinal terrain object in a stunt move state, and if the virtual camera is facing the side of the controlled character, adjust the virtual camera to face the back of the controlled character.
[0227] In addition, when the player controls the controlled character to exit the stunt movement state, the terminal can adjust the virtual camera to a viewing angle corresponding to the basic movement state in response to the controlled character staying on the longitudinal terrain object or exiting the stunt movement state.
[0228] Optionally, in the above process, when the controlled character moves in a stunt move state, key frame silhouettes can be performed, and the jumping form can be processed, so that the controlled character has good smoothness and creates a corresponding sense of speed when moving in a stunt move state.
[0229] In an embodiment of the present invention, in a game application, for a controlled character controlled by a player, it can be configured with different basic movement states and stunt movement states. In the stunt movement state, the player can only control the movement direction of the controlled character, and for other actions of the controlled character passing through terrain objects, the game application can automatically control the controlled character according to the terrain data in the virtual scene. Specifically, during the game, the terminal can enter the stunt movement state in response to the operation on the controlled character. When the controlled character moves on the lateral terrain object of the virtual scene in the stunt movement state, in response to the existence of a longitudinal terrain object that meets the preset climbing condition in the movement direction of the controlled character, the controlled character is controlled to move from the lateral terrain object of the virtual scene to the longitudinal terrain object, so that after entering the stunt movement state, when a longitudinal terrain object that meets the condition is detected, the controlled character is controlled to climb the lateral terrain object. The character can automatically move from the horizontal terrain object to the vertical terrain object. During the displacement process, the player is required to perform fewer operations except for controlling the moving direction, which effectively reduces the player's operating burden. At the same time, the terminal can also respond to the movement of the controlled character on the vertical surface of the vertical terrain object in a stunt moving state, obtain the terrain data of the vertical surface, and control the controlled character to move along the vertical surface of the vertical terrain object with a moving action adapted to the terrain data. In addition to controlling the displacement changes of the controlled character on different terrain objects, when moving on the corresponding terrain object, the terminal can also control the action changes of the controlled character on the corresponding terrain object based on the terrain data, further reducing the player's operating burden, simplifying the player's control method of the controlled character, allowing the player to focus more on other content of the game, and enhancing the player's sense of game immersion and other game experiences.
[0230] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0231] Reference Figure 7 , showing a structural schematic diagram of a mobile control device for a controlled character provided by an embodiment of the present invention, a graphical user interface is provided through an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene through the graphical user interface.
[0232] Specifically, the following modules may be included:
[0233] The module 701 for entering a stunt movement state in response to an operation is used to enter a stunt movement state in response to an operation on a controlled character; wherein the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data.
[0234] The terrain object and terrain data determination module 702 is used to determine the terrain objects and terrain data of the terrain objects in the virtual scene in response to the movement of the controlled character in the virtual scene in a stunt moving state.
[0235] The module 703 for controlling terrain objects with stunts is used to control the controlled character to automatically pass through the terrain objects with stunt movements adapted to the terrain data.
[0236] In one embodiment of the present invention, in response to an operation on a controlled character, entering a stunt movement state includes:
[0237] When the controlled character moves in the horizontal terrain object of the virtual scene in the basic movement state, in response to the operation on the controlled character, the stunt movement state is entered; the basic movement state is a state in which the controlled character is controlled to move according to the operation of the player on the controlled character;
[0238] The controlled character is controlled to move on the horizontal terrain object or the vertical terrain object of the virtual scene in a stunt moving state.
[0239] In one embodiment of the present invention, in response to an operation on a controlled character, entering a stunt movement state includes:
[0240] When the controlled character is in the air, in response to an operation on the controlled character, the controlled character enters a stunt movement state, and the controlled character is controlled to perform a sprint action in the moving direction.
[0241] In one embodiment of the present invention, when the controlled character is in the air, in response to an operation on the controlled character, the controlled character enters a stunt movement state, and controls the controlled character to perform a sprint action in the moving direction, further comprising:
[0242] In response to the controlled character performing a sprint action and the presence of a longitudinal terrain object satisfying a preset climbing condition in the moving direction, the controlled character is controlled to move from the air to the longitudinal terrain object.
[0243] In one embodiment of the present invention, controlling a controlled character to move from the air to a longitudinal terrain object includes:
[0244] Control the controlled character to perform a sprint action and move to a first detection point corresponding to the longitudinal terrain object, where the first detection point is a jumping point from the air to the longitudinal terrain object;
[0245] And, controlling the controlled character to perform a jumping action to move from the first detection point to the longitudinal terrain object, and controlling the controlled character to move along the longitudinal surface of the longitudinal terrain object.
[0246] In one embodiment of the present invention, in response to the controlled character moving in the virtual scene in a stunt moving state, determining the terrain objects and terrain data of the terrain objects in the virtual scene includes:
[0247] In response to the controlled character moving on the lateral terrain object in a stunt moving state, acquiring terrain data of the lateral terrain object, wherein the lateral terrain object is a ground object or a water surface object; and the lateral terrain object includes one or more obstacles;
[0248] Control the controlled character to automatically pass through terrain objects with stunt moves adapted to the terrain data, including:
[0249] The controlled character is controlled to automatically pass over or on the surface of obstacles of the lateral terrain object using stunt movement actions adapted to the terrain data.
[0250] In one embodiment of the present invention, controlling a controlled character to automatically pass over or on the surface of an obstacle of a lateral terrain object by using a stunt movement action adapted to terrain data includes:
[0251] When the terrain data indicates that there is a first obstacle in the moving direction of the controlled character, determining a first size parameter of the first obstacle;
[0252] The controlled character is controlled to pass over or on the surface of the first obstacle by a stunt move action adapted to the first size parameter.
[0253] In one embodiment of the present invention, the first size parameter further includes height information and width information of the first obstacle, and controlling the controlled character to pass over or on the surface of the first obstacle with a stunt movement action adapted to the first size parameter includes:
[0254] When the width information is less than a preset width threshold, the controlled character is controlled to jump over the first obstacle from above the first obstacle according to a jumping action adapted to the height information;
[0255] When the width information is greater than or equal to a preset width threshold, the controlled character is controlled to jump from the surface of the lateral terrain object to the first obstacle according to a jumping action adapted to the height information, so as to pass through the first obstacle from the surface of the first obstacle.
[0256] In one embodiment of the present invention, it is also used for:
[0257] During the jumping process of the controlled character, when the controlled character moves to a first climbing position, a second forward detection is started along the moving direction of the controlled character to detect a second obstacle, wherein the first climbing position is a position on a climbing track of the controlled character climbing over the first obstacle;
[0258] When the controlled character moves to a second crossing position, the first forward detection for acquiring terrain data is turned off, wherein the second crossing position is a position before the first crossing position on the crossing trajectory, and the detection distance of the first forward detection is greater than the detection distance of the second forward detection;
[0259] When the controlled character moves to the third flipping position, the second forward detection is turned off and the first forward detection along the moving direction of the controlled character is turned on. The third flipping position is a position at a preset height in the falling stage of the flipping trajectory after the first flipping position.
[0260] In one embodiment of the present invention, it is also used for:
[0261] If the controlled character detects a second obstacle in the moving direction of the controlled character after starting the first forward detection at the third crossing position, a second size parameter of the second obstacle is determined, and the controlled character is controlled to pass over or on the surface of the second obstacle with a stunt movement action adapted to the second size parameter;
[0262] If the controlled character detects a second obstacle after turning on the second forward detection at the first climbing position, the controlled character is controlled to perform a sprint action in the moving direction, and when the second obstacle meets the preset climbing conditions, moves from the air to the longitudinal terrain object formed by the second obstacle.
[0263] In one embodiment of the present invention, it is also used for:
[0264] When the controlled character moves to the fourth climbing position, the current distance of the controlled character from the ground is detected downward, wherein the fourth climbing position is a position after the highest point on the climbing trajectory of the controlled character climbing over the first obstacle;
[0265] When it is detected that the current ground distance is the second ground distance, the controlled object is controlled to perform a landing action.
[0266] In one embodiment of the present invention, controlling a controlled character to pass over or on a surface of an obstacle of a lateral terrain object by using a stunt movement action adapted to terrain data includes:
[0267] When the terrain data indicates that there is a first concave area in the moving direction of the controlled character, determining height information of the current position of the controlled character relative to the first concave area;
[0268] According to the jumping action adapted to the height information, the controlled character is controlled to jump down from the current position to the first concave area.
[0269] In one embodiment of the present invention, in response to the controlled character moving in the virtual scene in a stunt moving state, determining the terrain objects and terrain data of the terrain objects in the virtual scene includes:
[0270] When the controlled character moves on a lateral terrain object of the virtual scene in a stunt movement state, in response to a longitudinal terrain object that satisfies a preset climbing condition existing in the moving direction of the controlled character, controlling the controlled character to move from the lateral terrain object of the virtual scene to the longitudinal terrain object;
[0271] In response to the controlled character moving on the longitudinal surface of the longitudinal terrain object in a stunt movement state, acquiring terrain data of the longitudinal surface;
[0272] Control the controlled character to automatically pass through terrain objects with stunt moves adapted to the terrain data, including:
[0273] The controlled character is controlled to move along the longitudinal surface of the longitudinal terrain object with a movement action adapted to the terrain data.
[0274] In one embodiment of the present invention, controlling a controlled character to move along a longitudinal surface of a longitudinal terrain object using a movement action adapted to terrain data includes:
[0275] When the terrain data indicates that there is a recessed area in the moving direction of the controlled character, the controlled character is controlled to perform a jumping action to reach the recessed area.
[0276] In one embodiment of the present invention, controlling a controlled character to move along a longitudinal surface of a longitudinal terrain object using a movement action adapted to terrain data includes:
[0277] When the terrain data indicates that there is an obstacle object in the moving direction of the controlled character, based on the size parameters of the obstacle object, a moving action of the controlled character to move onto the obstacle object or over the obstacle object is determined;
[0278] The controlled character is controlled to move along the longitudinal plane based on the moving action.
[0279] In one embodiment of the present invention, controlling a controlled character to move along a longitudinal surface of a longitudinal terrain object using a movement action adapted to terrain data includes:
[0280] When the terrain data indicates that there is a second longitudinal plane area in the moving direction of the controlled character, and the second longitudinal plane area protrudes relative to the first longitudinal plane area where the controlled character is currently located, the controlled character is controlled to perform a moving away action away from the current first longitudinal plane area and a jumping action to reach the second longitudinal plane area.
[0281] In one embodiment of the present invention, in response to the presence of a longitudinal terrain object satisfying a preset climbing condition in the moving direction of the controlled character, controlling the controlled character to move from the transverse terrain object to the longitudinal terrain object of the virtual scene includes:
[0282] In response to the presence of a longitudinal terrain object within a preset distance threshold in the moving direction of the controlled character and the height of the longitudinal terrain object is greater than or equal to the preset height threshold, the controlled character is controlled to move from the transverse terrain object of the virtual scene to the longitudinal terrain object.
[0283] In one embodiment of the present invention, controlling a controlled character to move from a horizontal terrain object to a vertical terrain object of a virtual scene includes:
[0284] In response to the controlled character moving to a second detection point of the transverse terrain object, acquiring a posture tilt angle for jumping to the longitudinal terrain object, the second detection point being a jumping point from the transverse terrain object to the longitudinal terrain object;
[0285] Determine the attachment point of the controlled character from the longitudinal terrain object according to the relative distance between the second detection point and the longitudinal terrain object, and the posture tilt angle;
[0286] Control the controlled character to jump from the second detection point to the attachment point at a posture tilt angle.
[0287] In an embodiment of the present invention, by responding to an operation on a controlled character, a stunt movement state is entered, and the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data. Then, in response to the movement of the controlled character in the virtual scene in the stunt movement state, the terrain objects in the virtual scene and the terrain data of the terrain objects are determined, and the controlled character is controlled to automatically pass through the terrain objects with a stunt movement action adapted to the terrain data. This realizes the use of stunt movement actions adapted to the terrain data to control the controlled character to automatically move, can adapt to different terrain conditions and can obtain a faster movement speed, thereby improving the smoothness of the controlled character's exploration in the open world.
[0288] An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and when the computer program is executed by the processor, the movement control method of the controlled character as described above is implemented.
[0289] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the movement control method of the controlled character as described above is implemented.
[0290] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0291] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0292] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0293] Those skilled in the art will appreciate that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0294] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0295] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0296] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0297] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0298] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the above elements.
[0299] The above is a detailed introduction to the provided method, device, equipment and medium for controlling the movement of a controlled character. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for controlling movement of a controlled character, characterized in that: Providing a graphical user interface through an electronic terminal, wherein the electronic terminal displays a virtual scene and a controlled character in the virtual scene through the graphical user interface, the method comprising: In response to the operation on the controlled character, entering a stunt movement state; wherein the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data; In response to the controlled character moving in the virtual scene in the stunt movement state, determining a terrain object in the virtual scene and terrain data of the terrain object; The controlled character is controlled to automatically pass through the terrain object by using stunt movement actions adapted to the terrain data.
2. The method according to claim 1, characterized in that The step of entering a stunt movement state in response to an operation on the controlled character comprises: In the case where the controlled character moves in the lateral terrain object of the virtual scene in a basic movement state, in response to an operation on the controlled character, entering a stunt movement state; the basic movement state is a state in which the controlled character is controlled to move according to the operation of the player on the controlled character; The controlled character is controlled to move on the lateral terrain object or the longitudinal terrain object of the virtual scene in the stunt movement state.
3. The method according to claim 1, characterized in that The step of entering a stunt movement state in response to an operation on the controlled character comprises: When the controlled character is in the air, in response to an operation on the controlled character, the controlled character enters the stunt movement state, and the controlled character is controlled to perform a sprint action in the moving direction.
4. The method according to claim 3, characterized in that When the controlled character is in the air, in response to an operation on the controlled character, the controlled character enters the stunt movement state, and controls the controlled character to perform a sprint action in the moving direction. The method further includes: In response to the controlled character performing the sprint action and the presence of a longitudinal terrain object satisfying a preset climbing condition in the moving direction, the controlled character is controlled to move from the air to the longitudinal terrain object.
5. The method according to claim 4, characterized in that The controlling the controlled character to move from the air to the longitudinal terrain object comprises: Controlling the controlled character to perform a sprint action and move to a first detection point corresponding to the longitudinal terrain object, wherein the first detection point is a jumping point from the air to the longitudinal terrain object; And, controlling the controlled character to perform a jumping action to move from the first detection point to the longitudinal terrain object, and controlling the controlled character to move along the longitudinal surface of the longitudinal terrain object.
6. The method according to claim 1, characterized in that The step of determining a terrain object and terrain data of the terrain object in the virtual scene in response to the controlled character moving in the virtual scene in the stunt movement state comprises: In response to the controlled character moving on a lateral terrain object in the stunt movement state, acquiring terrain data of the lateral terrain object, wherein the lateral terrain object is a ground object or a water surface object; and the lateral terrain object includes one or more obstacles; The step of controlling the controlled character to automatically pass through the terrain object by performing a stunt movement action adapted to the terrain data comprises: The controlled character is controlled to automatically pass over or on the surface of obstacles of the lateral terrain object by using stunt movement actions adapted to the terrain data.
7. The method according to claim 6, characterized in that The controlling the controlled character to automatically pass over or on the surface of the obstacle of the lateral terrain object by using a stunt movement action adapted to the terrain data comprises: When the terrain data indicates that there is a first obstacle in the moving direction of the controlled character, a first size parameter of the first obstacle is determined; and the controlled character is controlled to pass over or on the surface of the first obstacle by a stunt movement action adapted to the first size parameter.
8. The method according to claim 7, characterized in that The first size parameter also includes height information and width information of the first obstacle, and the step of controlling the controlled character to pass over or on the surface of the first obstacle by using a stunt movement action adapted to the first size parameter includes: When the width information is less than a preset width threshold, controlling the controlled character to jump over the first obstacle from above the first obstacle according to a jumping action adapted to the height information; When the width information is greater than or equal to a preset width threshold, the controlled character is controlled to jump from the surface of the lateral terrain object to the first obstacle according to a jumping action adapted to the height information, so as to pass through the first obstacle from the surface of the first obstacle.
9. The method according to claim 8, characterized in that Also includes: During the jumping process of the controlled character, when the controlled character moves to a first climbing position, a second forward detection is started along the moving direction of the controlled character to detect a second obstacle, wherein the first climbing position is a position on a climbing track of the controlled character climbing over the first obstacle; When the controlled character moves to a second climbing position, closing a first forward detection for acquiring the terrain data, wherein the second climbing position is a position before the first climbing position on the climbing trajectory, and a detection distance of the first forward detection is greater than a detection distance of the second forward detection; When the controlled character moves to a third flipping position, the second forward detection is turned off, and the first forward detection along the moving direction of the controlled character is turned on. The third flipping position is a position at a preset height in the falling stage of the flipping trajectory after the first flipping position.
10. The method according to claim 9, characterized in that Also includes: If the controlled character detects a second obstacle in the moving direction of the controlled character after starting the first forward detection at the third jumping position, determine a second size parameter of the second obstacle, and control the controlled character to pass over or on the surface of the second obstacle with a stunt movement action adapted to the second size parameter; If the controlled character detects a second obstacle after turning on the second forward detection at the first climbing position, the controlled character is controlled to perform a sprint action in the moving direction, and when the second obstacle meets a preset climbing condition, the controlled character moves from the air to the longitudinal terrain object formed by the second obstacle.
11. The method according to claim 8, characterized in that Also includes: When the controlled character moves to a fourth climbing position, the current distance of the controlled character from the ground is detected downward, wherein the fourth climbing position is a position after the highest point on the climbing trajectory of the controlled character climbing over the first obstacle; When it is detected that the current ground distance is the second ground distance, the controlled object is controlled to perform a landing action.
12. The method according to claim 6, characterized in that The step of controlling the controlled character to pass over or on the surface of an obstacle of the lateral terrain object by using a stunt movement action adapted to the terrain data comprises: When the terrain data indicates that there is a first depression in the moving direction of the controlled character, determining height information of the current position of the controlled character relative to the first depression; According to the jumping action adapted to the height information, the controlled character is controlled to jump down from the current position to the first concave area.
13. The method according to claim 1, characterized in that The step of determining a terrain object and terrain data of the terrain object in the virtual scene in response to the controlled character moving in the virtual scene in the stunt movement state comprises: When the controlled character moves on the lateral terrain object of the virtual scene in the stunt movement state, in response to the presence of a longitudinal terrain object that meets a preset climbing condition in the moving direction of the controlled character, controlling the controlled character to move from the lateral terrain object of the virtual scene to the longitudinal terrain object; In response to the controlled character moving on the longitudinal surface of the longitudinal terrain object in the stunt movement state, acquiring terrain data of the longitudinal surface; The step of controlling the controlled character to automatically pass through the terrain object by performing a stunt movement action adapted to the terrain data comprises: The controlled character is controlled to move along the longitudinal surface of the longitudinal terrain object using movement actions adapted to the terrain data.
14. The method according to claim 13, characterized in that The step of controlling the controlled character to move along the longitudinal surface of the longitudinal terrain object by using a movement action adapted to the terrain data comprises: When the terrain data indicates that there is a recessed area in the moving direction of the controlled character, the controlled character is controlled to perform a jumping action to reach the recessed area.
15. The method according to claim 13, characterized in that The step of controlling the controlled character to move along the longitudinal surface of the longitudinal terrain object by using a movement action adapted to the terrain data comprises: When the terrain data indicates that there is an obstacle object in the moving direction of the controlled character, determining a moving action of the controlled character to move onto or over the obstacle object based on a size parameter of the obstacle object; The controlled character is controlled to move along the longitudinal plane based on the movement action.
16. The method according to claim 13, characterized in that The step of controlling the controlled character to move along the longitudinal surface of the longitudinal terrain object by using a movement action adapted to the terrain data comprises: When the terrain data indicates that there is a second longitudinal plane area in the moving direction of the controlled character, and the second longitudinal plane area protrudes relative to the first longitudinal plane area where the controlled character is currently located, the controlled character is controlled to perform a moving away action away from the first longitudinal plane area and a jumping action to reach the second longitudinal plane area.
17. The method according to claim 13, characterized in that In response to the presence of a longitudinal terrain object satisfying a preset climbing condition in the moving direction of the controlled character, controlling the controlled character to move from the transverse terrain object of the virtual scene to the longitudinal terrain object comprises: In response to the presence of a longitudinal terrain object within a preset distance threshold in the moving direction of the controlled character, and the height of the longitudinal terrain object is greater than or equal to the preset height threshold, the controlled character is controlled to move from the lateral terrain object of the virtual scene to the longitudinal terrain object.
18. The method according to claim 17, characterized in that The controlling the controlled character to move from the horizontal terrain object of the virtual scene to the vertical terrain object comprises: In response to the controlled character moving to a second detection point of the transverse terrain object, acquiring a posture tilt angle for jumping to the longitudinal terrain object, the second detection point being a jumping point from the transverse terrain object to the longitudinal terrain object; Determining the attachment point of the controlled character from the longitudinal terrain object according to the relative distance between the second detection point and the longitudinal terrain object, and the posture tilt angle; The controlled character is controlled to jump from the second detection point to the attachment point at the posture tilt angle.
19. A mobile control device for a controlled character, characterized in that: A graphical user interface is provided by an electronic terminal, and the electronic terminal displays a virtual scene and a controlled character in the virtual scene by means of the graphical user interface. The device comprises: A module for entering a stunt movement state in response to an operation is used to enter a stunt movement state in response to an operation on the controlled character; wherein the stunt movement state is a state in which the controlled character is controlled to automatically pass through a terrain object according to terrain data; A terrain object and terrain data determination module, for determining terrain objects in the virtual scene and terrain data of the terrain objects in response to the controlled character moving in the virtual scene in the stunt movement state; The module for controlling terrain objects with stunts is used to control the controlled character to automatically pass through the terrain objects with stunt movements adapted to the terrain data.
20. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the movement control method of the controlled character according to any one of claims 1 to 18 is implemented.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the movement control method of a controlled character according to any one of claims 1 to 18 is implemented.
