Animation joining method and related device
By adjusting the movement state of the player object in the virtual interactive scene to conform to the target control logic, the problem of unsmooth connection between runtime animation and interactive animation is solved, and a more natural interactive experience is achieved.
Patent Information
- Application Number
- CN202410173728.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-06
- Publication Date
- 2025-08-08
AI Technical Summary
In virtual interaction scenarios, the connection between runtime animation and interactive animation is not smooth, resulting in sudden changes in the posture and speed of the player object, affecting the user's interactive experience.
By determining the target control logic and target motion parameters, the movement status of the player object is adjusted so that it meets the needs of interactive animation at the beginning of the interactive animation, thereby achieving a smooth connection between runtime animation and interactive animation.
It effectively avoids sudden changes in the posture and speed of the player object at the beginning of the interactive animation, improves the smoothness of the connection between the runtime animation and the interactive animation, and improves the user interaction experience.
Smart Images

Figure CN120451342A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of animation processing, and in particular to an animation connection method and related devices. Background Art
[0002] In a virtual interactive scene, users can control player objects to perform various actions within the scene, thereby gaining an interactive experience. Player objects can perform both interactive and non-interactive actions. Interactive actions primarily involve actions performed by player objects on interactive objects within the scene, such as opening a door or pushing a box.
[0003] To enhance interactive realism, corresponding animations are displayed in the virtual interactive scene based on the player's actions. For non-interactive actions, such as responding to a user's movement, an animation of the player's movement in the virtual interactive scene can be recorded as a runtime animation. For interactive actions, such as responding to a user's interaction with a door, an animation of the player moving to and opening the door can be recorded as an interactive animation.
[0004] Typically, interactive animations are created by controlling player objects through pre-set character control logic to perform corresponding interactive behaviors, resulting in relatively fixed animations. Runtime animations, on the other hand, are created by controlling player objects through real-time user actions to perform non-interactive behaviors, resulting in relatively random animations.
[0005] Before the player object is controlled to perform interactive behavior, the runtime animation is displayed in the virtual interactive scene. When the player object is controlled to perform interactive behavior, the corresponding interactive animation needs to be connected after the runtime animation. If the runtime animation and the interactive animation cannot be smoothly connected, the player object's behavior will be displayed in the virtual interactive scene with distorted and unnatural images, seriously affecting the user's interactive experience. Summary of the Invention
[0006] In order to solve the above technical problems, the present application provides an animation connection method and related devices, which connect the runtime animation and the interactive animation by adjusting the object motion state, avoiding sudden changes in the player object's posture, speed, etc. when the interactive animation starts to be displayed, effectively improving the smoothness of the connection between the runtime animation and the interactive animation, and enhancing the interactive experience.
[0007] The embodiments of this application disclose the following technical solutions:
[0008] In one aspect, the present application provides an animation connection method, the method comprising:
[0009] In response to an interactive operation on a player object, determining an adapted target control logic, wherein the interactive operation is used to instruct the player object to perform an interactive behavior on the interactive object in a virtual interactive scene, and the target control logic is a control logic for controlling the player object to perform the interactive behavior;
[0010] controlling a target object motion state of the player object during movement toward the interactive object according to a target motion parameter, the target motion parameter being used to identify the object motion state of the player object when the player object is controlled by the target control logic;
[0011] In response to the target object motion state being consistent with the target motion parameter, the player object is controlled by the target control logic to perform the interactive behavior on the interactive object.
[0012] In another aspect, the present application provides an animation connection device, comprising:
[0013] a determining unit, configured to determine an adapted target control logic in response to an interactive operation on a player object, wherein the interactive operation is used to instruct the player object to perform an interactive behavior on the interactive object in a virtual interactive scene, and the target control logic is a control logic for controlling the player object to perform the interactive behavior;
[0014] a first control unit, configured to control a target object motion state of the player object during movement toward the interactive object according to a target motion parameter, wherein the target motion parameter is used to identify an object motion state of the player object when the player object is controlled by the target control logic;
[0015] The second control unit is configured to control the player object to perform the interactive behavior on the interactive object through the target control logic in response to the target object's motion state being consistent with the target motion parameter.
[0016] In another aspect, the present application provides a computer device, comprising a processor and a memory:
[0017] The memory is used to store computer programs;
[0018] The processor is configured to execute the method according to the computer program.
[0019] On the other hand, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the method when executed by a computer device.
[0020] In yet another aspect, the present application provides a computer program product comprising a computer program, which, when executed on a computer device, causes the computer device to perform the method.
[0021] It can be seen from the above technical solution that in a virtual interactive scene including a player object and an interactive object, when an interactive operation is obtained to instruct the player object to perform an interactive behavior on the interactive object, a target control logic suitable for controlling the player object to perform the interactive behavior is determined, so that the interactive animation of the interactive behavior is displayed after the runtime animation through the target control logic. Since the target object motion state of the player object is difficult to predict under the control of the user, in order to improve the effect of connecting the interactive animation after the runtime animation, before actually using the target control logic to control the player object, it is necessary to first adjust the target object motion state of the player object to the object motion state of the player object when the player object is controlled based on the target control logic. When the target motion state of the player object is controlled and adjusted to the target motion parameters that meet the target control logic, the target control logic is then used to control the player object to perform the interactive behavior on the interactive object. Between runtime animation and interactive animation, by controlling the movement of the player object, the object motion state of the player object has been adjusted to meet the requirements of the interactive animation when the interactive animation starts to be displayed. This control process effectively connects the runtime animation and interactive animation through the adjustment of the object motion state, avoiding sudden changes in the player object's posture, speed, etc. when the interactive animation starts to be displayed, effectively improving the smoothness of the connection between runtime animation and interactive animation, and enhancing the interactive experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0023] Figure 1 A schematic diagram of a scene of an animation connection method provided in an embodiment of the present application;
[0024] Figure 2 A flowchart of an animation connection method provided in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of an offset angle of a player object relative to an interactive object provided in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of a movement path of a player object provided in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of different positions of a player object when triggering an interactive operation provided by an embodiment of the present application;
[0028] Figure 6 A schematic diagram of the orientation angle of a player object provided in an embodiment of the present application;
[0029] Figure 7 A schematic diagram of a posture adjustment distance provided in an embodiment of the present application;
[0030] Figure 8 A schematic diagram of a player object's posture change according to an embodiment of the present application;
[0031] Figure 9 A schematic diagram of a configuration for performing animation display provided in an embodiment of the present application;
[0032] Figure 10 A schematic diagram of parameters related to an interactive animation selection strategy provided in an embodiment of the present application;
[0033] Figure 11 A schematic diagram of a configuration for displaying an interactive animation provided by an embodiment of the present application;
[0034] Figure 12 A flowchart of an animation connection process provided in an embodiment of the present application;
[0035] Figure 13 A schematic diagram of an animation connection device provided in an embodiment of the present application;
[0036] Figure 14 A structural diagram of a terminal device provided in an embodiment of the present application;
[0037] Figure 15 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The embodiments of the present application are described below with reference to the accompanying drawings.
[0039] As described in the background technology, when a player object is controlled to perform interactive behavior, the corresponding interactive animation needs to be connected after the runtime animation. If the runtime animation and the interactive animation cannot be smoothly connected, the player object's behavior will be displayed in the virtual interactive scene in a distorted and unnatural manner, seriously affecting the user's interactive experience.
[0040] In order to solve the above problems, the embodiments of the present application provide an animation connection method and related devices. Between the runtime animation and the interactive animation, by controlling the movement of the player object, the object motion state of the player object is adjusted to meet the requirements of the interactive animation when the interactive animation starts to be displayed. This control process effectively connects the runtime animation and the interactive animation through the adjustment of the object motion state, avoiding sudden changes in the posture, speed, etc. of the player object when the interactive animation starts to be displayed, effectively improving the smoothness of the connection between the runtime animation and the interactive animation, and enhancing the interactive experience.
[0041] The animation connection method provided in the embodiment of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, Extended Reality (XR) devices, etc. The terminal device and the server can be directly or indirectly connected through wired or wireless communication, and this application does not limit this.
[0042] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0043] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also involves studying the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0044] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.
[0045] In an embodiment of the present application, computer vision technology can be used to identify and process the scene images of the virtual interactive scene to determine various relevant parameters of the player object and the interactive object, such as the object motion state, orientation angle, offset angle, etc., so as to achieve a smooth connection between the runtime animation and the interactive animation.
[0046] The embodiments of the present application are applied to control player objects in a virtual interactive scene, which can be a virtual scene constructed when an interactive application is running, including player objects controlled by users.
[0047] Interactive applications may include gaming applications and experience applications. The types of games covered by gaming applications may include stand-alone games and online games. Stand-alone games generally refer to electronic games whose main gameplay can be completed using only a computer or other electronic device. Online games refer to multiplayer online games that use the Internet as a transmission medium, the game operator's server and the user's computer as processing terminals, and the game client as an information exchange window, aiming to achieve entertainment, leisure, communication, and virtual achievements, and are sustainable.
[0048] By running a game application, a user can control a virtual player object to play the game. During the game, the player object can be controlled to interact with the interactive objects in the virtual interactive scene constructed by the game application.
[0049] Game applications include, but are not limited to, first-person shooter (FPS), third-person shooter (TPS), role-playing game (RPG), real-time strategy game (RTS), and multiplayer online battle arena (MOBA). Game applications may be presented in two-dimensional (2D), three-dimensional (3D), virtual reality (VR), augmented reality (AR), and mixed reality (MR). Game applications may feature player versus player (PVP) or player versus environment (PVE).
[0050] refer to Figure 1 As shown, it is a scene diagram of an animation connection method provided by an embodiment of the present application. The method can be applied to a terminal device or a server. Figure 1 In the description, the terminal device is used as the aforementioned computer device.
[0051] In the virtual interactive scene, there are player objects and interactive objects. Player objects are virtual objects that can be directly controlled by users. Player objects can be virtual characters, for example. Under the control of the user, the object motion state of the player object can change. Interactive objects are virtual objects that can interact with the player object and are not directly controlled by the player object, such as Figure 1 The door shown in the.
[0052] The user can trigger an interactive operation by clicking a button (virtual button or physical button). An interactive operation refers to an interactive operation between a player object and an interactive object, which means that the player object can perform an interactive behavior on the interactive object. In response to the interactive operation, the terminal device can determine the adapted target control logic. The target control logic is used to control the player object to perform the interactive behavior. By executing the target control logic, the interactive behavior can be implemented, so that the interactive animation of the interactive behavior can be displayed after the runtime animation. For example, when the interactive operation is a door opening operation, the target control logic can control the player object to move to the door when facing the door, and control the player object to reach out and open the door.
[0053] Before the user triggers an interaction, the player's target object's motion state is controlled by the user, making it difficult to predict. This state can vary depending on the player's posture, orientation, and speed. This can lead to random animations during runtime. For example, during a motion animation, the player might face away from or directly toward the door. However, the interactive animation's image is relatively fixed; for example, the player must face the door directly and approach it. This results in significant differences between the runtime and interactive animations.
[0054] To ensure smoother transitions between runtime and interactive animations, before actually using the target control logic to control the player object, the target motion parameters can be used as a reference. While controlling the player object to move toward the interactive object, the player object's target motion state can be adjusted until the target motion state matches the target motion parameters. The target motion parameters can be the target motion state that the player object must achieve when the target control logic controls it. Interactions performed while the player object is within the target motion parameters will result in smoother transitions.
[0055] For example, when the user triggers an interactive operation, the player object is located at position A in the virtual interactive scene, and the player object is facing due north. The target control logic is to move when the player object faces the door and reach out to open the door. The target motion parameter is that the player object is facing due east. In order to avoid the player object's direction changing from due north to due east instantly, which causes unnatural movements, the terminal device can gradually adjust the player object's direction during its movement, so that its direction is adjusted to due east. At this time, the player object moves to position B. That is, the terminal device controls the player object to adjust the target object's motion state (for example, direction) during its movement (for example, from position A to position B) until it meets the target motion parameters.
[0056] When the player object's target object motion state matches the target motion parameters, the terminal device can control the player object to perform an interactive behavior with the interactive object through the target control logic. For example, after adjusting the player object's orientation, the player object is at position B, and the door is at position C. From position B to position C, the terminal device controls the player object to perform an interactive behavior. At this point, the player object can continue to move toward the door and reach out to open it. In other words, before performing an interactive behavior, the target control logic adjusts the player object's target object motion state to an appropriate state, such as the player object facing the door. Subsequently, performing an interactive behavior, such as approaching the door and reaching out to open it, ensures that the player object's object motion state has been adjusted to meet the requirements of the interactive animation at the start of the interactive animation. This control process effectively connects the runtime animation and the interactive animation through the adjustment of the object motion state, avoiding sudden changes in the player object's posture, speed, etc. when the interactive animation begins. This effectively improves the smoothness of the connection between the runtime animation and the interactive animation, enhancing the interactive experience.
[0057] refer to Figure 2 As shown, it is a flow chart of an animation connection method provided in an embodiment of the present application. The method can be executed by a computer device. In this embodiment, the computer device is described as a terminal device.
[0058] Step 201: In response to an interactive operation on a player object, determine an adapted target control logic.
[0059] Users can control player objects in a virtual interactive scene to perform various actions and achieve a gaming experience. A virtual interactive scene is a computer-generated interactive space, and a player object is a game object that the user can control within the virtual interactive scene, such as a virtual character object. Under user control, the player object's target object motion state can change. The target object motion state can be the player object's state during movement, including body posture, heading angle, and movement speed. For example, the target object motion state may be the player object standing.
[0060] The virtual interactive scene also features interactive objects, which can be virtual objects that can interact with the player object. The state of the interactive object changes before and after the interaction. For example, the interactive object could be a door, which can be opened and closed, causing the door's open and closed state to change. Alternatively, the interactive object could be a box, which the player object can push to change its position.
[0061] Users can trigger interactive operations on player objects. Interactive operations can instruct player objects to perform interactive behaviors on interactive objects. Interactive operations can be door-pushing interactive operations, box-pushing interactive operations, etc. Among them, users can trigger interactive operations in various ways, such as clicking specific buttons to trigger or voice triggering, etc.
[0062] In response to the interactive operation, the terminal device can determine the target control logic that matches the interactive operation. The target control logic can be used to control the player object's interactive behavior. Under the control of the target control logic, the player object can perform a series of actions, and the player object's object motion state continuously changes, thereby completing the interactive process. In other words, the target control logic can control the specific implementation process of the interactive behavior. For example, if the interactive operation is a door-pushing interaction, the target control logic can control the player object to move to the door and reach out to open it.
[0063] Step 202: Control the target object's motion state during the player object's movement toward the interactive object according to the target motion parameters.
[0064] It should be noted that the user can change the target motion state of the player object in the virtual interactive scene by controlling the player object.
[0065] The user views the player objects in the virtual interactive scene through the scene screen displayed by the terminal device. In some three-dimensional virtual interactive scenes, the scene screen is generally obtained by using the virtual camera in the virtual interactive scene as an observer to collect the virtual interactive scene in real time.
[0066] The displayed continuous scene images can be recorded as animation in the embodiment of the present application. The animation is not a pre-recorded video in the conventional sense, but a continuous scene image captured through a virtual interactive scene under the control of the player object.
[0067] When the player object is controlled to perform non-interactive behaviors (such as moving, running, jumping, etc.), the captured scene images can be recorded as runtime animation. When the player object is controlled to perform interactive behaviors (such as opening a door, pushing a box, etc.), the captured scene images can be recorded as interactive animation.
[0068] Because the target object motion state of the player object changes with the user's control before the interactive operation is triggered, the displayed runtime animation is not fixed. That is, the target object motion state of the player object in the runtime animation is random and difficult to predict.
[0069] Among them, the runtime animation is a picture generated based on the user's real-time control of the player object (non-interactive behavior). The picture content of the runtime animation is generated in real time and has a high degree of randomness. For example, if the user controls the player object to run, the runtime animation will display a running picture. At the next moment, the user controls the player object to jump, and the runtime animation will be updated to a jumping picture.
[0070] During the interaction process, the player object performs an interactive behavior on an interactive object, and the displayed screen is an interactive animation. The interactive animation primarily reflects the interaction between the two. The interactive behaviors supported by each interactive object are relatively fixed. Unless the user actively cancels the interactive behavior during the interaction, the user cannot control the implementation of the interactive behavior. The interactive behavior is implemented by the player object under the control of the target control logic. Since the target control logic is fixed after the terminal device determines it, the interactive behavior controlled by the target control logic is also fixed, and the displayed interactive animation is also fixed. Therefore, the player object's object motion state in the interactive animation is fixed, and its inherent object motion state changes will not change with user control.
[0071] For example, if the player object interacts with an interactive object by pushing open a door, the target control logic will display the player object moving toward the door and reaching out to open it. However, before the interaction is triggered, the runtime animation may show the player object facing away from the door, resulting in a discrepancy between the runtime and interactive animations.
[0072] Since runtime animations are displayed in real time when the user performs non-interactive control over the player object, interactive animations display the inherent object motion state changes under the control of fixed target control logic. The object motion state in the interactive animation screen cannot be changed by the user. This results in the player object's object motion state in the interactive screen being very likely to be different from the object motion state in the runtime animation. Therefore, when the user triggers an interactive operation, the player object's object motion state is likely to suddenly change significantly. For example, the player object may suddenly change from facing the door to facing the door, resulting in a poor connection between the interactive animation and the runtime animation. It is easy for the player object to suddenly turn around or quickly switch between left and right feet, making the interactive behavior unnatural and affecting the interactive experience.
[0073] In order to improve the effect of the interactive animation after the animation at runtime, the terminal device can adjust the target motion state of the player object according to the target motion parameter, wherein the target motion parameter can identify the object motion state of the player object when the player object is controlled by the target control logic.
[0074] When a player object performs an interactive action, the target object's motion state continuously changes under the control of the target control logic. To achieve this transition, i.e., to smoothly connect the interactive animation corresponding to the interactive action (or target control logic) to the runtime animation (i.e., the scene before the interactive action is triggered), the player object's target motion state at the end of the runtime animation needs to be adjusted to match the player object's motion state at the start of the target control logic.
[0075] Therefore, the target motion parameters used here to adjust the target motion state are mainly the target motion parameters at the beginning of the target control logic. When the interactive animation corresponding to the target control logic is short, it can also be the complete target motion parameters of the target control logic.
[0076] For example, when interacting with a door, the player object needs to face the door. In the first frame of the interactive animation, the player object is facing the door, and the target motion parameter can be that the player object is facing the door.
[0077] Based on the target motion parameters, the terminal device can adjust the target object's motion state as the player object moves toward the interactive object. This allows the target object's motion state to gradually change during the player object's movement. The player object's movement process is also the target object's motion state adjustment process, which takes a certain time period, allowing the target object's motion state to gradually approach the target motion parameters rather than instantaneously adjusting to them. Furthermore, by controlling the target object's motion state to adjust while the player object is moving, changes in the target object's motion state are less noticeable to the user than adjustments made while the player object is stationary. The adjustment process appears smoother, resulting in a more natural change in the player object's target object motion state.
[0078] For example, when the interactive operation is a door-pushing interaction, before the user triggers the interactive operation, the target object motion state of the player object is facing away from the door. After the interactive operation is triggered and before the interactive behavior is implemented, as the player object approaches the door, the player object can be gradually adjusted from facing away from the door to facing the door, thereby being more in line with the target control logic of facing the door to open the door.
[0079] In one possible implementation, the target motion state of the player object can be at least one of a heading angle and a movement speed. The heading angle of the player object can be the direction the player object is facing in the virtual interactive scene. The virtual interactive scene can be set with a direction orientation, which can be east, south, west, or north. The heading angle can be determined based on the direction orientation. For example, if the player object is facing east, the heading angle of the player object can be determined to be 0°. Furthermore, the interactive object also has a heading angle in the virtual interactive scene, and the orientation relationship between the player object and the interactive object can be determined to facilitate determination of whether the target motion parameters are met.
[0080] As an example, the facing angle of a player object can be the direction of the player object relative to the interactive object. For example, the facing angle can be the angle between the direction the player object is facing and the direction the interactive object is facing. This allows for a more intuitive understanding of the facing relationship between the player object and the interactive object. The facing angle can range from 0° to 180°. A facing angle of 180° indicates that the player object and the interactive object are facing completely opposite directions, meaning the player object is facing the interactive object head-on. A facing angle of 0° indicates that the player object and the interactive object are facing the same direction, meaning the player object is facing the interactive object with its back.
[0081] For example, when the interactive object is a door, the heading angle is the angle between the direction facing the player object and the front of the door. For example, when the interactive object is a box, the heading angle can be the angle between the direction facing the player object and the front of the box.
[0082] Before implementing an interactive behavior, the terminal device can adjust the player object's heading angle based on the difference between the current player object's target motion state and the motion state identified by the target operating parameters, and can also adjust the player object's movement speed to conform to the target motion parameters. The heading angle and movement speed can be adjusted through motion control (Locomotion). In this way, since changes in heading angle and movement speed are more easily observed by the user, by adjusting the heading angle and movement speed in a timely manner, it is possible to avoid sudden large changes in heading angle and movement speed during interaction, which would bring a bad interaction experience to the user, thereby maximizing the interaction experience.
[0083] Step 203: In response to the target object's motion state being consistent with the target motion parameter, the player object is controlled by the target control logic to perform an interactive behavior on the interactive object.
[0084] When the terminal device determines that the player object's target object motion state meets the target motion parameters, the terminal device can, under the control of the target control logic, enable the player object to implement the interactive behavior with the interactive object. This ensures that the player object's target object motion state before implementing the interactive behavior is more consistent with the upcoming interactive behavior. This ensures that the player object's object motion state is highly consistent before and after interacting with the interactive object, minimizing the difference in the player object's object motion state during runtime animation and interactive animation. This allows the player object to enter the interactive behavior process through a more natural state transition. For example, after controlling the player object to face the door, the interactive action of pushing the door can be implemented.
[0085] It can be seen that between the runtime animation and the interactive animation, by controlling the movement of the player object, the object motion state of the player object has been adjusted to meet the requirements of the interactive animation when the interactive animation starts to be displayed. This control process effectively connects the runtime animation and the interactive animation through the adjustment of the object motion state, avoiding sudden changes in the player object's posture, speed, etc. when the interactive animation starts to be displayed, effectively improving the smoothness of the connection between the runtime animation and the interactive animation, and enhancing the interactive experience.
[0086] Because the player object's motion is controlled by the user before triggering an interaction, the player object's position in the virtual interactive scene cannot be predicted in advance and is highly random. Consequently, the relative position between the player object and the interactive object is also random. Target control logic controls the specific implementation of the interaction, controlling the player object's movement along a specific path to implement the interaction. For example, the target control logic can control the player object to start from a position directly in front of a door, move toward the door, and reach out to open it.
[0087] If the positional relationship of the player object relative to the interactive object is not considered, and the same target control logic is used to control the interaction of player objects at any position, if the player object is not directly in front of the door, when the interaction is implemented, the player object will suddenly move from the current position when the interaction is triggered to directly in front of the door, causing the player object's object motion state to suddenly change significantly. The change in the object motion state does not conform to real human behavior, which reduces the user interaction experience.
[0088] In one possible implementation, an offset angle can be used to represent the positional relationship of a player object relative to an interactive object. An interactive object has an interaction direction, which is the direction in which the interactive object can interact with the player object. That is, the player object can interact with the interactive object in the interaction direction. The interaction direction can be pre-set. For example, the interaction direction of a door is perpendicular to the door.
[0089] The offset angle can identify the offset of the player object relative to the interaction direction. It can be the angle between the line between the position of the player object and the position of the interaction object and the interaction direction, thereby reflecting the degree of offset of the player object relative to the interaction object.
[0090] refer to Figure 3 As shown, this is a schematic diagram of the offset angle of a player object relative to an interactive object provided in an embodiment of the present application. The interactive object is a door, and the interaction direction is horizontal. When the interaction is triggered, if the player object is located in the interaction direction of the interactive object, the offset angle can be recorded as 0°. When the player object is located in the vertical direction of the interaction direction, the offset angle is 90° or -90°.
[0091] The terminal device can configure the corresponding first interaction control logic according to different offset angles. Multiple first interaction control logics are control logics that control the player object to perform interactive behaviors at different offset angles. Different first interaction control logics correspond to different offset angles. Therefore, when the player object performs interactive behaviors, it can move along paths in different directions to approach the interactive object.
[0092] In this way, if the player object has different offset angles relative to the interactive object, it means that the player object is located in different directions of the interactive object, and the player object can move in different directions to approach the interactive object. Figure 3 In the example, the interactive object has corresponding first interaction control logic at five offset angles (-90°, -45°, 0°, 45° and 90°), so that the player object can approach the interactive object along the directions corresponding to different offset angles.
[0093] In response to the user's interactive operation on the player object, the terminal device can determine the target offset angle of the player object relative to the interactive object in the virtual interactive scene. The target offset angle is the offset angle of the player object relative to the interactive object at the moment when the user triggers the interactive operation, that is, the target offset angle can identify the offset of the player object relative to the interaction direction of the interactive object when the interactive operation is triggered.
[0094] The terminal device can determine the first target control logic that is compatible with the target offset angle from multiple first interaction control logics based on the target offset angle. Specifically, the appropriate first interaction control logic can be selected as the first target control logic based on the target offset angle to control the player object to move in a direction that is compatible with the target offset angle to approach the interaction object, thereby implementing interactive behavior.
[0095] For example, when the target offset angle is 0°, the player object moves along the interaction direction to approach the door under the control of the adapted first interaction control logic, that is, gradually approaches the door from the front of the door. When the target offset angle is 90°, then in the process of implementing the interactive behavior, the player object's movement direction is perpendicular to the interaction direction of the door, and gradually approaches the door from the side of the door.
[0096] Therefore, when determining the target control logic, the terminal device can combine the target offset angle of the player object relative to the interactive object. In this way, the determined first target control logic can match the target offset angle, so that when the player object moves closer to the interactive object, the direction of the player object's current position at the moment of triggering the interaction can be considered, and the player object moves in the direction of the current position and the position of the interactive object. This ensures that the player object can approach the interactive object in the corresponding direction at different offset angles, avoiding a large change in the direction of the player object when the player object needs to move from the current position to the starting position of the interaction implementation indicated by the unique target control logic. This allows the implementation process of the interactive behavior to be adaptively adjusted according to the direction of the player object, selects a suitable movement path for the player object, and makes the change in the player object's object motion state conform to real human behavior. The direction of the player object will not suddenly change significantly, and the interactive animation will be displayed more naturally.
[0097] In the process of determining the adapted first target control logic based on the target offset angle, if the terminal device is configured with a first interactive control logic that is exactly the same as the target offset angle, then the first interactive control logic can be directly used as the first target control logic. If the terminal device is not configured with a first interactive control logic that is exactly the same as the target offset angle, then the first target control logic can be determined by considering the difference between the target offset angle and the offset angles corresponding to the various first interactive control logics.
[0098] In one possible implementation, when determining the difference between the target offset angle and the offset angles corresponding to each first interactive control logic, the offset angle corresponding to the first interactive control logic may be recorded as the designated offset angle, and the terminal device may obtain the designated offset angles corresponding to each of the multiple first interactive control logics. The terminal device may determine the difference between the target offset angle and each designated offset angle. The difference may measure the degree of difference between the target offset angle and the designated offset angle, and the difference may be, for example, the difference between the two.
[0099] If the difference between the target offset angle and the specified offset angle is smaller, it means that the target offset angle is closer to the specified offset angle, and the target offset angle is more adapted to the first interactive control logic corresponding to the specified offset angle. The first interactive control logic corresponding to the specified offset angle with the smallest difference can be used as the first target control logic.
[0100] For example, you can configure 5 first interactive control logics, corresponding to -90°, -45°, 0°, 45° and 90°, refer to Figure 4 As shown, a schematic diagram of the movement path of a player object provided in an embodiment of the present application is provided. The target offset angle of the player object relative to the interactive object is -40°. The first interactive control logic corresponding to the offset angle of -45° can be used as the first target control logic adapted to the target offset angle of -40°. The dotted line is the movement path of the player object, so as to control the player object to approach the interactive object.
[0101] That is to say, each first interaction control logic can correspond to a certain range of offset angles. For example, the first interaction control logic corresponding to the specified offset angle of 45° can cover the range of 22.5° to 67.5°. That is, when the target offset angle is between 22.5° and 67.5°, the first interaction control logic corresponding to 45° can be used as the target control logic.
[0102] By using the first interaction control logic corresponding to the specified offset angle that has the smallest difference from the target offset angle as the first target control logic, when the player object moves from the current position when the interaction is triggered to the starting position of the interaction implementation corresponding to the first target control logic, the direction of the player object relative to the interaction object will not change significantly, which can minimize the direction change of the player object during the movement toward the interaction object, making it difficult for users to notice the direction change of the player object in the interaction screen, thereby making the player object more natural when performing interactive behaviors.
[0103] In the embodiment of the present application, when the player object performs an interactive behavior on the interactive object, if the player object is far away from the interactive object, the target control logic can control the player object to move near the interactive object and then interact (such as pushing open the door). Figure 5 As shown, this is a schematic diagram of different positions of a player object when triggering an interactive operation provided by an embodiment of the present application. When the player object is at position 1, position 2 or position 4, the target control logic needs to control the player object to move a certain distance toward the interactive object to get closer to the interactive object.
[0104] also, Figure 5 The middle arc line has the interaction check distance as its radius. The interactive object has a certain interaction check distance. The interaction check distance is the maximum distance between the two when the target control logic can control the player object to interact with the interactive object. The target control logic can control the player object to implement interactive behaviors within the interaction check distance, that is, the interaction check distance identifies whether the player object is located at the position where it can implement interactive behaviors on the interactive object. When the interactive object is in position 1, the player object needs to move to the position of the arc line through Locomotion before the object motion state can be adjusted to implement interactive behaviors. That is, when the distance between the player object and the interactive object is not greater than the interaction check distance, the player object can be controlled by the target control logic to implement interaction. If the interactive object is in position 2, position 3 or position 4, there is no need to perform Locomotion movement control on the player object, and the object motion state can be directly adjusted to implement interactive behaviors.
[0105] If the player object is relatively close to the interactive object, such as only one step away from the door, Figure 5 If the player object is at position 3, or closer to the interactive object, the target control logic doesn't need to control the player object's movement and can directly open the door. In other words, the target control logic's behavior changes differently depending on the distance between the player object and the interactive object, resulting in noticeable differences in the displayed interactive screen.
[0106] In one possible implementation, when determining the adapted target control logic, the terminal device may determine a target distance between the player object and the interactive object. The target distance may be the distance between the player object's location and the interactive object's location in the virtual interactive scene when the user triggers the interactive operation. In other words, the terminal device determines the target distance between the player object and the interactive object in the virtual interactive scene in response to the interactive operation directed at the player object.
[0107] Specifically, the terminal device can set a direct interaction distance threshold for the interactive object. The direct interaction distance threshold is the maximum distance at which the player can directly interact with the interactive object. Direct interaction means that the player can interact with the interactive object directly without moving a long distance to approach the interactive object. For example, when the player is near a box, the player can directly touch the box to perform the interaction of pushing the box without moving significantly. In other words, when the distance between the player and the interactive object is equal to the direct interaction distance threshold, the player can directly interact with the interactive object, such as when the player is at position 3.
[0108] When the target distance between the player object and the interactive object is less than the direct interaction distance threshold, it means that the player object is within the range represented by the direct interaction distance threshold. The player object is close enough to the interactive object to interact directly with the interactive object. The player object does not need to make a large displacement to get closer to the interactive object. Then, the second target control logic adapted for directly implementing the interactive behavior can be determined. Figure 5 In the example, when the player object is at position 3, the second target control logic is adapted, indicating that the player object does not need to make a large displacement and can directly implement the interaction.
[0109] Therefore, when the terminal device determines that the player object is close enough to the interactive object, it can control the player object to interact directly with the interactive object through the second target control logic. In the process of implementing the interactive behavior, the player object does not need to make a large amount of displacement to get close to the interactive object, and can directly interact with the interactive object by opening doors, pushing boxes, etc., thereby making the implementation process of the interactive behavior more conventional, the interactive picture more realistic, and improving the user interaction experience.
[0110] When the player object is close enough to the interactive object, when the user triggers the interactive operation, the player object's orientation angle cannot be determined in advance. For example, it may be facing the door directly or facing the door at an angle. When determining the second target control logic, the player object's orientation angle needs to be considered so that the interactive animation conforms to the player object's orientation angle.
[0111] In one possible implementation, corresponding second interaction control logics can be configured at different orientation angles. Multiple second interaction control logics control the player object to directly implement the interaction behavior in different ways. The second interaction control logic can control the player object to implement the interaction according to the specific direction of the player object toward the interaction object. Figure 6 , which is a schematic diagram of the orientation angle of a player object provided in an embodiment of the present application. The orientation of the player object can be facing the interactive object, or facing the back of the interactive object.
[0112] Specifically, in the process of determining the second target control logic, if the target distance is less than the direct interaction distance threshold, the target orientation angle of the player object is determined, and the second target control logic adapted to the target orientation angle is determined from multiple second interaction control logics.
[0113] Among them, the target orientation angle can be the orientation angle of the player object when the user triggers the interactive operation. The target orientation angle can be compared with the orientation angles corresponding to each second interactive control logic to determine the second interactive control logic that is most suitable for the target orientation angle as the second target control logic. For example, the target orientation angle can be compared with each orientation angle to determine the second interactive control logic corresponding to the orientation angle with the smallest difference as the second target control logic.
[0114] When the player object performs an interactive behavior on the interactive object, for example, when pushing a box at an offset angle of 0°, by setting the corresponding second interactive control logic at each orientation angle, the player object can push the box from the front, back, left side, and right side, thereby satisfying the requirement that interactive behaviors can be performed at multiple orientation angles, thereby improving the interactive display effect.
[0115] It can be seen from this that when determining the second target control logic for directly implementing interactive behaviors, it can be determined based on the target orientation angle of the player object when the interactive operation is triggered. In this way, no matter which direction the player object is facing, the terminal device can directly implement the interactive behavior at that orientation angle. For example, the player object can reach out to open the door when facing the door at an angle, without having to adjust the orientation of the player object to face the door head-on, thereby meeting the needs of the player object to implement interactive behaviors in various orientations, making the interactive animation more diverse, and improving the user's interactive experience.
[0116] Because the target control logic can continuously change the player object's motion state during the process of controlling the player object's interactive behavior, the object's motion state is different at each moment, thus forming a complete interactive animation. However, the interactive operation is triggered by the user, and parameters such as the distance between the player object and the interactive object are not consistent. When implementing the interactive behavior, it may not be necessary to display all the interactive animation screens. Therefore, when implementing the interactive behavior, it is necessary to determine which screen the interactive animation starts.
[0117] In one possible implementation, the target control logic may include multiple consecutive control frames, which can control the change of the object motion state of the player object, such as controlling the change of the orientation angle of the player object, from a standing posture to a jumping posture, etc. Multiple consecutive control frames can realize the continuous change of the object motion state, and the interactive screen can be displayed continuously.
[0118] The terminal device can determine the interaction environment parameters when the motion state of the target object meets the target motion parameters. The interaction environment parameters can be the relevant parameters in the virtual interaction environment when the player object reaches the target motion parameters, which can reflect the relevant parameters of the player object and the interaction object at the critical moment before the interactive behavior is implemented.
[0119] The terminal device can match the interaction environment parameters with each control frame in the target control logic, and determine the starting control frame from multiple control frames. The starting control frame can adapt to the interaction environment parameters. Among them, the starting control frame is not necessarily the first control frame in multiple consecutive control frames, but a control frame that can match the interaction environment parameters. The sorting position of the starting control frame in multiple consecutive control frames is arbitrary.
[0120] The terminal device can control the player object to perform interactive behaviors starting from the starting control frame. That is to say, in the process of the player object performing interactive behaviors to the interactive object, at the beginning of the interaction, the object control state of the player object is controlled by the starting control frame. The starting control frame can determine the display screen when the interactive animation just starts.
[0121] In this way, at the beginning of the interactive behavior, a matching starting control frame can be determined based on the current interactive environment parameters, so that the object motion state of the player object changes less before and after the interactive behavior, and the change of the object motion state is more coherent and natural, thereby controlling the connection between the first screen of the interactive screen and the last screen before the interaction to be smoother, thereby improving the smoothness of the animation connection.
[0122] In one possible implementation, the interaction environment parameters may include the target distance between the player object and the interactive object, as well as the object posture of the player object. The terminal device may consider the target distance and object posture when determining the starting control frame. The shorter the target distance, the closer the player object is to the interactive object, which shortens the duration of the interactive behavior and the duration of the interactive screen. Therefore, the target distance may affect the determination of the starting control frame. The object posture may be the player object's body posture, such as left leg in front, right leg in front, etc. Changes in the object posture are more easily perceived by the user in the interactive screen, so the object posture may also be considered when determining the starting control frame.
[0123] Specifically, the interactive object has a posture adjustment distance, which can be the minimum distance between the player object and the interactive object when the terminal device can adjust the object posture of the player object. By comparing the target distance between the player object and the interactive object with the posture adjustment distance, it can be determined whether the terminal device adjusts the object posture of the player object. Figure 7As shown, it is a schematic diagram of a posture adjustment distance provided in an embodiment of the present application. The arc-shaped dotted line in the figure is the boundary of the posture adjustment distance. Position 4 and position 3 are within the posture adjustment distance, and position 1 and position 2 are outside the posture adjustment distance.
[0124] When the target distance between the player object and the interactive object is greater than or equal to the posture adjustment distance, such as position 1 and position 2, it means that the player object is relatively far away from the interactive object. There is enough distance between the player object and the interactive object for fine adjustment of the player object's object posture. Therefore, the starting control frame can be determined based on the player object's object posture.
[0125] Because the target control logic includes multiple consecutive control frames, the order in which the multiple control frames are arranged is referred to as the control sequence. The multiple control frames sequentially control the player object's object motion state according to the control sequence. The object motion state may also include an object posture. Thus, under the control of each control frame, the player object's object posture may change differently. The terminal device may pre-configure a corresponding object posture for each control frame. When the player object's object posture matches the pre-set object posture, it indicates that the player object's object posture matches the control frame.
[0126] Therefore, when the terminal device determines the starting control frame that matches the interaction environment parameters, it can perform posture matching on multiple control frames in sequence according to the object posture of the player object when the target motion parameters are met. The earlier the control order of the control frame, the more priority the object posture of the player object will have in posture matching with the control frame with an earlier control order. Posture matching can be understood as comparing the object posture of the player object with the object posture pre-configured for the control frame. When the comparison is consistent, it means that the object posture is matched. Therefore, when the terminal device matches the appropriate object posture for the first time, the control frame corresponding to the object posture can be used as the starting control frame, that is, the terminal device uses the first (that is, the first) matched control frame as the starting control frame.
[0127] Since the target distance is not less than the posture adjustment distance, the player object is relatively far away from the interactive object. In order to more completely realize the control process of the target control logic on the player object, the posture of each control frame can be matched in sequence according to the control order of the control frame, and the first matched control frame is used as the starting control frame. The first control frame has a higher control order in the target control logic, so there can be more control frames from the starting control frame to control the player object, so that the object motion state changes of the player object can be richer during the implementation of the interactive behavior, and when the target distance is relatively large, the object motion state changes of the player object are smoother and the player object's movements are more natural.
[0128] When the target distance is less than the posture adjustment distance, it means that the player object is relatively close to the interactive object, such as Figure 7 At position 4 and position 3, if posture matching is used to determine the starting control frame, and the first matched control frame is determined as the starting control frame, since the control order of the starting control frame is relatively early, there are a large number of control frames to control the implementation process of the interactive behavior of the player object. However, at this time, the distance between the player object and the interactive object is relatively close, and the time it takes for the player object to complete the interactive behavior will be relatively short. This results in the need to accommodate a large number of player object motion state changes in a short period of time, and a large number of object motion state changes actually require more time to display normally, that is, the display animation takes a long time, which will lead to poor display of the display animation, for example, the player object's footsteps may move too fast.
[0129] Since the multiple control frames in the target control logic are arranged in a control order, and the interactive object has a certain interaction check distance, the interaction check distance is the maximum distance between the player object and the interactive object when the target control logic can control the player object to interact with the interactive object. The target control logic can control the player object to implement interactive behaviors within the interaction check distance. That is, the target control logic and the interaction check distance are in a corresponding relationship. Each control frame in the target control logic corresponds to the player object at a different distance from the interactive object. For example, the earlier the control order of the control frame, the farther the player object corresponding to the control frame is from the interactive object. Therefore, when the target distance is less than the posture adjustment distance, the control frame corresponding to the target distance can be determined from multiple control frames as the starting control frame.
[0130] In this way, according to the target distance between the player object and the interactive object, the control frame corresponding to the target distance is used as the starting control frame, and the player object is controlled according to the control sequence starting from the starting control frame. The time required for the continuous change of the player object's object motion state is matched with the target distance, which can ensure that within the limited target distance, the display time of the interactive screen will not be too long, the display of the interactive screen will be more natural, and the situation where the player object's footsteps move too fast can be avoided.
[0131] When the player object is a humanoid object, the object posture of the humanoid object may be different in that the left foot is in front or the right foot is in front. For example, when the object posture is a step, the humanoid object may have the left foot in front or the right foot in front.
[0132] refer to Figure 8 As shown, this is a schematic diagram of the object posture change of a player object provided in an embodiment of the present application. Each object posture corresponds to a control frame, and all object posture changes can constitute a complete motion cycle. The object posture corresponding to control frame 1 and the object posture corresponding to control frame 13 are both in a state where both feet are in contact with the ground. The difference lies in the relative relationship between the left foot and the right foot.
[0133] If the control sequence of multiple control frames in the target control logic is consistent with the order of object posture changes in the motion cycle, that is, according to Figure 8 The posture matching of the object posture change process shown in the figure will result in that if the posture matches the later object posture, for example, it matches the object posture corresponding to control frame 13, the control frame corresponding to the object posture corresponding to control frame 13 will be used as the starting control frame. Since the object posture corresponding to control frame 13 is sorted relatively late in the motion cycle, the player object will lose a lot of displacement distance.
[0134] In order to avoid the player object from losing a large amount of displacement distance, for any target control frame in the first n control frames of the target control logic, the first sub-control frame and the second sub-control frame can be set for the target control frame. The first sub-control frame is for the left foot posture, and the second sub-control frame is for the right foot posture. That is, the first sub-control frame and the second sub-control frame correspond to the same object posture, but the object posture is distinguished between the left foot in front and the right foot in front. The first sub-control frame represents the object posture when the left foot of the humanoid object is in front, and the second sub-control frame represents the object posture when the right foot of the humanoid object is in front.
[0135] In this way, under one target control frame, the object posture with the left foot in front and the object posture with the right foot in front can be corresponded. When posture matching is performed based on the object posture and the target control frame, if the first sub-control frame in the target control frame is matched, the first sub-control frame is used to represent the target control frame as the starting control frame. Similarly, if the second sub-control frame is matched, the second sub-control frame is used to represent the target control frame as the starting control frame.
[0136] For example, if the pose matches Figure 8 The object posture corresponding to the control frame 13 shown is as follows. Since the object posture corresponding to the control frame 13 and the control frame 1 differ only in whether the left foot or the right foot is in front, in this application, the control frame 13 and the control frame 1 can be located as two sub-control frames at the sorting position of the control frame 1, then the distance between the player object and the interactive object corresponding to the object posture corresponding to the control frame 13 will be larger.
[0137] It can be seen from this that by setting the sub-control frames corresponding to the left foot in front and the right foot in front of the same object posture under the same target control frame, when the player object performs posture matching, no matter whether it matches the object posture with the left foot in front or the object posture with the right foot in front, the terminal device can start controlling the implementation of the interactive behavior in the control order where the target control frame is located. The player object can match the target control frame with a higher control order, which can reduce the displacement distance lost by the player object when implementing the interactive behavior, making the interactive animation display more complete.
[0138] In an embodiment of the present application, in the process of controlling the player object to interact through the target control logic, the object motion state of the player object may be different from the object motion state preset at the final interaction position. For example, the orientation angle of the player object is 15°. Under the control of the target control logic, the orientation angle of the player object at the final interaction position (i.e., the interaction point) needs to reach 0°. Therefore, in the process of implementing the interactive behavior, the object motion state of the player object needs to be adjusted.
[0139] Specifically, a final interaction position can be set for the interactive object. At this final interaction position, the interactive object's object motion state changes under the control of the player object, such as a door opening or a change in the position of a box. In other words, the final interaction position is the position of the player object in the virtual interactive scene when the object motion state of the interactive object changes, that is, the position of the player object when the player object performs an interactive behavior on the interactive object. The object motion state of the player object at the final interaction position can be recorded as the final object motion state. When the player object reaches the final object motion state at the final interaction position, the object motion state of the interactive object can be changed by the player object.
[0140] During the process of controlling the player object by the terminal device, if there is a difference between the object motion state of the player object and the final object motion state, such as a difference in the heading angle, movement speed, etc., the object motion state of the player object can be fine-tuned and controlled to gradually reduce the difference so that the object motion state of the player object gradually conforms to the final object motion state. This avoids the object motion state of the player object suddenly adjusting to the final object motion state when the player object reaches the final interactive position, such as the heading angle of the player object suddenly changing from 15° to 0°. The present application can gradually adjust the object motion state within a certain moving distance before the player object reaches the final interactive position, thereby avoiding a sudden change in the object motion state of the player object, making the player object behavior smoother and improving the interactive experience.
[0141] In one possible implementation, in the process of controlling the player object, the fine-tuning control of the object motion state can be a transition control for controlling the sliding of the player object. The transition control can be used when the distance between the player object and the interactive object does not match the object motion state change process of the player object under the control of the target control logic. For example, when the distance between the player object and the interactive object is greater than the distance required for the object motion state change, the player object can be made to slide in the virtual interactive scene through transition control, thereby increasing the moving distance of the player object under the control of the target control logic, so that the distance between the player object and the interactive object matches the object motion state change process, thereby reducing the difference between the object motion state of the player object and the final object motion state.
[0142] Specifically, when the player object is a humanoid object, if the player object is controlled to slide with both feet on the ground, due to the contact between both feet and the ground, the interactive screen will show that the player object is slipping on the ground, the sliding step is large, and the interactive behavior is unnatural. Therefore, the transition control can be triggered when the player object's feet are off the ground. When both feet are off the ground, the player object can be fine-tuned to control the sliding, the sliding step will be smaller, and the interactive behavior will be more natural.
[0143] The terminal device's fine-tuning control of the object's motion state can also be used to control the rotation of the player object. The rotation control can be used when the player object's orientation angle is significantly different from the orientation angle at the final interaction position. By rotating the player object, its orientation angle can be changed. The rotation control can be triggered when the player object lands on one foot. The rotation process is more natural, which can avoid dizziness when the user watches the interactive screen and improve the interactive experience.
[0144] In the embodiments of this application, in practical applications, refer to Figure 9 As shown, a configuration diagram for performing animation display provided by an embodiment of the present application is provided. When the event entering state (Event Entering State) is in the start entering state (OnStart Entering), the user clicks the E key to put it in the trigger state (In Entering State). In response to the trigger operation, the terminal device can switch the motion model provider (Switch Motion Model Provider), and the terminal device begins to control the player object. When the event state is in the playing interactive animation (On Playing Interact Animation), the target position (Target Position) and target facing (Target Facing) of the player object can be set, and the best interactive animation Best Interact Anim (that is, the target control logic is determined) is determined in combination with the object motion state of the player object, and then the interactive animation (Playing Interact Anim) is played.
[0145] refer to Figure 10 As shown, this is a schematic diagram of parameters related to an interactive animation selection strategy provided in an embodiment of the present application. The control information may include a description (Description), a control range (Control Range), a behavior configuration (Behavior Config), a metric setting time (Metrics Setting Time Traj), a metric setting pose (Metrics Setting Pose) and an animation style configuration (Anim Style Configs) in order to select the best interactive animation.
[0146] refer to Figure 11 As shown, it is a configuration diagram for displaying an interactive animation provided by an embodiment of the present application. When displaying an interactive animation, the target position (Target Location) of the player object can be determined according to the target position interaction information (Interact Info Target Position), the target orientation (Target Facing) can be determined according to the target orientation interaction information (Interact Info TargetFacing), the interactive animation (Anim For Interaction) can be determined according to the interaction information (Interact Info Entering Best Anim), the animation index (Index In Anim) can be performed according to the interaction information (Interact Info Entering Best Anim Index), and the animation playback follower (Anim Playing Tracker) can be controlled to run according to the animation playback follower interaction information (Interact Info Entering Anim Playing Tracker) to display the interactive animation to the user.
[0147] refer to Figure 12 As shown, it is a flow chart of an animation connection process provided in an embodiment of the present application. The user can trigger an interactive operation by clicking a virtual button or a physical button. In response to the interactive operation, the terminal device can determine the target control logic according to the target offset angle or orientation angle of the player object relative to the interactive object.
[0148] Among them, the target control logic is the first interactive control logic (i.e., the first target control logic) corresponding to the specified offset angle that is the smallest difference from the target offset angle. For example, when the specified offset angle is 90°, it corresponds to the first interactive control logic A1, and when the specified offset angle is -90°, it corresponds to the first interactive control logic A2. When the target offset angle is -80°, the target control logic is A2.
[0149] When the target distance is less than the direct interaction distance threshold, based on the facing angle of the player object (for example, the facing angle is 30°), the target control logic is the second target control logic that can directly implement the interactive behavior at a facing angle of 30°. Compared with the first target control logic, the second target control logic does not need to control the player object to perform large displacements. For example, when the player object is relatively close to the interactive object and the facing angle is 30°, the second target control logic can directly control the player object to reach out and open the door at a facing angle of 30°, without moving from a distance to the vicinity of the door, and without adjusting the facing angle to 0°.
[0150] Specifically, if the player object is outside the interaction check distance when the interaction operation is triggered, the terminal device can use Locomotion control to move the player object to the interaction check distance. If the player object is already within the interaction check distance when the interaction operation is triggered, the movement speed and direction angle can be adjusted.
[0151] If the player object's movement speed and heading angle do not meet the preset movement speed and preset heading angle, Locomotion can be used to control the player object's movement until the target motion parameters are met, and then the target control logic can be used to control the player object to perform interactive behaviors on the interactive object.
[0152] During the implementation of interactive behaviors, the player object can be controlled to perform interactive behaviors starting from the starting control frame. When the interactive operation is triggered, if the player object is outside the interaction check distance, and the player object's movement speed and heading angle are adjusted to meet the requirements, the distance between the player object and the interactive object is generally greater than the posture adjustment distance. Therefore, posture matching can be used to determine the starting control frame.
[0153] When an interaction is triggered, if the player object is within the interaction check distance but outside the direct interaction distance, if the target distance is less than the posture adjustment distance, a distance match is performed based on the player object's target distance to determine the starting control frame. Otherwise, a posture match is performed based on the player object's posture to determine the starting control frame. If the player object is within the direct interaction distance when an interaction is triggered, the player object can interact directly with the interactive object, such as opening a door and displaying an interaction animation.
[0154] In addition, if the player object is a humanoid object, a control frame may include a first sub-control frame in which the object posture is left foot first and a second sub-control frame in which the object posture is right foot first, and the start control frame is determined from the sub-control frames.
[0155] During the process of the player object performing interactive behavior towards the interactive object, transition control can be used to control the sliding of the player object, and rotation control can also be used to control its sliding, so that the object motion state of the player object conforms to the object motion state at the final interactive position.
[0156] refer to Figure 13 FIG. 1 is a schematic diagram of an animation connection device provided in an embodiment of the present application. The animation connection device 1300 includes:
[0157] A determining unit 1301 is configured to determine an adapted target control logic in response to an interactive operation on a player object, wherein the interactive operation is used to instruct the player object to perform an interactive behavior on the interactive object in a virtual interactive scene, and the target control logic is a control logic for controlling the player object to perform the interactive behavior;
[0158] A first control unit 1302 is configured to control a target object motion state of the player object during its movement toward the interactive object according to a target motion parameter, wherein the target motion parameter is used to identify the object motion state of the player object when the player object is controlled by the target control logic;
[0159] The second control unit 1303 is configured to control the player object to perform the interactive behavior on the interactive object through the target control logic in response to the target object's motion state being consistent with the target motion parameter.
[0160] Optionally, the determining unit is configured to:
[0161] In response to the interactive operation on the player object, determining a target offset angle of the player object relative to the interactive object in the virtual interactive scene, the target offset angle identifying an offset of the player object relative to an interaction direction of the interactive object;
[0162] According to the target offset angle, the first target control logic adapted to the target offset angle is determined from multiple first interaction control logics. The multiple first interaction control logics are control logics for controlling the player object to perform interactive behaviors at different offset angles, and different first interaction control logics are adapted to different offset angles.
[0163] Optionally, the determining unit is configured to:
[0164] Obtaining specified offset angles corresponding to a plurality of the first interactive control logics respectively;
[0165] determining a difference between the target offset angle and the specified offset angle;
[0166] The first interactive control logic corresponding to the designated offset angle with the smallest difference is determined as the first target control logic.
[0167] Optionally, the determining unit is configured to:
[0168] In response to the interactive operation on the player object, determining a target distance between the player object and the interactive object in the virtual interactive scene;
[0169] If the target distance is less than the direct interaction distance threshold, a second target control logic for directly implementing the interaction behavior is determined.
[0170] Optionally, the second target control logic is one of a plurality of second interaction control logics, and the plurality of second interaction control logics are control logics for controlling the player object to directly perform interactive behaviors at different orientation angles of the player object;
[0171] The determining unit is configured to:
[0172] If the target distance is less than a direct interaction distance threshold, determining a target facing angle of the player object;
[0173] The second target control logic adapted to the target orientation angle is determined from a plurality of the second interactive control logics.
[0174] Optionally, the target object motion state includes at least one of a facing angle and a moving speed of the player object.
[0175] Optionally, the second control unit is configured to:
[0176] Determining interaction environment parameters when the target object motion state meets the target motion parameters;
[0177] Determining a starting control frame that matches the interaction environment parameters from the target control logic, the target control logic includes a plurality of consecutive control frames, and the starting control frame is one of the plurality of control frames;
[0178] Starting from the starting control frame, the player object is controlled to perform the interactive behavior on the interactive object.
[0179] Optionally, the interaction environment parameters include a target distance between the player object and the interaction object and an object posture of the player object, and the second control unit is configured to:
[0180] In response to the target distance being greater than or equal to the posture adjustment distance, performing posture matching on the plurality of control frames based on the control order of the plurality of control frames according to the posture of the object, and determining the control frame that is matched first as the starting control frame;
[0181] In response to the target distance being smaller than the posture adjustment distance, a control frame corresponding to the target distance is determined from the plurality of control frames as the starting control frame.
[0182] Optionally, when the player object is a humanoid object, any one of the first n control frames of the target control logic is provided with a first sub-control frame for a left footstep and a second sub-control frame for a right footstep;
[0183] The second determining unit is configured to:
[0184] When posture matching is performed with the target control frame according to the object posture, in response to matching the first sub-control frame, the first sub-control frame is used to represent the target control frame as the starting control frame; in response to matching the second sub-control frame, the second sub-control frame is used to represent the target control frame as the starting control frame.
[0185] Optionally, the second control unit is configured to:
[0186] In the process of controlling the player object, the player object is fine-tuned and controlled based on the difference between the object motion state of the player object and the final object motion state of the player object at the final interaction position, and the final interaction position is the position of the player object when performing the interaction behavior on the interaction object.
[0187] Optionally, the fine-tuning control includes a transition control for controlling the sliding of the player object and a rotation control for controlling the rotation of the player object;
[0188] Wherein, when the player object is a humanoid object, the transition control is triggered when both feet of the player object leave the ground, and the rotation control is triggered when one foot of the player object touches the ground.
[0189] The embodiment of the present application further provides a computer device, including a terminal device or a server, in which the aforementioned animation connection device can be configured. The computer device is described below with reference to the accompanying drawings.
[0190] If the computer device is a terminal device, see Figure 14 As shown, the embodiment of the present application provides a terminal device, taking a mobile phone as an example:
[0191] Figure 14 The block diagram shows a partial structure of the mobile phone provided by the embodiment of the present application. Figure 14 The mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will understand that Figure 14 The mobile phone structure shown in the figure does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0192] The following combination Figure 14 A detailed introduction to the various components of a mobile phone:
[0193] The RF circuit 1410 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1480 for processing. In addition, the designed uplink data is sent to the base station.
[0194] Memory 1420 can be used to store software programs and modules. Processor 1480 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in memory 1420. Memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, memory 1420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0195] The input unit 1430 may be configured to receive input digital or character information and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432 .
[0196] The display unit 1440 may be configured to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441 .
[0197] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
[0198] The audio circuit 1460 , the speaker 1461 , and the microphone 1462 can provide an audio interface between the user and the mobile phone.
[0199] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1470, providing users with wireless broadband Internet access.
[0200] The processor 1480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1420 and calling data stored in the memory 1420.
[0201] The mobile phone also includes a power supply 1490 (such as a battery) for supplying power to various components.
[0202] In this embodiment, the processor 1480 included in the terminal device is also used to execute the steps in the methods of each embodiment of the present application.
[0203] If the computer device is a server, this embodiment of the application also provides a server, see Figure 15 As shown, Figure 15 The structural diagram of the server 1500 provided in the embodiment of the present application, the server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) for storing application programs 1542 or data 1544. Among them, the memory 1532 and the storage medium 1530 can be temporary storage or permanent storage. The program stored in the storage medium 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 can be configured to communicate with the storage medium 1530 to execute a series of instruction operations in the storage medium 1530 on the server 1500.
[0204] The server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0205] The steps performed by the server in the above embodiment can be based on Figure 15 The server structure shown.
[0206] In addition, an embodiment of the present application further provides a storage medium, which is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.
[0207] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the method provided in the above embodiment.
[0208] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store computer programs.
[0209] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program that has a predetermined function and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0210] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0211] The above is only one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Moreover, based on the implementation methods provided in the above aspects, the present application can also be further combined to provide more implementation methods. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. An animation connection method, characterized in that: The method comprises: In response to an interactive operation on a player object, determining an adapted target control logic, wherein the interactive operation is used to instruct the player object to perform an interactive behavior on the interactive object in a virtual interactive scene, and the target control logic is a control logic for controlling the player object to perform the interactive behavior; controlling a target object motion state of the player object during movement toward the interactive object according to a target motion parameter, the target motion parameter being used to identify the object motion state of the player object when the player object is controlled by the target control logic; In response to the target object motion state being consistent with the target motion parameter, the player object is controlled by the target control logic to perform the interactive behavior on the interactive object.
2. The method according to claim 1, characterized in that The step of determining the adapted target control logic in response to the interactive operation on the player object includes: In response to the interactive operation on the player object, determining a target offset angle of the player object relative to the interactive object in the virtual interactive scene, the target offset angle identifying an offset of the player object relative to an interaction direction of the interactive object; According to the target offset angle, the first target control logic adapted to the target offset angle is determined from multiple first interaction control logics. The multiple first interaction control logics are control logics for controlling the player object to perform interactive behaviors at different offset angles, and different first interaction control logics are adapted to different offset angles.
3. The method according to claim 2, characterized in that The determining, according to the target offset angle, the first target control logic adapted to the target offset angle from a plurality of first interactive control logics includes: Obtaining specified offset angles corresponding to a plurality of the first interactive control logics respectively; determining a difference between the target offset angle and the specified offset angle; The first interactive control logic corresponding to the designated offset angle with the smallest difference is determined as the first target control logic.
4. The method according to claim 1, wherein The step of determining the adapted target control logic in response to the interactive operation on the player object includes: In response to the interactive operation on the player object, determining a target distance between the player object and the interactive object in the virtual interactive scene; If the target distance is less than the direct interaction distance threshold, a second target control logic for directly implementing the interaction behavior is determined.
5. The method according to claim 4, characterized in that The second target control logic is one of a plurality of second interaction control logics, and the plurality of second interaction control logics are control logics for controlling the player object to directly perform interaction behaviors at different orientation angles of the player object; If the target distance is less than the direct interaction distance threshold, determining a second target control logic for directly implementing the interaction behavior includes: If the target distance is less than a direct interaction distance threshold, determining a target facing angle of the player object; The second target control logic adapted to the target orientation angle is determined from a plurality of the second interactive control logics.
6. The method according to claim 1, characterized in that The target object motion state includes at least one of a facing angle and a moving speed of the player object.
7. The method according to any one of claims 1 to 6, characterized in that The controlling the player object to implement the interactive behavior on the interactive object through the target control logic includes: Determining interaction environment parameters when the target object motion state meets the target motion parameters; Determining a starting control frame that matches the interaction environment parameters from the target control logic, the target control logic includes a plurality of consecutive control frames, and the starting control frame is one of the plurality of control frames; Starting from the starting control frame, the player object is controlled to perform the interactive behavior on the interactive object.
8. The method according to claim 7, characterized in that The interactive environment parameters include a target distance between the player object and the interactive object and an object posture of the player object, and determining a starting control frame matching the interactive environment parameters from the target control logic includes: In response to the target distance being greater than or equal to the posture adjustment distance, performing posture matching on the plurality of control frames based on the control order of the plurality of control frames according to the posture of the object, and determining the control frame that is matched first as the starting control frame; In response to the target distance being smaller than the posture adjustment distance, a control frame corresponding to the target distance is determined from the plurality of control frames as the starting control frame.
9. The method according to claim 8, characterized in that When the player object is a humanoid object, any target control frame in the first n control frames of the target control logic is provided with a first sub-control frame for the left footstep and a second sub-control frame for the right footstep; The performing posture matching on the plurality of control frames based on the control order of the plurality of control frames according to the posture of the object, and determining the control frame that is matched first as the starting control frame, includes: When posture matching is performed with the target control frame according to the object posture, in response to matching the first sub-control frame, the first sub-control frame is used to represent the target control frame as the starting control frame; in response to matching the second sub-control frame, the second sub-control frame is used to represent the target control frame as the starting control frame.
10. The method according to any one of claims 1 to 6, characterized in that: The controlling the player object to implement the interactive behavior on the interactive object through the target control logic includes: In the process of controlling the player object, the player object is fine-tuned and controlled based on the difference between the object motion state of the player object and the final object motion state of the player object at the final interaction position, and the final interaction position is the position of the player object when performing the interaction behavior on the interaction object.
11. The method according to claim 10, characterized in that The fine-tuning controls include a transition control for controlling the sliding of the player object and a rotation control for controlling the rotation of the player object; Wherein, when the player object is a humanoid object, the transition control is triggered when both feet of the player object leave the ground, and the rotation control is triggered when one foot of the player object touches the ground.
12. An animation connection device, characterized in that: The device comprises: a determining unit, configured to determine an adapted target control logic in response to an interactive operation on a player object, wherein the interactive operation is used to instruct the player object to perform an interactive behavior on the interactive object in a virtual interactive scene, and the target control logic is a control logic for controlling the player object to perform the interactive behavior; a first control unit, configured to control a target object motion state of the player object during movement toward the interactive object according to a target motion parameter, wherein the target motion parameter is used to identify an object motion state of the player object when the player object is controlled by the target control logic; The second control unit is configured to control the player object to perform the interactive behavior on the interactive object through the target control logic in response to the target object's motion state being consistent with the target motion parameter.
13. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 11 according to the computer program.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and when the computer program is executed by a computer device, the computer program implements the method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program, which, when run on a computer device, causes the computer device to perform the method according to any one of claims 1 to 11.