Display control method, device, electronic device and storage medium for virtual model
By obtaining the orientation information of the virtual model, judging the motion state jump conditions and triggering events, controlling the virtual model to adjust the orientation, solving the problem of mismatch in the orientation of the upper and lower half of the virtual model, and improving animation expression and user experience.
Patent Information
- Application Number
- CN202111663232.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-31
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2041-12-31
AI Technical Summary
In the mobile and attack animation production of virtual models, there are problems such as excessive resources leading to high costs, large package memory, and mismatch of upper and lower body orientations, resulting in insufficient animation expression and poor user experience.
By obtaining the direction of the torsional part of the virtual model and the direction of the motion input, judge the jump trigger condition of the motion state, trigger the jump event of the motion state, and control the virtual model to adjust the direction of the torsional part to perform corresponding motion actions, including attack actions, emergency stop turning actions and steering actions.
It realizes smooth and smooth adjustment of the upper and lower body postures and orientations of the virtual model, improving the expressiveness and user experience of the animation.
Smart Images

Figure CN114445527B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, electronic device, and storage medium for controlling the display of a virtual model. Background Art
[0002] In the production of movement and attack animations of virtual models, in order to avoid the problems of high production costs and large in-package memory caused by excessive resources, related technologies often use only the attack actions of the upper body being blended during movement for performance. However, when such a solution is used for some attack actions with large amplitudes, the orientations of the upper and lower bodies do not match, resulting in an animation matching problem of "twisted waist".
[0003] In related technologies, the attack action does not affect the state transition. Only the orientation within a single state is adjusted, or no attack action is set, lacking dynamic performance, resulting in the problem that it is difficult to smoothly adjust the postures and orientations of the upper and lower bodies of the virtual model, lacking the expressiveness of the animation, and having a poor user experience.
[0004] It should be noted that the information disclosed in the above background art section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those of ordinary skill in the art. Summary of the Invention
[0005] In view of this, the purpose of this application is to propose a method, apparatus, electronic device, and storage medium for controlling the display of a virtual model.
[0006] Based on the above purpose, in the first aspect, this application provides a method for controlling the display of a virtual model, including:
[0007] Obtain the orientation information of the virtual model, where the orientation information includes the orientation of the twisting part and the movement input orientation;
[0008] Determine whether the virtual model meets the trigger condition for movement state transition according to the orientation of the twisting part and the movement input orientation;
[0009] In response to the virtual model meeting the trigger condition for movement state transition, trigger the movement state transition event;
[0010] Control the virtual model to adjust the orientation of the twisting part to perform corresponding movement actions according to the movement state transition event.
[0011] In a possible implementation manner,
[0012] The obtaining of the orientation information of the virtual model further includes:
[0013] Receive a movement control instruction;
[0014] Read the motion control instruction to determine the direction of the motion input;
[0015] Obtain the image information of the virtual model;
[0016] Determine the orientation of the torsion part according to the image information.
[0017] In a possible implementation manner, before determining whether the virtual model satisfies the motion state jump trigger condition according to the orientation of the torsion part and the direction of the motion input, it further includes:
[0018] Obtain the motion state orientation map;
[0019] Determine the base direction and the synthesis direction according to the motion state orientation map; wherein, the base direction includes: a first base direction, a second base direction opposite to the first base direction, a third base direction perpendicular to the first base direction, and a fourth base direction opposite to the third base direction; the synthesis direction is synthesized by any two non-opposite base directions, and the synthesis direction is parallel to the first base direction.
[0020] In a possible implementation manner, further determining whether the virtual model satisfies the motion state jump trigger condition according to the orientation of the torsion part and the direction of the motion input includes:
[0021] Determine whether the direction of the motion input is one of the base direction or the synthesis direction;
[0022] In response to the direction of the motion input being one of the base direction or the synthesis direction, determine whether the motion angle between the orientation of the torsion part and the direction of the motion input is greater than the direction angle between the adjacent base direction and the synthesis direction;
[0023] In response to the motion angle being greater than the direction angle, the virtual model satisfies the motion state jump event trigger condition.
[0024] In a possible implementation manner, the corresponding motion action includes: a basic attack action; the direction of the motion input includes: an attack motion input direction for instructing the virtual model to execute an attack action;
[0025] Controlling the virtual model to adjust the orientation of the torsion part to execute the corresponding motion action according to the motion state jump event further includes:
[0026] Obtain the initial orientation of the torsion part of the virtual model and the attack motion input direction;
[0027] In response to the virtual model being in a non-moving state, control the virtual model to offset from the initial torsion part towards the opposite orientation of the attack motion input orientation to perform the basic attack action;
[0028] In response to the end of the basic attack action, control the virtual model to return to the initial torsion part orientation through smooth interpolation operation.
[0029] In a possible implementation, the corresponding motion action includes: a sudden stop and turn action; the motion state jump event includes: a sudden stop and turn event;
[0030] The controlling the virtual model to adjust the torsion part orientation to perform the corresponding motion action according to the motion state jump event further includes:
[0031] Obtain the initial torsion part orientation of the virtual model;
[0032] In response to the motion input orientation being the basic direction and opposite to the initial torsion part orientation of the virtual model, trigger the sudden stop and turn event to make the virtual model enter the pending sudden stop and turn state;
[0033] Overlay a preset sudden stop and turn animation on the virtual model to perform the sudden stop and turn action.
[0034] In a possible implementation, the controlling the virtual model to adjust the torsion part orientation to perform the corresponding motion action according to the motion state jump event further includes:
[0035] In response to the motion input orientation being the synthesis direction and any one of the basic directions used to synthesize the synthesis direction being opposite to the initial torsion part orientation of the virtual model, trigger the sudden stop and turn event to make the virtual model enter the pending sudden stop and turn state;
[0036] Overlay a preset sudden stop and turn animation on the virtual model to perform the sudden stop and turn action.
[0037] In a possible implementation, the corresponding motion action includes: a moving attack linkage action;
[0038] The controlling the virtual model to adjust the torsion part orientation to perform the corresponding motion action according to the motion state jump event further includes:
[0039] Obtain the initial torsion part orientation of the virtual model;
[0040] In response to the virtual model being in a moving state, obtain an attack offset angle, and add the attack offset angle to the initial torsion part orientation of the virtual model to determine the actual orientation of the virtual model;
[0041] Determine the moving orientation of the virtual model according to the relative angle between the attack movement input orientation and the actual orientation;
[0042] Control the virtual model to perform the moving attack linkage action according to the moving orientation.
[0043] In a possible implementation manner, the corresponding movement action includes: a turning action;
[0044] The controlling the virtual model to adjust the torsion part orientation to perform the corresponding movement action according to the movement state jump event further includes:
[0045] Obtain the initial torsion part orientation of the virtual model;
[0046] In response to receiving a turning instruction, control the virtual model to move in the opposite direction of the initial torsion part orientation, and determine whether the duration of the virtual model moving in the opposite direction of the initial torsion part orientation exceeds a preset judgment time;
[0047] In response to the duration of the virtual model moving in the opposite direction of the initial torsion part orientation exceeding the preset judgment time, control the virtual model to perform the turning action according to the turning instruction.
[0048] In a possible implementation manner, the method further includes:
[0049] In response to receiving a start instruction, determine a response time according to the body type information of the virtual model;
[0050] After waiting for the response time, superimpose a preset preparatory animation on the virtual model to execute the start instruction; wherein, the start instruction is used to instruct the virtual model to switch from a stationary state to a moving state.
[0051] In a possible implementation manner, the method further includes:
[0052] In response to receiving a stop instruction, determine a buffer distance according to the body type information;
[0053] Control the virtual model to move the buffer distance to execute the stop instruction.
[0054] In a second aspect, the present application provides a display control device for a virtual model, including:
[0055] An acquisition module, configured to acquire the orientation information of the virtual model, where the orientation information includes the orientation of the torsion part and the orientation of the motion input;
[0056] A determination module, configured to determine whether the virtual model meets the motion state jump trigger condition according to the orientation of the torsion part and the orientation of the motion input;
[0057] A trigger module, configured to trigger the motion state jump event in response to the virtual model meeting the motion state jump trigger condition;
[0058] A control module, configured to control the virtual model to adjust the orientation of the torsion part to perform corresponding motion actions according to the motion state jump event.
[0059] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the display control method of the virtual model as described in the first aspect.
[0060] In a fourth aspect, the present application provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to cause a computer to execute the display control method of the virtual model as described in the first aspect.
[0061] As can be seen from the above, a display control method, device, electronic device, and storage medium for a virtual model provided by the present application acquire the orientation information of the virtual model, where the orientation information includes the orientation of the torsion part and the orientation of the motion input. According to the orientation of the torsion part and the orientation of the motion input, it is determined whether the virtual model meets the motion state jump trigger condition. If the virtual model meets the trigger condition of the motion state jump event, the motion state jump event can be triggered, and the virtual model is controlled to adjust the orientation of the torsion part according to the action state jump event, so as to perform corresponding motion actions. By determining the jump of the motion state according to the orientation information of the virtual model, after reaching the trigger condition, the jump of the state is triggered, and the posture is converted according to different actions of different virtual models. Not only can moving actions be performed, but also when performing actions that cause large deflections in the upper and lower body postures, such as sudden stop and turn actions, attack actions, and turning actions, through the jump of the motion state, the postures and orientations of the upper and lower bodies of the virtual model can be smoothly adjusted, improving the expressiveness of the animation and enhancing the user experience. Description of the Drawings
[0062] To more clearly illustrate the technical solutions in the present application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings described below are only embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0063] Figure 1 It shows an exemplary flowchart of a method for displaying and controlling a virtual model provided by an embodiment of the present application.
[0064] Figure 2 It shows a schematic diagram of a cross-shaped movement direction indicator diagram in related technologies.
[0065] Figure 3 It shows a schematic diagram of a host diagonal 45° movement direction indicator diagram in related technologies.
[0066] Figure 4 It shows a schematic diagram of a motion state orientation diagram according to an embodiment of the present application.
[0067] Figure 5 It shows a schematic diagram of the action state jump of an animation state machine according to an embodiment of the present application.
[0068] Figure 6 It shows a schematic diagram of an attack offset angle curve according to an embodiment of the present application.
[0069] Figure 7 It shows an exemplary structural diagram of a device for displaying and controlling a virtual model provided by an embodiment of the present application.
[0070] Figure 8 It shows an exemplary structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0071] To make the objectives, technical solutions, and advantages of the present application clearer and more obvious, the following further elaborates on the present application in detail in combination with specific embodiments and with reference to the accompanying drawings.
[0072] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meanings understood by those with ordinary skills in the field to which the present application belongs. The "first", "second" and similar terms used in the embodiments of the present application do not indicate any order, quantity or importance, but are only used to distinguish different components. Words such as "including" or "comprising" mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Words such as "connected" or "linked" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right", etc. are only used to represent relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0073] As described in the background art section, in the virtual model control scenario seen from the third-person perspective, the actions of the virtual model are one of the main concerns of users. Among them, the basic movement and attack actions are important links in the virtual model animation. Since there are many postures during movement, it is difficult to create matching attack animations for each posture. At the same time, in order to avoid the problems of high production costs and large in-package memory caused by excessive resources, in the related art, the attack actions that only blend the upper body during movement are often used for performance. Such a solution has no excessive problems for small-amplitude attack actions, but when used for some large-amplitude attacks, especially melee attacks, the orientation of the upper body waist does not match the lower body, resulting in the problem of the virtual model's "waist being broken" visually.
[0074] In the process of solving this problem, the applicant found that to avoid the problem of "waist being broken", it is necessary to reduce the attack amplitude, but such a treatment will also lead to problems such as rigid movements and insufficient attack power.
[0075] In the related art, in the most common ALS4 (that is, the classic case of UE basic movement class: AdvancedLocomotion System V4), it includes upper body poses in different orientations and postures. In different modes, these poses will be superimposed on the movement actions of the lower body. The resources of each pose also use curves to describe the Hips orientation. When moving, the state transition will be controlled according to the values of these curves, showing different movement effects in different postures.
[0076] In some other related technologies, in order to present expressiveness through melee attacks, most of them use RootMotion (which can be called root bone animation) resources for production. However, the consequence is that when users use skills, they cannot flexibly manipulate the virtual model, which cannot meet the requirements of some projects. In some other related technologies, a large number of basic movement resources are recorded, and then MotionMatching (which can be called action matching technology, referring to the computer automatically selecting data from the database to synthesize new animation performances according to the user's input) is used to select and match actions to solve this problem. However, in a scenario with a large number of virtual models, the resource volume is too large, which will cause the problem of excessive system load.
[0077] That is to say, in related technologies, the attack action will not affect the state transition. Only the orientation within a single state is adjusted, or no attack action is set, lacking dynamic performance. As a result, it is difficult to smoothly adjust the posture and orientation of the upper and lower bodies of the virtual model, lacking the expressiveness of the animation and resulting in a poor user experience.
[0078] Therefore, a display control method, device, electronic device, and storage medium for a virtual model provided in this application obtain the orientation information of the virtual model, where the orientation information includes the torsion part orientation and the motion input orientation. According to the torsion part orientation and the motion input orientation, it is determined whether the virtual model meets the trigger condition for the motion state transition. If the virtual model meets the trigger condition for the motion state transition event, the motion state transition event can be triggered, and the virtual model is controlled to adjust the torsion part orientation according to the action state transition event, so as to execute the corresponding motion action. By determining the transition of the motion state according to the orientation information of the virtual model, after reaching the trigger condition, the state transition is triggered, and the posture is converted according to different actions of different virtual models. Not only can the movement action be executed, but also when executing actions such as sudden stop and turn, attack action, and turning action that will cause a large deflection of the upper and lower body postures, through the transition of the motion state, the postures and orientations of the upper and lower bodies of the virtual model can be smoothly adjusted, improving the expressiveness of the animation and enhancing the user experience.
[0079] The following specifically describes the display control method for the virtual model provided in the embodiments of this application through specific embodiments.
[0080] Figure 1 The exemplary flowchart showing a display control method for a virtual model provided in the embodiments of this application is shown.
[0081] Refer to Figure 1 , the virtual model control method provided in the embodiments of this application specifically includes the following steps:
[0082] S102: Obtain the orientation information of the virtual model, where the orientation information includes the orientation of the torsion part and the motion input orientation.
[0083] S104: Determine whether the virtual model meets the motion state jump trigger condition according to the orientation of the torsion part and the motion input orientation.
[0084] S106: In response to the virtual model meeting the motion state jump trigger condition, trigger the motion state jump event.
[0085] S108: Control the virtual model to adjust the orientation of the torsion part according to the motion state jump event to perform corresponding motion actions.
[0086] Regarding step S102, in this embodiment, since different motion states of the virtual model need to be controlled, the orientation information of the virtual model can be obtained, and the motion state of the virtual model can be further determined according to the orientation information.
[0087] In some embodiments, the obtained orientation information of the virtual model may include the motion input orientation, which can also be understood as the motion direction input by the user to the virtual model. The motion input orientation can be used to indicate the motion direction of the virtual model, and the orientation of the torsion part, which can be the orientation of parts such as the waist or hip of the virtual model that will twist when the virtual model makes a move.
[0088] Figure 2 Shows a schematic diagram of the cross-shaped movement direction indication diagram in the related art.
[0089] Reference Figure 2 , in the traditional cross-shaped eight-direction movement scheme, the motion direction can be evenly divided according to the principle of equal distribution. The circular area is evenly divided into eight parts, and the boundary line between every two adjacent parts corresponds to a direction, corresponding to the front (F), the back (B), the left (L), the right (R), the front left (LF), the back left (LB), the front right (RF), and the back right (RB) respectively.
[0090] It should be understood that the acquisition of the orientation information of the virtual model can be achieved by receiving motion control instructions sent from the user or other controllers and devices, and reading the motion control instructions, and determining the motion input orientation of the virtual model through the direction information carried in the motion control instructions. For example, reference Figure 2, the user can send a motion control instruction for forward (F) movement to the virtual model by clicking the "↑" key on the keyboard. After reading the motion control instruction and determining that the motion control instruction is used to instruct the virtual model to move forward (F), the motion input direction of the virtual model can be determined to be forward (F). Not only for the basic front, back, left, and right directions, but also by pressing the "↑" key and the "←" key on the keyboard at the same time, a motion control instruction for left (L) and front (F) movement can be sent to the virtual model. After reading the motion control instruction and determining that the motion control instruction is used to instruct the virtual model to move left (L) and front (F), the motion input direction of the virtual model can be determined to be left front (LF). It can be understood that front (F), back (B), left (L), right (R), left front (LF), left back (LB), right front (RF) and right back (RB) can all be determined.
[0091] It is understood that the user's device for issuing motion control commands is not limited to a keyboard. In another example, the user can issue motion control commands through a handle. For example, the user sends motion control commands to the virtual model by pulling the directional control stick on the handle. Generally, the directional control stick on the handle has four protrusions, which correspond to the four simple basic directions of front, back, left, and right. The user pulls the directional control stick in the direction of any protrusion to issue a motion control command to the virtual model to move in that direction. The input direction of the virtual model's motion can be determined as the virtual model's motion direction. For other angles of motion, generally, when the directional control stick is pulled in the area between each two adjacent protrusions, it can be used to instruct the virtual model to move in the direction between the directions corresponding to the two protrusions. For example, if the directional control stick is pulled in the area between the protrusion indicating backward (B) movement and the protrusion indicating right (R) movement, the virtual model is instructed to move to the right rear (RB), and the input direction of the virtual model's motion can be determined as the right rear (RB). It will be appreciated that front (F), back (B), left (L), right (R), left front (LF), left back (LB), right front (RF) and right back (RB) may all be determined.
[0092] Figure 3 A schematic diagram showing a 45° oblique movement direction indication diagram of a host in the related art is shown.
[0093] refer to Figure 3 Different from the traditional eight-way cross-shaped movement scheme, some consoles use FL-LF and BR-RB transitions at 45° to achieve smooth transitions within the 45° range, taking into account the operation of the console controller. This is equivalent to adding transition judgment in the four diagonal directions of the traditional eight-way movement scheme.
[0094] However, in order to better determine the motion state of the virtual model according to the motion input orientation input by the user and the torsion part orientation of the virtual model, the six-direction state of ALS4 can be further improved.
[0095] Figure 4 A schematic diagram of a motion state orientation map according to an embodiment of the present application is shown.
[0096] In some embodiments, before performing step S104, a motion state orientation map as shown in Figure 4 can be obtained, and the base direction and the synthesis direction are determined according to the motion state orientation map. Specifically, the base direction may include: a first base direction, a second base direction opposite to the first base direction, a third base direction perpendicular to the first base direction, and a fourth base direction opposite to the third base direction.
[0097] Referring to Figure 4 , it can be understood that the first direction can be any one of the front (F), rear (B), left (L), and right (R). Taking the first direction as the front (F) as an example, the second direction is the rear (B), the third direction is the left (L), and the fourth direction is the right (R). And the synthesis direction can be obtained by synthesizing any two non-opposite base directions. In the present application, the synthesis direction extends along both sides of the direction perpendicular to the first direction. For example, the synthesis direction can be the left front (LF) obtained by synthesizing the front (F) and the left (L); the synthesis direction can be the right front (RF) obtained by synthesizing the front (F) and the right (R); the synthesis direction can be the left rear (LB) obtained by synthesizing the rear (B) and the left (L); the synthesis direction can be the right rear (RB) obtained by synthesizing the rear (B) and the right (R). Compared with the traditional cross-shaped movement scheme, Figure 4 the motion state orientation map of the present application shown can streamline the left (L) and right (R) directions. Compared with the host diagonal 45° movement direction indication map, the conversion determination between the left front (LF) and the left rear (LB) and between the right front (RF) and the right rear (RB) will be more accurate and easier to distinguish, because the conversion determination of the left front (LF) and the left rear (LB) and between the right front (RF) and the right rear (RB) of the host diagonal 45° movement direction indication map needs to be judged near the same critical point, which is very likely to cause conversion errors. For example, although close to the conversion critical point of the left rear (LB), the user still wants to maintain the movement to the left front (LF), but because the critical points of the two directions are very close, it is easy to cause the problem of mis-conversion.
[0098] Regarding step S104, after obtaining the orientation information, it can be further determined whether the orientation information makes the virtual model meet the trigger condition of the motion state jump event. Specifically, when the motion input orientation input by the user remains unchanged, if the orientation of the torsion part changes, then the motion input orientation changes relative to the orientation of the torsion part. The input angle calculated in this way can be used as the trigger condition of the motion state jump event. Among them, in this application, the orientation of the torsion part can be illustrated by taking the direction towards which the hip of the virtual model faces as an example.
[0099] It should be noted that the input angle can be understood as the included angle between the motion input orientation and the orientation of the torsion part. Compared with using only one of the orientations as the trigger condition of the motion state jump event, using the input angle to judge whether the virtual model meets the trigger condition of the motion state jump event can better integrate the two orientations and avoid the problem of unsmooth movement of the virtual model. For example, originally, when the virtual model moves to the left (L), the orientation of the torsion part is to the left (L), that is, the hip of the virtual model faces to the left (L). At this time, when an instruction to move to the right (R) is issued to the virtual model, only considering the motion input orientation or the orientation of the torsion part input by the user, after the model executes the instruction to move to the right (R), the orientation of the torsion part becomes to the right (R), that is, the hip of the virtual model faces to the right (R). However, when a person changes from moving to the left (L) to moving to the right (R), usually, the hip orientation will not change. That is to say, when a person moves to the left (L) with the hip facing to the left (L), it can be regarded as the person moving backward along the left side (L). And when the person then changes to moving to the right (R), the hip orientation remains unchanged, and only changes from moving backward along the left side (L) to moving forward along the right side (R). Therefore, in order to make the virtual model more anthropomorphic and improve the user operation experience, it is necessary to consider the included angle between the motion input orientation and the orientation of the torsion part, that is, the input angle.
[0100] Regarding step S106, in this embodiment, after determining that the virtual model meets the triggering condition of the motion state jump event, the motion state jump event is triggered. Specifically, it can be determined whether the motion input direction is one of the basic directions or the combined direction. If the motion input direction is one of the basic directions or the combined direction, it is determined whether the motion angle between the torsion part direction and the motion input direction is greater than the direction angle between the adjacent basic direction and the combined direction. For example, whether the motion angle is greater than the angle between the left direction (L) and the left front direction (LF). Of course, the direction angle between two non-adjacent directions is necessarily greater than the direction angle between the adjacent basic direction and the combined direction. Therefore, it can further be determined whether the motion angle is greater than the direction angle between the left direction (L) and the right direction (R). When the motion angle is greater than the direction angle, the virtual model meets the triggering condition of the motion state jump event, and the motion state jump event can be triggered.
[0101] Regarding step S108, after triggering the motion state jump event, the virtual model can be controlled to adjust the torsion part direction so as to perform corresponding motion actions. Among them, the corresponding motion actions can at least include one of an attack action, a sudden stop and turn action, and a turning action.
[0102] In some embodiments, for an attack action, it may include a basic attack action, such as a right swing punch attack action in place. The virtual model stands in place and performs the right swing punch attack action without the need to perform it during movement. The movement input orientation may include an attack movement input orientation for instructing the virtual model to perform an attack action. Further, step S108 may specifically include: obtaining the initial torsional part orientation of the virtual model and the attack movement input orientation. Specifically, the initial torsional part orientation may, for example, refer to the torsional part orientation of the virtual model before performing the attack action, that is, in the initial state, the orientation corresponding to the hip of the model. The attack movement input orientation may be the attack direction input by the user. For example, for a right swing punch action, after the user inputs an instruction to attack in the left front (LF) direction, the virtual model performs the attack action. In response to the virtual model being in a non-moving state, control the virtual model to offset from the initial torsional part orientation to the opposite orientation of the attack movement input orientation, thereby performing the basic attack action. For example, at this time, the virtual model needs to perform a right swing punch action. After performing this action, assuming it is a person performing the action, the person's waist turns to the left (L) to complete the action of swinging the right fist in the left front (LF) direction. Therefore, in order to make the virtual model more similar to a person's action, the torsional part orientation of the virtual model should be to the right (R) at this time. And the attack movement input direction input by the user is to the left front (LF). To make the torsional part orientation of the virtual model to the right (R), the virtual model can be controlled to offset from the initial torsional part orientation to the opposite direction of the attack movement input orientation, that is, to the right back (RB). Then, with the programmed rotation, the overall upper body orientation of the virtual model still maintains the forward (F) and right (R) directions of the attack action, so that it can show that the virtual model is performing a diagonal movement. After the basic attack action ends, control the virtual model to restore to the initial torsional part orientation through a smooth interpolation action, and at the same time cause a state change, so that the virtual model jumps from the torsional part orientation after performing the basic attack action and offset to the right back (RB) to the initial torsional part orientation.
[0103] In some embodiments, when switching between these basic directions of front, back, left, and right, in order to enhance the action effect, four directional change action performances can be made, and then the resources of the four directional change action performances are adopted in a superimposed scheme and superimposed on the movement resource performance of the current virtual model, while not affecting the user's operation feel, improving the turning details of the virtual model. Specifically, the movement state jump event may include a sudden stop and turn event. In response to the movement input orientation being a basic direction and the movement input orientation being opposite to the initial torsional part orientation of the virtual model, the sudden stop and turn event is triggered, causing the virtual model to enter the state of waiting for a sudden stop and turn; then the preset sudden stop and turn animation can be superimposed on the virtual model, so that it performs the sudden stop and turn action.
[0104] Further, for example, if the movement input direction of the current virtual model is forward (F), and the initial torsion part direction of the current virtual model is backward (B), then the instruction input by the user is to make the virtual model perform a backward turn, that is, to change from moving forward (F) to moving backward (B) through a sudden stop and turn. In this case, the virtual model can trigger a sudden stop and turn event and enter the state of waiting for a sudden stop and turn. Since in order to ensure the continuity of the virtual model's movement, the state of waiting for a sudden stop and turn is not reflected in the animation. Due to receiving the turning instruction, the virtual model will trigger a movement state jump event, and when the virtual model performs the turning action, a preset sudden stop and turn animation can be superimposed on the virtual model, so that the virtual model executes the sudden stop and turn action.
[0105] Figure 5 The figure shows a schematic diagram of the action state jump of the animation state machine according to an embodiment of the present application.
[0106] Further, referring to Figure 5 , when the virtual model performs a sudden stop and turn action, the virtual model will not only move along the basic direction, but may also move along any one of the composite directions. When the movement input direction of the virtual model is a composite direction, and any one of the basic directions used to synthesize this composite direction is opposite to the initial torsion part direction of the virtual model, a sudden stop and turn event can be triggered, causing the virtual model to enter the state of waiting for a sudden stop and turn. For example, when the movement input direction input by the user is left front (LF), since the left front (LF) composite direction is synthesized from two basic directions, forward (F) and left (L), so when the initial torsion part direction of the virtual model is one of backward (B), right (R), left back (LB), right front (RF), or right back (RB) at this time, then any one of the basic directions synthesizing this movement input direction is opposite to the initial torsion part direction of the virtual model. At this time, the virtual model triggers a sudden stop and turn event and enters the state of waiting for a sudden stop and turn. It can be understood that due to receiving the turning instruction, the virtual model will trigger a movement state jump event, and when the virtual model performs the turning action, a preset sudden stop and turn animation can be superimposed on the virtual model, so that the virtual model executes the sudden stop and turn action.
[0107] It should be noted that the preset sudden stop and turn animation can be made by referring to a person's sudden stop and turn. Set IsPivotFlag, that is, a custom variable for judging the entry into the sudden stop state, and notify the animation to enter the state of superimposing the sudden stop animation. In the state of superimposing the sudden stop animation, the performance of the upper body during sudden stop will be mixed according to the actual movement direction of the virtual model. The production method is not specifically limited.
[0108] In some embodiments, the amplitude of the body rotation of the virtual model can be controlled by the attack angle in combination with the orientation of the virtual model through the attack offset angle curve. Specifically, the attack action can further include a moving attack linkage action, that is, an attack action is performed during the movement of the virtual model, such as a straight punch attack while running forward (F).
[0109] Figure 6 FIG. shows a schematic diagram of an attack offset angle curve according to an embodiment of the present application.
[0110] Referring to Figure 6 , after it is detected that the virtual model is in a moving state, the attack offset angle can be obtained according to the attack offset angle curve, and the attack offset angle is added to the initial torsional part orientation of the virtual model, so as to determine the actual orientation of the virtual model. Further, the moving orientation of the virtual model is determined according to the relative angle between the attack movement input orientation and the actual orientation, and then the virtual model is controlled to perform the moving attack linkage action according to the moving orientation.
[0111] It should be noted that referring to Figure 6 , the angle value on the vertical coordinate is mainly read in the attack offset angle curve. When the angle is between 0 and 180°, it proves that it is offset to the right (R), and when the angle is between 0 and -180°, it proves that it is offset to the left (L). For example, if the initial torsional part orientation of the virtual model is forward (F) and the attack offset angle is 90°, then the attack offset angle is superimposed on the initial torsional part orientation of the virtual model to obtain the actual orientation of the virtual model after the attack as right (R). If the movement input orientation is forward (F), the moving orientation of the virtual model can be determined as right front (RF) according to the included angle between the two, and then the virtual model is controlled to move and attack in the right front (RF) direction.
[0112] In some embodiments, when the virtual model moves to the left front (LF), if it is to be switched to the right (R) direction, for a person, it will not directly enter the right front (RF) movement, but turn around and then enter the right front (RF) movement. That is to say, for the virtual model, if the virtual model is to perform a turning action, the initial torsional part orientation of the virtual model can be obtained first. In response to receiving a turning instruction, the virtual model can be controlled to move in the opposite direction of the initial torsional part orientation, and it is determined whether the duration of the virtual model moving in the opposite direction of the initial torsional part orientation exceeds a preset judgment time. If the duration of the virtual model moving in the opposite direction of the initial torsional part orientation exceeds the preset judgment time, the virtual model is controlled to perform a turning action according to the turning instruction.
[0113] It should be noted that for a virtual model, when it moves past to the left front (LF), the initial torsional part faces the left front (LF). If it switches to move in the right front (RF) direction, it will first maintain a left (L) posture and enter the direction opposite to its initial direction, that is, the right back (RB) direction. Among them, moving to the left front (LF) can be regarded as moving forward facing the left front (LF), and moving to the right back (RB) can be regarded as moving backward facing the left (L). Then, according to the event, select the timing to enter the right front (RF) direction movement, that is, set the judgment time, such as 0.2s. In this way, after the virtual model has moved in the right back (RB) direction for 0.2s, it enters the right front (RF) direction movement. In this way, the body and footsteps of the virtual model can be converted more naturally, avoiding the problem of the virtual model's rigid turning.
[0114] It can be understood that when the legs of the virtual model are interpenetrated during the turning action, it proves that there is a problem with its posture. After its posture is converted, an automatic turning action should be performed under the condition that the legs of the virtual model do not interpenetrate, otherwise a picture of the model "breaking" will be shown.
[0115] In traditional virtual model control operations, when the virtual model is converted from static to dynamic, for example, when the virtual model moves from stationary to forward (F), a resource connection scheme is usually used to make the actions of the virtual model smoother. However, if the startup time of the startup resources is too long during the startup process, the virtual model will look less sensitive, affecting the user's operation feel; if the time is short, it will be affected by the mixing time of the startup process, and the startup actions will be fused and the effects will not be shown.
[0116] Therefore, in some embodiments, after receiving a startup instruction, where the startup instruction is used to instruct the virtual model to switch from a stationary state to a moving state, determine the response time according to the body size information of the virtual model, and after waiting for the response time, superimpose a preset preparatory animation on the virtual model, thereby executing the startup instruction. Adopting the same animation superimposition scheme as the emergency stop and turn in the above embodiments, superimposing the preparatory action on the startup animation can make the virtual model respond well to the startup instruction while not affecting the user's operation feel.
[0117] Among them, the response time can be determined according to the body size information of the virtual model. Generally, people or animals with larger body sizes have slower speeds when starting, so virtual models with larger body sizes are given longer response times to enable them to start under logical circumstances. People or animals with smaller body sizes have faster speeds when starting, so virtual models with smaller body sizes are given relatively shorter response times. For example, for the "Hulk" model with a height of about 2.5m and the Dr. Banner model, the human prototype of the "Hulk", with a height of about 1.8m, the response time given to the "Hulk" model can be 0.3s, and the response time given to the Dr. Banner model can be 0.2s.
[0118] In some embodiments, corresponding to the stop action of the virtual model, adjustments also need to be made to make it smoother, thereby enhancing the user experience. Specifically, after receiving the stop instruction, the buffer distance and buffer time are determined according to the body size information of the virtual model, and the virtual model is controlled to execute the stop instruction after passing the buffer time and moving the buffer distance.
[0119] It can be understood that the body size information of the virtual model can include the volume and contour line of the virtual model, etc. The virtual model can be classified according to the body size information, and the classification and the corresponding buffer time and buffer distance are saved, which is convenient for application to more virtual models and avoids recalculating the corresponding buffer time and buffer distance for each virtual model. For example, the "Hulk" model can be defined as a third-level body size, Dr. Banner can be defined as a second-level body size, and the prototype of "Rocket", the raccoon, can be defined as a first-level body size. The buffer time corresponding to the third-level body size can be 0.3s, the buffer time corresponding to the second-level body size can be 0.2s, and the buffer time corresponding to the first-level body size can be 0.1s. The buffer distance corresponding to each type of body size can be half the width of the body of that body size. For example, the third-level body size needs to buffer 1m, while the first-level body size needs to buffer 0.2m. Without affecting the user's operation feel, the virtual model can respond well to the stop instruction.
[0120] As can be seen from the above, a display control method, device, electronic device, and storage medium for a virtual model provided by the present application obtain the orientation information of the virtual model, where the orientation information includes the orientation of the torsion part and the orientation of the motion input. According to the orientation of the torsion part and the orientation of the motion input, it is determined whether the virtual model meets the trigger condition for the motion state jump. If the virtual model meets the trigger condition for the motion state jump event, the motion state jump event can be triggered, and the virtual model is controlled to adjust the orientation of the torsion part according to the action state jump event, so as to perform corresponding motion actions. By determining the jump of the motion state according to the orientation information of the virtual model, after reaching the trigger condition, the jump of the state is triggered, and the posture is converted according to different actions of different virtual models. Not only can the movement action be performed, but also when performing actions such as sudden stop and turn, attack action, and turning action that will cause a large deflection of the upper and lower body postures, through the jump of the motion state, the postures and orientations of the upper and lower bodies of the virtual model can be smoothly adjusted, improving the expressiveness of the animation and enhancing the user experience.
[0121] It should be noted that the method of the embodiment of the present application can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps of the method of the embodiment of the present application, and these multiple devices will interact with each other to complete the described method.
[0122] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the above embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain implementations, multitasking and parallel processing are also possible or may be advantageous.
[0123] Figure 7 The exemplary structural schematic diagram of a display control device for a virtual model provided by an embodiment of the present application is shown.
[0124] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides a display control device for a virtual model.
[0125] Refer to Figure 7 , the display control device for the virtual model includes: an acquisition module, a determination module, and a control module; wherein,
[0126] An acquisition module, configured to acquire the orientation information of a virtual model, where the orientation information includes the orientation of a torsion part and the orientation of a motion input;
[0127] A determination module, configured to determine whether the virtual model satisfies a motion state jump trigger condition according to the orientation of the torsion part and the orientation of the motion input;
[0128] A trigger module, configured to trigger the motion state jump event in response to the virtual model satisfying the motion state jump trigger condition;
[0129] A control module, configured to control the virtual model to adjust the orientation of the torsion part to perform corresponding motion actions according to the motion state jump event.
[0130] In a possible implementation manner,
[0131] The acquisition module is further configured to:
[0132] Receive a motion control instruction;
[0133] Read the motion control instruction to determine the orientation of the motion input;
[0134] Acquire the image information of the virtual model;
[0135] Determine the orientation of the torsion part according to the image information.
[0136] In a possible implementation manner, the determination module is further configured to:
[0137] Acquire a motion state orientation diagram;
[0138] Determine a base direction and a synthesis direction according to the motion state orientation diagram; wherein, the base direction includes: a first base direction, a second base direction opposite to the first base direction, a third base direction perpendicular to the first base direction, and a fourth base direction opposite to the third base direction; the synthesis direction is synthesized by any two non-opposite base directions, and the synthesis direction is parallel to the first base direction.
[0139] In a possible implementation manner, the determination module is further configured to:
[0140] Determine whether the orientation of the motion input is one of the base direction or the synthesis direction;
[0141] In response to the orientation of the motion input being one of the base direction or the synthesis direction, determine whether the motion angle between the orientation of the torsion part and the orientation of the motion input is greater than the direction angle between the adjacent base direction and the synthesis direction;
[0142] In response to the movement included angle being greater than the direction included angle, the virtual model satisfies the triggering condition of the movement state jump event.
[0143] In a possible implementation, the corresponding movement action includes: a basic attack action; the movement input orientation includes: an attack movement input orientation for instructing the virtual model to perform an attack action.
[0144] The control module is further configured to:
[0145] Obtain the initial torsion part orientation of the virtual model and the attack movement input orientation.
[0146] In response to the virtual model being in a non-moving state, control the virtual model to offset from the initial torsion part orientation to the opposite orientation of the attack movement input orientation to perform the basic attack action.
[0147] In response to the end of the basic attack action, control the virtual model to return to the initial torsion part orientation through a smooth interpolation operation.
[0148] In a possible implementation, the corresponding movement action includes: a sudden stop and turn action.
[0149] The movement state jump event includes: a sudden stop and turn event.
[0150] The control module is further configured to:
[0151] Obtain the initial torsion part orientation of the virtual model.
[0152] In response to the movement input orientation being the basic direction and opposite to the initial torsion part orientation of the virtual model, trigger the sudden stop and turn event to make the virtual model enter the pending sudden stop and turn state.
[0153] Overlay a preset sudden stop and turn animation on the virtual model to perform the sudden stop and turn action.
[0154] In a possible implementation, the control module is further configured to:
[0155] In response to the movement input orientation being the composite direction and any one of the basic directions used to compose the composite direction being opposite to the initial torsion part orientation of the virtual model, trigger the sudden stop and turn event to make the virtual model enter the pending sudden stop and turn state.
[0156] Overlay a preset sudden stop and turn animation on the virtual model to perform the sudden stop and turn action.
[0157] In a possible implementation, the corresponding movement actions include: a moving attack linkage action;
[0158] The control module is further configured to:
[0159] Obtain the initial torsional part orientation of the virtual model;
[0160] In response to the virtual model being in a moving state, obtain an attack offset angle, and add the attack offset angle to the initial torsional part orientation of the virtual model to determine the actual orientation of the virtual model;
[0161] Determine the moving orientation of the virtual model according to the relative angle between the attack movement input orientation and the actual orientation;
[0162] Control the virtual model to execute the moving attack linkage action according to the moving orientation.
[0163] In a possible implementation, the corresponding movement actions include: a turning action;
[0164] The control module is further configured to:
[0165] Obtain the initial torsional part orientation of the virtual model;
[0166] In response to receiving a turning instruction, control the virtual model to move in the opposite direction of the initial torsional part orientation, and determine whether the duration of the virtual model moving in the opposite direction of the initial torsional part orientation exceeds a preset judgment time;
[0167] In response to the duration of the virtual model moving in the opposite direction of the initial torsional part orientation exceeding the preset judgment time, control the virtual model to execute the turning action according to the turning instruction.
[0168] In a possible implementation, the device further includes: a start module;
[0169] The start module is configured to:
[0170] In response to receiving a start instruction, determine a response time according to the body size information of the virtual model;
[0171] After waiting for the response time, superimpose a preset preparatory animation on the virtual model to execute the start instruction; wherein, the start instruction is used to instruct the virtual model to switch from a stationary state to a moving state.
[0172] In a possible implementation, the device further includes: a stop module;
[0173] The stop module is configured to:
[0174] In response to receiving a stop instruction, determine a buffer distance according to the body shape information;
[0175] Control the virtual model to move the buffer distance to execute the stop instruction.
[0176] For the convenience of description, when describing the above device, various modules are described separately according to their functions. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0177] The device in the above embodiment is used to implement the display control method of the corresponding virtual model in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0178] Figure 8 The exemplary structural diagram of an electronic device provided by an embodiment of the present application is shown.
[0179] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the display control method of the virtual model in any of the above embodiments. Figure 8 The exemplary hardware structural diagram of a more specific electronic device provided by this embodiment is shown. The device may include: a processor 810, a memory 820, an input / output interface 830, a communication interface 840, and a bus 850. Among them, the processor 810, the memory 820, the input / output interface 830, and the communication interface 840 are communicatively connected to each other inside the device through the bus 850.
[0180] The processor 810 may be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided by the embodiments of this specification.
[0181] The memory 820 may be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 820 may store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 820 and are called and executed by the processor 810.
[0182] The input / output interface 830 is used to connect to an input / output module to implement information input and output. The input / output module may be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0183] The communication interface 840 is used to connect to a communication module (not shown in the figure) to implement communication interaction between this device and other devices. Among them, the communication module may implement communication in a wired manner (such as USB, network cable, etc.) or in a wireless manner (such as mobile network, WIFI, Bluetooth, etc.).
[0184] The bus 850 includes a path for transmitting information between various components of the device (such as the processor 810, the memory 820, the input / output interface 830, and the communication interface 840).
[0185] It should be noted that although the above device only shows the processor 810, the memory 820, the input / output interface 830, the communication interface 840, and the bus 850, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solutions of the embodiments of this specification, and do not have to include all the components shown in the figure.
[0186] The electronic device in the above embodiment is used to implement the display control method of the corresponding virtual model in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0187] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the display control method of the virtual model as described in any of the foregoing embodiments.
[0188] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.
[0189] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the display control method of the virtual model as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.
[0190] Those of ordinary skill in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.
[0191] In addition, for simplicity of description and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the device may be shown in block diagram form to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0192] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0193] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Accordingly, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included within the protection scope of the present application.
Claims
1. A display control method for a virtual model, characterized in that, Including: Obtain the orientation information of the virtual model, where the orientation information includes the torsion part orientation and the motion input orientation; According to the torsion part orientation and the motion input orientation, determine whether the virtual model meets the motion state jump trigger condition, including: determining whether the motion input orientation is one of the basic direction or the composite direction; in response to the motion input orientation being one of the basic direction or the composite direction, determining whether the motion angle between the torsion part orientation and the motion input orientation is greater than the direction angle between the adjacent basic direction and the composite direction; in response to the motion angle being greater than the direction angle, the virtual model meets the motion state jump trigger condition; the basic direction is determined according to the motion state orientation map; the composite direction is synthesized by any two non-opposite basic directions; In response to the virtual model meeting the motion state jump trigger condition, trigger the motion state jump event; Control the virtual model to adjust the torsion part orientation according to the motion state jump event to perform corresponding motion actions.
2. The method according to claim 1, wherein The obtaining of the orientation information of the virtual model further includes: Receive a motion control instruction; Read the motion control instruction to determine the motion input orientation; Obtain the image information of the virtual model; Determine the torsion part orientation according to the image information.
3. The method according to claim 2, characterized in that, Before determining whether the virtual model meets the motion state jump trigger condition according to the torsion part orientation and the motion input orientation, further includes: Obtain the motion state orientation map; Determine the basic direction and the composite direction according to the motion state orientation map; where the basic direction includes: the first basic direction, the second basic direction opposite to the first basic direction, the third basic direction perpendicular to the first basic direction, and the fourth basic direction opposite to the third basic direction; the composite direction is parallel to the first basic direction.
4. The method according to claim 2, wherein The corresponding motion action includes: a basic attack action; the motion input orientation includes: an attack motion input orientation for instructing the virtual model to perform an attack action; The controlling the virtual model to adjust the torsion part orientation according to the motion state jump event to perform corresponding motion actions further includes: Obtain the initial torsion part orientation and the attack motion input orientation of the virtual model; In response to the virtual model being in a non-moving state, control the virtual model to offset from the initial torsion part orientation to the opposite orientation of the attack motion input orientation to perform the basic attack action; In response to the end of the basic attack action, control the virtual model to return to the initial torsion part orientation through a smooth interpolation operation.
5. The method according to claim 2, wherein The corresponding motion action includes: a sudden stop and turn action; the motion state jump event includes: a sudden stop and turn event; The controlling the virtual model to adjust the torsion part orientation according to the motion state jump event to perform corresponding motion actions further includes: Obtain the initial torsion part orientation of the virtual model; In response to the movement input orientation being the base direction and opposite to the orientation of the initial twisting part of the virtual model, trigger the emergency stop turning event to make the virtual model enter the state of waiting for emergency stop turning; Overlay a preset emergency stop turning animation on the virtual model to perform the emergency stop turning action.
6. The method according to claim 5, characterized in that, The controlling the virtual model to adjust the orientation of the twisting part according to the movement state jump event to perform corresponding movement actions further includes: In response to the movement input orientation being the synthesis direction and any one of the base directions used to synthesize the synthesis direction being opposite to the orientation of the initial twisting part of the virtual model, trigger the emergency stop turning event to make the virtual model enter the state of waiting for emergency stop turning; Overlay a preset emergency stop turning animation on the virtual model to perform the emergency stop turning action.
7. The method according to claim 2, wherein The corresponding movement actions include: a moving attack linkage action; The controlling the virtual model to adjust the orientation of the twisting part according to the movement state jump event to perform corresponding movement actions further includes: Obtain the orientation of the initial twisting part of the virtual model; In response to the virtual model being in a moving state, obtain an attack offset angle, and add the attack offset angle to the orientation of the initial twisting part of the virtual model to determine the actual orientation of the virtual model; Determine the moving orientation of the virtual model according to the relative angle between the attack movement input orientation and the actual orientation; Control the virtual model to perform the moving attack linkage action according to the moving orientation.
8. The method according to claim 2, characterized in that The corresponding movement actions include: a turning action; The controlling the virtual model to adjust the orientation of the twisting part according to the movement state jump event to perform corresponding movement actions further includes: Obtain the orientation of the initial twisting part of the virtual model; In response to receiving a turning instruction, control the virtual model to move in the opposite direction of the orientation of the initial twisting part, and determine whether the duration of the virtual model moving in the opposite direction of the orientation of the initial twisting part exceeds a preset judgment time; In response to the duration of the virtual model moving in the opposite direction of the orientation of the initial twisting part exceeding the preset judgment time, control the virtual model to perform the turning action according to the turning instruction.
9. The method according to claim 1, wherein The method further includes: In response to receiving a start instruction, determine a response time according to the body type information of the virtual model; After waiting for the response time, overlay a preset preparation animation on the virtual model to execute the start instruction; wherein, the start instruction is used to instruct the virtual model to switch from a stationary state to a moving state.
10. The method according to claim 9, wherein The method further includes: In response to receiving a stop instruction, determine a buffer distance according to the body type information; Control the virtual model to move the buffer distance to execute the stop instruction.
11. A display control device for a virtual model, characterized in that, including: An acquisition module, configured to acquire the orientation information of the virtual model, where the orientation information includes the orientation of the twisting part and the movement input orientation; A determination module, configured to determine whether the virtual model meets the trigger condition for a motion state jump according to the torsion part orientation and the motion input orientation, including: determining whether the motion input orientation is one of a base direction or a composite direction; in response to the motion input orientation being one of the base direction or the composite direction, determining whether the motion angle between the torsion part orientation and the motion input orientation is greater than the direction angle between the adjacent base direction and the composite direction; in response to the motion angle being greater than the direction angle, the virtual model meets the trigger condition for the motion state jump; the base direction is determined according to a motion state orientation diagram; the composite direction is synthesized from any two non-opposite base directions; A trigger module, configured to trigger the motion state jump event in response to the virtual model meeting the trigger condition for the motion state jump; A control module, configured to control the virtual model to adjust the torsion part orientation to perform corresponding motion actions according to the motion state jump event.
12. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that When the processor executes the program, it implements the method according to any one of claims 1 to 10.
13. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to implement the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and apparatus for judging motion of virtual player
CN104966068A
Animation playing method and device based on virtual environment, equipment and storage medium
CN111273780A