CN113198179A - Virtual object steering control method and device, storage medium and electronic equipment - Google Patents

Virtual object steering control method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN113198179A
CN113198179A CN202110507354.5A CN202110507354A CN113198179A CN 113198179 A CN113198179 A CN 113198179A CN 202110507354 A CN202110507354 A CN 202110507354A CN 113198179 A CN113198179 A CN 113198179A
Authority
CN
China
Prior art keywords
steering
animation
turning
target
virtual object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110507354.5A
Other languages
Chinese (zh)
Inventor
林垍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110507354.5A priority Critical patent/CN113198179A/en
Publication of CN113198179A publication Critical patent/CN113198179A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/56Computing the motion of game characters with respect to other game characters, game objects or elements of the game scene, e.g. for simulating the behaviour of a group of virtual soldiers or for path finding
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/50Controlling the output signals based on the game progress
    • A63F13/52Controlling the output signals based on the game progress involving aspects of the displayed game scene
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor

Abstract

The disclosure relates to the field of games, and provides a steering control method, a device, a storage medium and an electronic device for a virtual object, wherein the method comprises the following steps: determining a target steering numerical value according to the target oriented numerical value and the current oriented numerical value of the virtual object; determining alternative turning animations in a plurality of preset turning animations according to the target turning numerical value, and determining a fusion proportion corresponding to the alternative turning animations according to the target turning numerical value; and determining a target steering animation according to the alternative steering animation and the fusion proportion corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation. The method and the device can control the steering of the virtual object according to the target steering animation, so that the steering of the virtual object is smooth, the step sliding phenomenon is avoided, and the player experience is improved.

Description

Virtual object steering control method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of game technologies, and in particular, to a virtual object steering control method, a virtual object steering control apparatus, a computer-readable storage medium, and an electronic device.
Background
An mmo (massively Multiplayer online) game refers to an online game which can support online of multiple persons, and belongs to an implementation form of the online game. It has strong interactivity, and the players can interact in the game.
In a conventional MMO game, players can move around monsters or other game characters with flexibility. The direction of the monsters or other game characters is changed when the monsters or other game characters want to attack the players behind, and the turning of the monsters or game characters in most MMO games is only hard and hard to rotate according to a specific coordinate axis. Thus, in the prior art, the steering process in MMO games tends to be relatively harsh or to produce severe steps.
In view of the above, there is a need in the art to develop a new method and apparatus for controlling the steering of a virtual object.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present disclosure, and thus may include information that does not constitute prior art known to those of ordinary skill in the art.
Disclosure of Invention
The present disclosure is directed to a method for controlling a virtual object, a device for controlling a virtual object, a computer-readable storage medium, and an electronic device, so as to solve at least some of the problems of a game character that the steering is hard and a step is generated.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a steering control method of a virtual object, the method including: determining a target steering numerical value according to the target oriented numerical value and the current oriented numerical value of the virtual object; determining alternative turning animations in a plurality of preset turning animations according to the target turning numerical value, and determining a fusion proportion corresponding to the alternative turning animations according to the target turning numerical value; and determining a target steering animation according to the alternative steering animation and the fusion proportion corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation.
In some exemplary embodiments of the present disclosure, determining a target steering value from a target orientation value and a current orientation value of a virtual object comprises: acquiring the current state information of the virtual object, and judging whether the virtual object meets a steering condition according to the current state information of the virtual object; and when the virtual object meets the steering condition, determining the target steering numerical value according to the target facing numerical value and the current facing numerical value.
In some exemplary embodiments of the present disclosure, the current state information of the virtual object includes left and right foot positions of the virtual object; judging whether the virtual object meets a steering condition according to the current state information of the virtual object, wherein the judging step comprises the following steps: judging whether the left foot position and the right foot position are positioned in a preset plane at the same time; and if the left foot position and the right foot position are not located on the preset plane at the same time, judging that the virtual object meets a steering condition.
In some exemplary embodiments of the present disclosure, the current state information of the virtual object includes a current moving speed of the virtual object; judging whether the virtual object meets a steering condition according to the current state information of the virtual object, wherein the judging step comprises the following steps: judging whether the virtual object is in a static state at present according to the current motion speed of the virtual object; and if the virtual object is in the static state at present, judging that the virtual object meets a steering condition.
In some exemplary embodiments of the present disclosure, before obtaining the current motion information of the virtual object, the method further includes: receiving a turning request aiming at the virtual object, and acquiring a target oriented numerical value of the virtual object according to the turning request.
In some exemplary embodiments of the present disclosure, if the virtual object is currently in a turning state, the turning state corresponds to a current turning animation; controlling the steering of the virtual object according to the target steering animation, comprising: when a target turning value in the target turning values is larger than or equal to a turning threshold value, determining a remaining time length according to the total turning time length of the virtual object and the played time length of the current turning animation; and obtaining a residual turning animation in the target turning animation according to the residual duration, and controlling the turning of the virtual object according to the current turning animation and the residual turning animation.
In some exemplary embodiments of the present disclosure, the preset duration is less than or equal to the remaining duration; controlling the steering of the virtual object according to the current steering animation and the remaining steering animation, comprising: obtaining the turning animation with the preset duration from the current turning animation as a first interpolation turning animation, and obtaining the turning animation with the preset duration from the remaining turning animation as a second interpolation turning animation; and carrying out interpolation operation according to the first interpolation turning animation and the second interpolation turning animation to obtain a target interpolation turning animation, and controlling the turning of the virtual object according to the target interpolation turning animation and the remaining turning animation.
In some exemplary embodiments of the present disclosure, if the virtual object is currently in a turning state, the turning state corresponds to a current turning animation, and the current turning animation corresponds to a current turning value; determining a target steering value according to the target orientation value and the current orientation value of the virtual object, comprising: determining an updated steering value according to the target oriented value and the current oriented value; and carrying out interpolation operation according to the current steering value and the updated steering value so as to determine the target steering value.
In some exemplary embodiments of the present disclosure, each of the preset steering animations corresponds to a preset steering value, and the target steering value includes a target steering value; determining an alternative turning animation in a plurality of preset turning animations according to the target turning numerical value, wherein the alternative turning animation comprises: matching the target steering numerical value with each preset steering numerical value respectively; if a preset steering numerical value matched with the target steering numerical value exists in the preset steering numerical values, configuring a preset steering animation corresponding to the preset steering numerical value matched with the target steering numerical value as the alternative steering animation; and if the preset steering numerical values matched with the target steering numerical value do not exist in the plurality of preset steering numerical values, determining the alternative steering animation according to the target steering numerical value and each preset steering numerical value.
In some exemplary embodiments of the present disclosure, determining the alternative steering animation according to the target steering numerical value and each of the preset steering numerical values includes: and calculating a numerical interval between the target steering numerical value and each preset steering numerical value, and determining the alternative steering animation according to the size of the numerical interval.
In some exemplary embodiments of the present disclosure, determining a fusion scale corresponding to the alternative turning animation according to the target turning numerical value includes: and determining the fusion proportion corresponding to the alternative turning animation according to the target turning numerical value and the turning numerical value of the alternative turning animation.
In some exemplary embodiments of the present disclosure, determining a target turning animation according to the alternative turning animation and a fusion ratio corresponding to the alternative turning animation includes: multiplying the steering output data of the alternative steering animation by the fusion proportion of the alternative steering animation to obtain fusion steering output data; and generating the target steering animation according to the fusion steering output data.
In some exemplary embodiments of the present disclosure, the preset turning animations each include a plurality of animation frames, each of the animation frames corresponds to a turning output data, the turning output data includes a part identifier of the virtual object, trend data corresponding to the part identifier, and angle data corresponding to the trend data, target part identifiers of a plurality of the preset turning animations in a same animation frame are the same as target trend data corresponding to the target part identifiers, and target angle data corresponding to the target trend data are different.
According to an aspect of the present disclosure, there is provided a virtual object steering control apparatus including: the target steering obtaining module is used for determining a target steering numerical value according to the target oriented numerical value and the current oriented numerical value of the virtual object; the fusion proportion determining module is used for determining alternative steering animations in a plurality of preset steering animations according to the target steering numerical value and determining fusion proportions corresponding to the alternative steering animations according to the target steering numerical value; and the object steering control module is used for determining a target steering animation according to the alternative steering animation and the fusion proportion corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation.
According to an aspect of the present disclosure, there is provided a computer readable medium, on which a computer program is stored, which when executed by a processor, implements a steering control method of a virtual object as described in the above embodiments.
According to an aspect of the present disclosure, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the steering control method of the virtual object as described in the above embodiments.
As can be seen from the foregoing technical solutions, the steering control method and apparatus for a virtual object, the computer-readable storage medium, and the electronic device in the exemplary embodiments of the present disclosure have at least the following advantages and positive effects:
the steering control method of the virtual object comprises the following steps of firstly, determining a target steering numerical value according to a target oriented numerical value and a current oriented numerical value of the virtual object; then, determining alternative turning animations in a plurality of preset turning animations according to the target turning numerical value, and determining a fusion proportion corresponding to the alternative turning animations according to the target turning numerical value; and finally, determining a target turning animation according to the alternative turning animation and the fusion proportion corresponding to the alternative turning animation, and controlling the turning of the virtual object according to the target turning animation. According to the steering control method of the virtual object, on one hand, the alternative steering animation can be determined in the preset steering animation which is preset, and then the target steering animation is determined according to the alternative steering animation, so that the animation resource of the target steering animation is rich, the steering of the virtual object is accurately controlled, and the steering performance of the virtual object is improved; on the other hand, the steering of the virtual object can be controlled according to the target steering animation, so that the steering of the virtual object is smooth, the step slipping phenomenon is avoided, and the player experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty.
FIG. 1 schematically illustrates a structural schematic of in-game coordinate axes according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow diagram of a method of steering control of a virtual object according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flowchart of a method of determining that a virtual object satisfies a steering condition, according to an embodiment of the present disclosure;
FIG. 4 schematically illustrates a flow chart of a method of determining a target turn value according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates a flowchart of a method of determining an alternate turning animation according to an embodiment of the present disclosure;
FIG. 6 is a diagram schematically illustrating a relationship between a preset turning animation and a target turning value according to an embodiment of the present disclosure;
FIG. 7 schematically illustrates a flowchart of a method of controlling steering of a virtual object, according to an embodiment of the present disclosure;
FIG. 8 schematically illustrates a flowchart of a method of controlling steering of a virtual object, according to an embodiment of the present disclosure;
FIG. 9 schematically illustrates a flow diagram of a method of steering control of a virtual object, in accordance with a specific embodiment of the present disclosure;
FIG. 10 schematically illustrates a relationship diagram of a preset turn animation and a first target turn value according to an embodiment of the disclosure;
FIG. 11 is a schematic diagram illustrating a new preset turning animation and a second target turning value according to an embodiment of the disclosure;
FIG. 12 schematically illustrates a structural diagram of interpolating a first target steer animation and a second target steer animation according to an embodiment of the present disclosure;
FIG. 13 schematically illustrates a block diagram of a steering control of a virtual object, in accordance with an embodiment of the present disclosure;
FIG. 14 schematically shows a block schematic of an electronic device according to an embodiment of the disclosure;
FIG. 15 schematically shows a program product schematic according to an embodiment of the disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the disclosure.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
In the related art in the field, a turning operation of a virtual object in an MMO game generally performs a rotating operation according to a coordinate axis to turn a target direction at a predetermined angular velocity. For example, fig. 1 shows a schematic structural diagram of coordinate axes in a game, and when a virtual object turns, the virtual object can rotate according to the Y axis in fig. 1. If the turning animation exists, the corresponding animation is played while the turning target faces. However, since the rotation of the coordinate axis is not related to the played turning animation, the turning details of the virtual object are lost, and the virtual object generates a step slipping phenomenon. The steering details may include, among other things, non-linear steering acceleration in the steering animation. In addition, during steering, when there is a new steering request; if a new steering request is responded, although the steering reaction is timely, the rhythm of the whole animation is disturbed; if the new steering request is not responded to, the virtual object is delayed to respond, and the virtual object looks clumsy.
Based on the problems in the related art, in an embodiment of the present disclosure, a method for controlling steering of a virtual object is provided, and fig. 2 shows a flow chart of the method for controlling steering of a virtual object, as shown in fig. 2, the method for controlling steering of a virtual object at least includes the following steps:
step S210: determining a target steering numerical value according to the target oriented numerical value and the current oriented numerical value of the virtual object;
step S220: determining alternative turning animations in a plurality of preset turning animations according to the target turning numerical value, and determining a fusion proportion corresponding to the alternative turning animations according to the target turning numerical value;
step S230: and determining a target turning animation according to the alternative turning animation and the fusion proportion corresponding to the alternative turning animation, and controlling the turning of the virtual object according to the target turning animation.
According to the steering control method of the virtual object in the embodiment of the disclosure, on one hand, the alternative steering animation can be determined in the preset steering animation which is preset, and then the target steering animation is determined according to the alternative steering animation, the animation resource of the target steering animation is rich, the steering of the virtual object is accurately controlled, and the steering performance of the virtual object is improved; on the other hand, the steering of the virtual object can be controlled according to the target steering animation, so that the steering of the virtual object is smooth, the step slipping phenomenon is avoided, and the player experience is improved.
The virtual object steering control method according to the exemplary embodiment of the present disclosure may be executed by a server, and a virtual object steering control device corresponding to the virtual object steering control method may be disposed in the server. Furthermore, it should be understood that a terminal device (e.g., a mobile phone, a tablet, etc.) may also implement the steps of the steering control method of the virtual object, and corresponding apparatuses may also be configured in the terminal device. The server may be a game server, and the terminal device may be a game terminal. When the steering control method of the virtual object of the present disclosure is run in a server, it may be a cloud game.
In an exemplary embodiment of the present disclosure, cloud gaming refers to a cloud computing-based gaming manner. In the running mode of the cloud game, the running main body of the game program and the game picture presenting main body are separated, the storage and the running of the steering control method of the virtual object are completed on a cloud game server, and the cloud game client is used for receiving and sending data and presenting the game picture, for example, the cloud game client can be a display device with a data transmission function close to a user side, such as a mobile terminal, a television, a computer, a palm computer and the like; however, the terminal device performing the game data processing is a cloud game server in the cloud. When a game is played, a player operates the cloud game client to send an operation instruction to the cloud game server, the cloud game server runs the game according to the operation instruction, data such as a game scene and the like are encoded and compressed, the data are returned to the cloud game client through a network, and finally the data are decoded through the cloud game client and the game scene is output.
In order to make the technical solution of the present disclosure clearer, each step of the virtual object steering control method will be described next.
In step S210, a target steering value is determined according to the target orientation value and the current orientation value of the virtual object.
In an exemplary embodiment of the present disclosure, the virtual object includes all objects that can move in the game, for example, objects that need to be steered, such as game characters, monsters, props, and the like in the game.
In an exemplary embodiment of the present disclosure, current state information of a virtual object is obtained, and whether the virtual object satisfies a steering condition is determined according to the current state information of the virtual object; and when the virtual object meets the steering condition, determining a target steering numerical value according to the target facing numerical value and the current facing numerical value.
The current state information of the virtual object may include a current motion speed of the virtual object, a current orientation value of the virtual object, and a left foot position and a right foot position of the virtual object. The turning condition may be that the virtual object is currently in a stationary state, the turning condition may also be that the virtual object is in a one-foot-grounded state, the turning condition may also be that the virtual object is in a jumping state, and so on. The current state information and the steering condition may be set according to an actual application scenario, which is not specifically limited by the present disclosure.
In an exemplary embodiment of the present disclosure, after acquiring the current state information of the virtual object, it may be determined whether the virtual object satisfies the steering condition according to the left and right foot positions of the virtual object. Specifically, fig. 3 is a schematic flowchart of a method for determining that a virtual object satisfies a steering condition, and as shown in fig. 3, the flowchart at least includes steps S310 to S330, which are described in detail as follows:
in step S310, the left foot position and the right foot position of the virtual object are acquired.
In an exemplary embodiment of the present disclosure, the left foot position and the right foot position may be specifically position coordinates where the left foot and the right foot of the virtual object are located. In addition, the virtual object may include more than two feet, and the number of the feet of the virtual object is not particularly limited by the present disclosure.
In step S320, it is determined whether the left foot position and the right foot position of the virtual object are both located in a predetermined plane.
In an exemplary embodiment of the present disclosure, the preset plane may be a fixed plane set in a game, for example, the preset plane may be a ground plane, a sea level, or the like, which is not specifically limited in the present disclosure.
And if the virtual object comprises a plurality of feet, judging whether the plurality of feet of the virtual object are positioned in the preset plane at the same time, and if only one foot of the virtual object is positioned in the preset plane, judging that the virtual object meets the steering condition.
In step S330, if the left foot position and the right foot position of the virtual object are not located on the preset plane at the same time, it is determined that the virtual object satisfies the steering condition.
In an exemplary embodiment of the present disclosure, if it is determined that the virtual object is in a one-foot-grounded state when the left foot position of the virtual object is located within the preset plane and the right foot position of the virtual object is not located within the preset plane, the virtual object satisfies the steering condition.
Or when the position of the right foot of the virtual object is located in the preset plane and the position of the left foot of the virtual object is not located in the preset plane, the virtual object is judged to be in a single-foot grounding state, and the virtual object meets the steering condition.
If the left foot position and the right foot position of the virtual object are not located in the preset plane, but the left foot position and the right foot position of the virtual object are located in the same horizontal plane, the horizontal plane is different from the preset plane. That is, when the current state of the virtual object is a state in which both feet are not touching the ground, the current steering angle of the virtual object may be acquired, and if the current steering angle of the virtual object is not 0 °, it is determined that the virtual object satisfies the steering condition.
In an exemplary embodiment of the present disclosure, a current movement speed of the virtual object is obtained, and whether the virtual object is currently in a static state may be determined according to the current movement speed of the virtual object; and if the virtual object is in a static state at present, judging that the virtual object meets the steering condition.
Specifically, whether the current movement speed of the virtual object is zero or not is judged, and if the current movement speed of the virtual object is zero, the virtual object is judged to be in a static state at present, that is, the virtual object meets the steering condition.
In an exemplary embodiment of the present disclosure, before obtaining the current action information of the virtual object, a steering request for the virtual object is received, and a target-oriented numerical value of the virtual object is obtained according to the steering request. The steering request comprises the unique identification of the virtual object and the target-oriented numerical value of the virtual object, the target-oriented numerical value comprises a target-oriented numerical value, and the target-oriented numerical value is the steering angle of the virtual object.
The turning request can be formed by a triggering operation of the player on the terminal device, and the triggering operation can be a sliding turning operation of the player for a game character of the player in the game and also can be a triggering attack operation of the player for a monster in the game. For example, a player forms a steering request for a game character by performing a sliding operation on a terminal device for the game character; also, the player forms a turn request for the monster by controlling the game character to attack the monster. The steering request may be formed by the terminal device or may be formed by the server. For example, the turning request may be formed by the terminal device according to the operation of the player to the game character, may be formed by the server according to the operation of the player to the monster, and the like, and the disclosure is not particularly limited thereto.
In an exemplary embodiment of the present disclosure, the terminal device may include a display area, and the trigger operation by the player on the terminal may be an operation by the player on the display area. The triggering operation includes a contact triggering operation or a non-contact triggering operation, where the non-contact triggering operation may be a floating touch operation, and the floating touch operation is a technology that can detect an operation of an operation medium in front of a screen of a touch terminal by using capacitive touch sensing or a sensor (e.g., a light sensor or an ultrasonic sensor) carried in the touch terminal. Of course, the non-contact triggering operation may also be a non-contact operation in other manners, and the player may implement an interaction function with the terminal device without contacting the terminal device. In addition, the operation medium for triggering the operation may be a finger of the player, a stylus pen, or the like, which is not specifically limited in this disclosure.
In an exemplary embodiment of the present disclosure, whether the virtual object is currently in a steered state or not, the target steering value may be subtracted from the current steering value to obtain the target steering value.
In an exemplary embodiment of the disclosure, if the virtual object is currently in a turning state, the turning state corresponds to a current turning animation, and the current turning animation corresponds to a current turning value. The current steering numerical value is target steering data when entering the steering state at the current moment, and the current steering animation is the target steering animation when entering the steering state at the current moment.
Specifically, fig. 4 is a schematic flow chart of a method for determining a target steering value, and as shown in fig. 4, the flow chart at least includes steps S410 to S420, and the following is described in detail:
in step S410, an updated steering value is determined according to the target orientation value and the current orientation value of the virtual object.
In an exemplary embodiment of the present disclosure, the target steering value is obtained by subtracting the current steering value from the target steering value.
In step S420, an interpolation operation is performed according to the current steering value and the updated steering value to determine a target steering value.
In an exemplary embodiment of the present disclosure, the current steering value and the updated steering value are interpolated using an interpolation algorithm to obtain the target steering value. The interpolation algorithm may include a linear interpolation algorithm, and the like, which is not specifically limited in this disclosure.
The method comprises the steps of obtaining a plurality of target steering animation according to a current steering numerical value and an updated steering numerical value, obtaining a plurality of target steering animation according to the plurality of target steering numerical values, and controlling the steering of a virtual object according to the plurality of target steering animation. For example, if the current turning numerical value is 90 °, the updated turning numerical value is 180 °, then 5 target turning numerical values may be determined, and the target turning numerical values may be 108 °, 126 °, 144 °, 162 °, and 180 °, respectively, and the target turning animation corresponding to the 5 target turning numerical values is obtained. If the turning residual time length of the virtual object is 10s, obtaining an animation segment with the time length of 2s at the corresponding moment in the target turning animation corresponding to 108 degrees, 126 degrees, 144 degrees, 162 degrees and 180 degrees respectively, and playing the animation segment according to the sequence of 108 degrees, 126 degrees, 144 degrees, 162 degrees and 180 degrees.
Continuing to refer to fig. 2, in step S220, an alternative turning animation is determined among a plurality of preset turning animations according to the target turning value, and a fusion ratio corresponding to the alternative turning animation is determined according to the target turning value.
In an exemplary embodiment of the present disclosure, a plurality of preset turning animations are preset for each virtual object, each preset turning animation corresponds to a preset turning numerical value, and the preset turning numerical value represents an animation angle of the preset turning animation. The number of the preset turning animations may be 3, or may also be 5 or more than 5, which is not specifically limited in this disclosure. Multiple preset turning animations of a virtual object may be used for all turning controls of the virtual object in the game.
For example, on the premise of ensuring the turning quality of the animation, 5 preset turning animations are preset, and table 1 shows an information table of the preset turning animations.
TABLE 1 Preset information sheet for turning animation
Preset steering animation Preset steering number Description of the invention
IDLE Standby animation
left_90 90° Animation of turning left by 90 degrees
left_180 180° 180 degree left turn animation
right_90 -90° 90 degree right turn animation
right_180 -180° 180 right turn animation
As shown in table 1, the 5 preset turning animations are divided into IDLE, LEFT _90, LEFT _180, RIGHT _90, and RIGHT _180, the preset turning value of the IDLE animation is 0 °, and the IDLE animation belongs to a standby animation, that is, the corresponding turning animation when the turning angle of the virtual object is 0 °; the preset steering value of the LEFT-90 animation is 90 degrees, and the LEFT-90 animation belongs to a 90-degree LEFT-turning animation, namely the corresponding steering animation when the steering angle of the virtual object is 90 degrees LEFT-turning; the preset steering value of the LEFT _180 animation is 180 degrees, and the LEFT _180 animation belongs to 180-degree LEFT-turning animation, namely the corresponding steering animation when the steering angle of the virtual object is 180 degrees LEFT-turning; the preset steering value of the RIGHT _90 animation is 90 degrees, and the RIGHT _90 animation belongs to a 90-degree RIGHT-turning animation, namely the corresponding steering animation when the steering angle of the virtual object is 90 degrees RIGHT-turning; the preset turning value of the RIGHT _180 animation is 180 degrees, and the RIGHT _180 animation belongs to 180-degree RIGHT-turning animation, namely the corresponding turning animation when the turning angle of the virtual object is 180 degrees RIGHT-turning.
In addition, the durations of the preset turning animations may be the same or different, and this disclosure does not specifically limit this.
In an exemplary embodiment of the present disclosure, each preset turning animation includes a plurality of animation frames, each animation frame corresponds to a turning output data, the turning output data includes a part identifier of a virtual object, trend data corresponding to the part identifier, and angle data corresponding to the trend data, target trend data corresponding to target part identifiers and target part identifiers of a plurality of preset turning animations in the same animation frame are the same, and target angle data corresponding to the target trend data are different.
The part identifier of the virtual object is used for identifying each part of the virtual object, the trend data corresponding to the part identifier represents the action of each part of the virtual object, and the angle data corresponding to the trend data represents the angle of the action. For example, if the virtual object is a virtual character, the part of the virtual object may include a left leg, a right leg, a left arm, a right arm, a left foot, a right foot, a head, a body, and the like, the trend data corresponding to the left leg may be motion data indicating that the left leg is lifted upward, the left leg is tilted backward, and the angle data corresponding to the left leg is lifted upward, and the angle data may be angle data indicating that the left leg is lifted upward by 20 degrees, 40 degrees, 90 degrees, and the like. Of course, the position of the virtual object, the trend data corresponding to the position, the angle data corresponding to the trend data, and the like may be set according to the actual application scene, which is not particularly limited in this disclosure.
By the method of the embodiment of the disclosure, the steering rhythms of the preset steering animations are consistent, that is, the preset steering animations have the same action trend at the same time percentage. For example, if the plurality of preset turning animations are all 10s, when the virtual object shows the tendency of throwing out the LEFT arm in the 5 th animation frame corresponding to the preset turning animation LEFT _90, the virtual object also shows the tendency of throwing out the LEFT arm in the 5 th animation frame of the preset turning animation LEFT _180, and only the angle of throwing out the LEFT arm is different.
In an exemplary embodiment of the disclosure, fig. 5 is a flowchart illustrating a method for determining an alternative steering animation, and as shown in fig. 5, in step S510, target steering values are respectively matched with preset steering values; in step S520, if there is a preset steering numerical value that matches the target steering numerical value among the plurality of preset steering numerical values, configuring a preset steering animation corresponding to the preset steering numerical value that matches the target steering numerical value as an alternative steering animation; in step S530, if there is no preset steering numerical value matching the target steering numerical value among the plurality of preset steering numerical values, an alternative steering animation is determined according to the target steering numerical value and each preset steering numerical value.
For example, if the target turning value is-90 °, the preset turning values corresponding to the preset turning animations include: 0 degrees, 90 degrees, 180 degrees, 90 degrees and 180 degrees, the alternative turning animation is the preset turning animation RIGHT _90 corresponding to the 90 degrees.
In addition, if there is no preset steering numerical value matching the target steering numerical value in the plurality of preset steering numerical values, determining an alternative steering animation according to the target steering numerical value and each preset steering numerical value, including: and calculating the numerical interval between the target steering numerical value and each preset steering numerical value, and determining the alternative steering animation according to the size of the numerical interval.
Specifically, the target steering numerical value is subtracted from each preset steering numerical value, an absolute value is taken, a numerical interval corresponding to each preset steering numerical value is obtained, and the preset steering animation corresponding to two preset steering numerical values with a smaller numerical interval is used as the alternative steering animation.
For example, if the target turning value is 135 °, the preset turning values corresponding to the preset turning animations include: 0 °, 90 °, 180 °, -90 °, 180 °. Calculating numerical intervals between the target steering numerical value and a plurality of preset steering numerical values, wherein the numerical intervals corresponding to the preset steering numerical values are respectively as follows: 135 °, 45 °, 225 °, 315 °. The two preset turn values with the smaller value interval are 90 ° and 180 °, then LEFT _90 and LEFT _180 are taken as alternative turn animations.
Fig. 6 is a schematic diagram illustrating a relationship structure between the preset turning animation and the target turning value, and as shown in fig. 6, if the target turning value of 135 ° is between 90 ° and 180 °, the alternative turning animations corresponding to the target turning value are LEFT _90 and LEFT _ 180.
In an exemplary embodiment of the present disclosure, determining a fusion scale corresponding to the alternative turning animation according to the target turning numerical value includes: and determining the fusion proportion corresponding to the alternative turning animation according to the target turning numerical value and the turning numerical value of the alternative turning animation.
Specifically, according to the target steering numerical value and the steering numerical value corresponding to the alternative steering animation, the fusion proportion corresponding to the alternative steering animation is determined through a fusion formula, and the fusion formula is shown as a formula (1):
C=a×Anim1.yaw+b×Anim2.yaw (1)
wherein a + b is 1, C represents a target steering numerical value, Anim1.yaw and Anim2.yaw are steering numerical values corresponding to the alternative steering animations Anim1 and Anim2, respectively, a is a fusion proportion corresponding to the alternative steering animation Anim1, and b is a fusion proportion corresponding to the alternative steering animation Anim2.
For example, the target turn value is 135 °, and the alternative turn animations are LEFT _90 and LEFT _180 with fusion ratios of 0.5.
Continuing to refer to fig. 2, in step S230, a target turning animation is determined according to the alternative turning animation and the fusion ratio corresponding to the alternative turning animation, and the turning of the virtual object is controlled according to the target turning animation.
In an exemplary embodiment of the present disclosure, determining a target turning animation according to an alternative turning animation and a fusion ratio corresponding to the alternative turning animation includes: multiplying the steering output data of the alternative steering animation by the fusion proportion of the alternative steering animation to obtain fusion steering output data; and generating a target steering animation according to the fusion steering output data.
Specifically, the alternative turning animation comprises a turning output data set, and the turning output data set comprises turning output data corresponding to each animation frame in the alternative turning animation. And multiplying the elements in the steering output data set in each alternative steering animation by the fusion proportion corresponding to each alternative steering animation to obtain the fusion steering output data corresponding to each alternative steering animation. And adding the fused steering output data corresponding to the alternative steering animations to generate the target steering animation.
In an exemplary embodiment of the present disclosure, after obtaining a steering request of a virtual object and determining that the virtual object satisfies a steering condition according to current state information of the virtual object, it may be further determined whether the virtual object is currently in a steering state; if the virtual object is not in the steering state, receiving a steering request, and executing steps S210 to S230; and if the virtual object is in the steering state at present, judging whether the current steering animation needs to be updated according to the target steering numerical value.
The current state information of the virtual object may further include a current steering identifier of the virtual object, and if the steering identifier is 0, it indicates that the virtual object is not in a steering state currently; if the steering identifier is 1, the virtual object is currently in a steering state. Of course, whether the virtual object is currently in the steering state may also be determined according to the angle information in the current state information, and the determination method of the steering state of the virtual object is not specifically limited in this disclosure.
Specifically, if the virtual object is currently in a turning state, the turning state corresponds to a current turning animation. Judging whether a target steering numerical value corresponding to the target steering numerical value is greater than or equal to a steering threshold value or not, if so, determining a target steering animation according to the target steering numerical value, and updating the current steering animation according to the target steering animation; and if the target steering numerical value is smaller than the steering threshold value, continuing to control the steering of the virtual object according to the current steering animation.
The steering threshold may be preset according to an actual scene, for example, the steering threshold may be 5 ° or may also be 3 °, and the disclosure does not specifically limit this.
In an exemplary embodiment of the disclosure, fig. 7 is a flowchart illustrating a method for controlling steering of a virtual object, where, as shown in fig. 7, the flowchart at least includes steps S710 to S720, and the following is described in detail:
in step S710, when the target turning value of the target turning values is greater than or equal to the turning threshold, a remaining time length is determined according to the total turning time length of the virtual object and the played time length of the current turning animation.
In an exemplary embodiment of the present disclosure, the played duration of the current turning animation is subtracted from the total turning duration of the virtual object to obtain a remaining duration. The total steering duration of the virtual object can be preset, the duration of the target steering animation is greater than or equal to the total steering duration of the virtual object, namely the duration of the preset steering animation is greater than or equal to the total steering duration of the virtual object, and the total steering duration of the virtual object is not specifically limited by the method.
In step S720, a remaining turning animation is obtained from the target turning animation according to the remaining duration, and the turning of the virtual object is controlled according to the current turning animation and the remaining turning animation.
In an exemplary embodiment of the present disclosure, if the target turning animation is the same as the total turning time of the virtual object, a turning animation after the broadcasting time is intercepted in the target turning animation as a remaining turning animation, or a turning animation of the remaining time is intercepted from the back to the front in the target turning animation as a remaining turning animation.
For example, the target turning animation and the total turning time of the virtual object are both 10s, the played time of the current turning animation is 5s, and then animation frames within 5 s-10 s are intercepted in the target turning animation to be used as the remaining turning animation.
In addition, if the duration of the target turning animation is greater than the total turning duration of the virtual object, intercepting the remaining turning animation in the target turning animation according to the proportional relation of the remaining duration to the total turning duration.
For example, if the time length of the target turning animation is 10s, the total turning time length of the virtual object is 5s, the played time length of the current turning animation is 3s, and the remaining time length is 2s, the animation frames within 6 s-10 s are intercepted from the target turning animation as the remaining turning animation.
In an exemplary embodiment of the present disclosure, the playing of the current turning animation of the virtual object may be stopped and the playing of the remaining turning animation of the virtual object may be started from the current time.
In addition, a preset duration may also be preset, where the preset duration is less than or equal to the remaining duration, and the preset duration may be set according to an actual application scenario, which is not specifically limited by the present disclosure.
Specifically, fig. 8 is a schematic flowchart of a method for controlling steering of a virtual object, and as shown in fig. 8, the flowchart at least includes steps S810 to S820, which are described in detail as follows:
in step S810, a preset-duration turning animation is acquired in the current turning animation as a first interpolated turning animation, and a preset-duration turning animation is acquired in the remaining turning animation as a second interpolated turning animation.
In an exemplary embodiment of the present disclosure, a turning animation with a preset duration is obtained from the current time in the current turning animation, and if the current turning animation has played an animation frame of 0s to 10s at the current time, the turning animation with the preset duration is obtained as the first interpolation turning animation from the 10 th s in the current turning animation. In addition, a preset duration of turning animation is obtained from the remaining turning animation as a second interpolated turning animation.
In step S820, an interpolation operation is performed according to the first interpolation turning animation and the second interpolation turning animation to obtain a target interpolation turning animation, and turning of the virtual object is controlled according to the target interpolation turning animation and the remaining turning animation.
In an exemplary embodiment of the disclosure, interpolation operation is performed on steering output data of each frame of the first interpolation steering animation and the second interpolation steering animation by using a linear difference function, so as to obtain a target interpolation steering animation with a preset time length. And controlling the steering of the virtual object according to the target interpolation steering animation and the remaining steering animation obtained after the second interpolation steering animation is intercepted. In addition, a curve transition mode of first fast to last slow, first slow to last fast and the like can be adopted for interpolation operation, and the method is not particularly limited in the disclosure.
The following describes the steering control method of the virtual object in the present exemplary embodiment in detail with reference to specific scenarios, where the specific scenarios are:
the current orientation numerical value of the virtual object is 0 degrees, the total steering time of the virtual object is 10s, and the preset steering animation comprises the following steps: IDLE, LEFT _90, LEFT _180, RIGHT _90, RIGHT _ 180. Table 2 shows an animation turn output table of the preset turn animation, as shown in Table 2, the total animation time lengths of a plurality of preset turn animations are all Tend,TendAnd may be 15 s.
TABLE 2 animation turning output table with preset turning animation
Preset steering animation Steering data output interval Preset steering number
IDLE 0s~Tend
left_90 0s~Tend 90°
left_180 0s~T end 180°
right_90 0s~Tend -90°
right_180 0s~Tend -180°
Fig. 9 is a schematic flowchart of a steering control method for a virtual object according to an embodiment, where as shown in fig. 9, the flowchart at least includes step S910 to step S970, and the following is described in detail:
in step S910, a first steering request is received, and a plurality of first alternative steering animations are obtained from a preset steering animation according to the first steering request;
wherein the first target steering value included in the first steering request is 45 °, the first target steering value is 45 °. Fig. 10 is a schematic diagram showing the relationship between the preset turning animation and the first target turning numerical value, and as shown in fig. 10, the first target turning numerical value is located between the preset turning numerical values corresponding to IDLE and LEFT _90, so that the first candidate turning animation of the first target turning numerical value is IDLE and LEFT _ 90.
In step S920, determining a first target turning animation according to the plurality of first candidate turning animations, and controlling the turning of the virtual object according to the first target turning animation;
specifically, if it is determined that the fusion proportion of IDLE to LEFT _90 is 0.5 according to the fusion formula (1), the first target turning animation is determined according to the formula (2), and the formula (2) is as follows:
X=IDLE*0.5+LEFT_90*0.5 (2)
wherein X is the first target turning animation.
In step S930, in the process that the virtual object turns according to the first turning request, receiving a second turning request, and obtaining a plurality of second alternative turning animations in the preset turning animation according to the second turning request;
and receiving the second steering request when the steered time length of the virtual object is 5s, wherein the second target orientation value included in the second steering request is 135 degrees.
Specifically, the LEFT _90 and LEFT _180 animation groups may be obtained in the preset turning animation according to fig. 6, and then the animation frames at the 5 s-15 s moments are obtained in the LEFT _90 and LEFT _180 animation groups respectively as the second alternative turning animation.
In addition, the remaining duration can be calculated according to the total steering duration and the steered duration of the virtual object, the remaining duration is 10s, and the animation with the remaining duration of 10s, which is obtained from the preset steering animation, is used as a new preset steering animation. Table 3 shows an animation turn output table of the new preset turn animation, as shown in Table 3, the new preset turn animation is different from the preset turn animation only in animation duration, and the time in the preset turn animation is obtained at Tnew~TendAnimation in between as a new preset turn animation, Tnew~TendFor remaining duration, TnewTime 5 s.
TABLE 3 animation turning output table of new preset turning animation
Preset steering animation Steering data output interval Steering output
IDLE Tnew~Tend 0
left_90 Tnew~Tend <90°
left_180 Tnew~Tend <180°
right_90 Tnew~Tend >-90°
right_180 Tnew~Tend >-180°
Then, fig. 11 shows a relationship structure diagram of a new preset turning animation and a second target turning numerical value, as shown in fig. 11, the second target turning numerical value is located between the preset turning numerical values corresponding to LEFT _90 and LEFT _180, and therefore, the turning data output interval corresponding to LEFT _90 and LEFT _180 is at Tnew~TendAs a second alternative turn animation.
In step S940, a second target turning animation is determined according to the plurality of second alternative turning animations;
if the fusion proportion of LEFT _90 to LEFT _180 is determined to be 0.5 according to the fusion formula (1), determining a second target turning animation according to a formula (3), wherein the formula (3) is as follows:
Y=LEFT_90*0.5+LEFT_180*0.5 (3)
wherein Y is the second target turning animation.
In step S950, performing interpolation operation according to the first target turning animation and the second target turning animation to obtain a target interpolated turning animation;
specifically, fig. 12 shows a schematic structural diagram of interpolating the first target turning animation and the second target turning animation, and the present exemplary embodiment performs interpolation operation by using linear interpolation to obtain a plurality of target interpolation turning animations. For example, 5 target interpolation turning animations can be calculated according to the following formulas (4) to (8):
Z1=X*0.8+Y*0.2 (4)
Z2=X*0.6+Y*0.4 (5)
Z3=X*0.4+Y*0.6 (6)
Z4=X*0.2+Y*0.8 (7)
Z5=X*0.0+Y*1.0 (8)
wherein Z is1、Z2、Z3、Z4、Z5And 5 target interpolation turning animations are respectively carried out.
In step S960, controlling the steering of the virtual object according to the target interpolation steering animation within a preset duration;
the preset time is a filtering time set by cosine, and the transition time can be 5s, which is 5s to 10s in the steering process. In the 5s to 6s, Z is used1Controlling steering of the virtual object; in the 6s to 7s, Z is used2Controlling steering of the virtual object; in the 7 th to 8 th s, Z is used3Controlling steering of the virtual object; in 8s to 9s, using Z4Controlling steering of the virtual object; in 9s to 10s, using Z5Controlling the steering of the virtual object.
In step S970, after a preset time period, the turning of the virtual object is controlled according to the second target turning animation.
Specifically, in the turning process after the transition duration, namely in 10s to 15s of the turning process, the animation frames corresponding to 10s to 15s in the second turning animation are played.
The steering control method for the virtual object in the exemplary embodiment can further improve the steering performance quality and avoid the fusion sliding step by presetting more preset steering animation resources, thereby improving the game experience of the player. In addition, the steering control method of the embodiment performs the steering control after receiving the steering request, and the steering control is more time-efficient. And when the timeliness is guaranteed, the steering rhythm is kept unchanged, the original speed mutation caused by interrupting the current steering first and then steering again is replaced, and the steering performance is better.
Those skilled in the art will appreciate that all or part of the steps implementing the above embodiments are implemented as computer programs executed by a CPU. The computer program, when executed by the CPU, performs the functions defined by the method provided by the present invention. The program may be stored in a computer readable storage medium, which may be a read-only memory, a magnetic or optical disk, or the like.
Furthermore, it should be noted that the above-mentioned figures are only schematic illustrations of the processes involved in the method according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
The following describes embodiments of the apparatus of the present disclosure, which may be used to execute the steering control method of the virtual object of the present disclosure. For details that are not disclosed in the embodiments of the apparatus of the present disclosure, please refer to the embodiments of the steering control method for virtual objects described above in the present disclosure.
Fig. 13 schematically shows a block diagram of a steering control device of a virtual object according to one embodiment of the present disclosure.
Referring to fig. 13, according to a virtual object steering control apparatus 1300 according to an embodiment of the present disclosure, the virtual object steering control apparatus 1300 includes: a target steering obtaining module 1301, a fusion proportion determining module 1302 and an object steering control module 1303. Specifically, the method comprises the following steps:
a target steering obtaining module 1301, configured to determine a target steering value according to a target oriented value and a current oriented value of the virtual object;
a fusion proportion determining module 1302, configured to determine an alternative turning animation from the multiple preset turning animations according to the target turning numerical value, and determine a fusion proportion corresponding to the alternative turning animation according to the target turning numerical value;
and the object steering control module 1303 is used for determining the target steering animation according to the alternative steering animation and the fusion proportion corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation.
In an exemplary embodiment of the present disclosure, the target steering obtaining module 1301 may be further configured to obtain current state information of the virtual object, and determine whether the virtual object satisfies a steering condition according to the current state information of the virtual object; and when the virtual object meets the steering condition, determining a target steering numerical value according to the target facing numerical value and the current facing numerical value.
In an exemplary embodiment of the disclosure, the target steering obtaining module 1301 may be further configured to determine whether the left foot position and the right foot position are located in a preset plane at the same time; and if the left foot position and the right foot position are not located on the preset plane at the same time, judging that the virtual object meets the steering condition. The current state information of the virtual object comprises a left foot position and a right foot position of the virtual object.
In an exemplary embodiment of the present disclosure, the target steering obtaining module 1301 may be further configured to determine whether the virtual object is currently in a static state according to the current motion speed of the virtual object; and if the virtual object is in a static state at present, judging that the virtual object meets the steering condition. Wherein the current state information of the virtual object includes a current moving speed of the virtual object.
In an exemplary embodiment of the disclosure, the target steering obtaining module 1301 may be further configured to determine an updated steering value according to the target oriented value and the current oriented value; and carrying out interpolation operation according to the current steering numerical value and the updated steering numerical value so as to determine a target steering numerical value. The virtual object is currently in a turning state, the turning state corresponds to a current turning animation, and the current turning animation corresponds to a current turning numerical value.
In an exemplary embodiment of the present disclosure, the fusion ratio determining module 1302 may be further configured to match the target steering value with each preset steering value respectively; if a preset steering numerical value matched with the target steering numerical value exists in the preset steering numerical values, configuring a preset steering animation corresponding to the preset steering numerical value matched with the target steering numerical value into an alternative steering animation; and if the preset steering numerical values matched with the target steering numerical value do not exist in the plurality of preset steering numerical values, determining the alternative steering animation according to the target steering numerical value and each preset steering numerical value. Each preset steering animation corresponds to a preset steering numerical value, and the target steering numerical value comprises a target steering numerical value.
It should be noted that the preset turning animations each include a plurality of animation frames, each animation frame corresponds to a turning output data, the turning output data includes a part identifier of the virtual object, trend data corresponding to the part identifier, and angle data corresponding to the trend data, the target part identifiers of the plurality of preset turning animations in the same animation frame are the same as the target trend data corresponding to the target part identifiers, and the target angle data corresponding to the target trend data are different.
In an exemplary embodiment of the present disclosure, the fusion ratio determining module 1302 may be further configured to calculate a numerical interval between the target steering numerical value and each preset steering numerical value, and determine the alternative steering animation according to a size of the numerical interval.
In an exemplary embodiment of the present disclosure, the object steering control module 1303 may be further configured to determine a remaining duration according to the total steering duration of the virtual object and the played duration of the current steering animation when a target steering value of the target steering values is greater than or equal to a steering threshold; and obtaining the residual turning animation in the target turning animation according to the residual duration, and controlling the turning of the virtual object according to the current turning animation and the residual turning animation. The virtual object is currently in a turning state, and the turning state corresponds to a current turning animation.
In an exemplary embodiment of the present disclosure, the object steering control module 1303 may be further configured to obtain a steering animation of a preset duration as a first interpolated steering animation in the current steering animation, and obtain a steering animation of a preset duration as a second interpolated steering animation in the remaining steering animation; and carrying out interpolation operation according to the first interpolation turning animation and the second interpolation turning animation to obtain a target interpolation turning animation, and controlling the turning of the virtual object according to the target interpolation turning animation and the residual turning animation. Wherein the preset duration is less than or equal to the remaining duration.
In an exemplary embodiment of the present disclosure, the object steering control module 1303 may be further configured to multiply the steering output data of the alternative steering animation with the fusion ratio of the alternative steering animation to obtain fusion steering output data; and generating a target steering animation according to the fusion steering output data.
In an exemplary embodiment of the present disclosure, the virtual object steering control apparatus 1300 further includes a steering request receiving module (not shown in the figure) configured to receive a steering request for the virtual object, and obtain a target-oriented value of the virtual object according to the steering request.
The specific details of the steering control device for each virtual object have been described in detail in the steering control method for the corresponding virtual object, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the apparatus for performing are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the present disclosure. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 1400 according to this embodiment of the invention is described below with reference to fig. 14. The electronic device 1400 shown in fig. 14 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 14, the electronic device 1400 is embodied in the form of a general purpose computing device. The components of the electronic device 1400 may include, but are not limited to: the at least one processing unit 1410, the at least one memory unit 1420, the bus 1430 that connects the various system components (including the memory unit 1420 and the processing unit 1410), and the display unit 1440.
Wherein the storage unit stores program code that is executable by the processing unit 1410, such that the processing unit 1410 performs steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification. For example, the processing unit 1410 may execute step S210 shown in fig. 2, and determine a target steering value according to the target orientation value and the current orientation value of the virtual object; step S120, determining alternative steering animations in a plurality of preset steering animations according to the target steering numerical value, and determining a fusion proportion corresponding to the alternative steering animations according to the target steering numerical value; and step S130, determining a target steering animation according to the alternative steering animation and the fusion ratio corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation.
The storage unit 1420 may include readable media in the form of volatile memory units, such as a random access memory unit (RAM)14201 and/or a cache memory unit 14202, and may further include a read only memory unit (ROM) 14203.
Storage unit 1420 may also include a program/utility 14204 having a set (at least one) of program modules 14205, such program modules 14205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 1430 may be any type of bus structure including a memory cell bus or memory cell controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 1400 can also communicate with one or more external devices 1600 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a viewer to interact with the electronic device 1400, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 1400 to communicate with one or more other computing devices. Such communication can occur via an input/output (I/O) interface 1450. Also, the electronic device 1400 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 1460. As shown, the network adapter 1460 communicates with the other modules of the electronic device 1400 via the bus 1430. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure may be embodied in the form of a software product, which may be stored in a non-volatile storage medium (which may be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 15, a program product 1500 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.

Claims (16)

1. A method for controlling steering of a virtual object, comprising:
determining a target steering numerical value according to the target oriented numerical value and the current oriented numerical value of the virtual object;
determining alternative turning animations in a plurality of preset turning animations according to the target turning numerical value, and determining a fusion proportion corresponding to the alternative turning animations according to the target turning numerical value;
and determining a target steering animation according to the alternative steering animation and the fusion proportion corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation.
2. The steering control method according to claim 1, wherein determining the target steering value based on the target orientation value and the current orientation value of the virtual object comprises:
acquiring the current state information of the virtual object, and judging whether the virtual object meets a steering condition according to the current state information of the virtual object;
and when the virtual object meets the steering condition, determining the target steering numerical value according to the target facing numerical value and the current facing numerical value.
3. The steering control method according to claim 2, wherein the current state information of the virtual object includes a left foot position and a right foot position of the virtual object;
judging whether the virtual object meets a steering condition according to the current state information of the virtual object, wherein the judging step comprises the following steps:
judging whether the left foot position and the right foot position are positioned in a preset plane at the same time;
and if the left foot position and the right foot position are not located on the preset plane at the same time, judging that the virtual object meets a steering condition.
4. The steering control method according to claim 2, wherein the current state information of the virtual object includes a current moving speed of the virtual object;
judging whether the virtual object meets a steering condition according to the current state information of the virtual object, wherein the judging step comprises the following steps:
judging whether the virtual object is in a static state at present according to the current motion speed of the virtual object;
and if the virtual object is in the static state at present, judging that the virtual object meets a steering condition.
5. The steering control method according to claim 2, characterized in that before acquiring the current motion information of the virtual object, the method further comprises:
receiving a turning request aiming at the virtual object, and acquiring a target oriented numerical value of the virtual object according to the turning request.
6. The steering control method according to claim 1, wherein if the virtual object is currently in a steering state, the steering state corresponds to a current steering animation;
controlling the steering of the virtual object according to the target steering animation, comprising:
when a target turning value in the target turning values is larger than or equal to a turning threshold value, determining a remaining time length according to the total turning time length of the virtual object and the played time length of the current turning animation;
and obtaining a residual turning animation in the target turning animation according to the residual duration, and controlling the turning of the virtual object according to the current turning animation and the residual turning animation.
7. The steering control method according to claim 6, characterized in that a preset time period is less than or equal to the remaining time period;
controlling the steering of the virtual object according to the current steering animation and the remaining steering animation, comprising:
obtaining the turning animation with the preset duration from the current turning animation as a first interpolation turning animation, and obtaining the turning animation with the preset duration from the remaining turning animation as a second interpolation turning animation;
and carrying out interpolation operation according to the first interpolation turning animation and the second interpolation turning animation to obtain a target interpolation turning animation, and controlling the turning of the virtual object according to the target interpolation turning animation and the remaining turning animation.
8. The steering control method according to claim 1, wherein if the virtual object is currently in a steering state, the steering state corresponds to a current steering animation, and the current steering animation corresponds to a current steering value;
determining a target steering value according to the target orientation value and the current orientation value of the virtual object, comprising:
determining an updated steering value according to the target oriented value and the current oriented value;
and carrying out interpolation operation according to the current steering value and the updated steering value so as to determine the target steering value.
9. The steering control method according to claim 1, wherein each of the predetermined steering animations corresponds to a predetermined steering value, and the target steering value comprises a target steering value;
determining an alternative turning animation in a plurality of preset turning animations according to the target turning numerical value, wherein the alternative turning animation comprises:
matching the target steering numerical value with each preset steering numerical value respectively;
if a preset steering numerical value matched with the target steering numerical value exists in the preset steering numerical values, configuring a preset steering animation corresponding to the preset steering numerical value matched with the target steering numerical value as the alternative steering animation;
and if the preset steering numerical values matched with the target steering numerical value do not exist in the plurality of preset steering numerical values, determining the alternative steering animation according to the target steering numerical value and each preset steering numerical value.
10. The steering control method according to claim 8, wherein determining the alternative steering animation according to the target steering value and each of the preset steering values comprises:
and calculating a numerical interval between the target steering numerical value and each preset steering numerical value, and determining the alternative steering animation according to the size of the numerical interval.
11. The steering control method according to claim 1, wherein determining a fusion ratio corresponding to the alternative steering animation according to the target steering numerical value includes:
and determining the fusion proportion corresponding to the alternative turning animation according to the target turning numerical value and the turning numerical value of the alternative turning animation.
12. The steering control method according to claim 1, wherein determining a target steering animation from the alternative steering animation and a fusion ratio corresponding to the alternative steering animation includes:
multiplying the steering output data of the alternative steering animation by the fusion proportion of the alternative steering animation to obtain fusion steering output data;
and generating the target steering animation according to the fusion steering output data.
13. The steering control method according to claim 1, wherein the preset steering animations each include a plurality of animation frames, each animation frame corresponds to a steering output data, the steering output data includes a part identifier of the virtual object, trend data corresponding to the part identifier, and angle data corresponding to the trend data, target part identifiers of the plurality of preset steering animations in a same animation frame and target trend data corresponding to the target part identifiers are the same, and target angle data corresponding to the target trend data are different.
14. A steering control device for a virtual object, comprising:
the target steering obtaining module is used for determining a target steering numerical value according to the target oriented numerical value and the current oriented numerical value of the virtual object;
the fusion proportion determining module is used for determining alternative steering animations in a plurality of preset steering animations according to the target steering numerical value and determining fusion proportions corresponding to the alternative steering animations according to the target steering numerical value;
and the object steering control module is used for determining a target steering animation according to the alternative steering animation and the fusion proportion corresponding to the alternative steering animation, and controlling the steering of the virtual object according to the target steering animation.
15. A computer-readable storage medium on which a computer program is stored, the program, when executed by a processor, implementing a steering control method for a virtual object according to any one of claims 1 to 13.
16. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a steering control method of a virtual object according to any one of claims 1 to 13.
CN202110507354.5A 2021-05-10 2021-05-10 Virtual object steering control method and device, storage medium and electronic equipment Pending CN113198179A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110507354.5A CN113198179A (en) 2021-05-10 2021-05-10 Virtual object steering control method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110507354.5A CN113198179A (en) 2021-05-10 2021-05-10 Virtual object steering control method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113198179A true CN113198179A (en) 2021-08-03

Family

ID=77030649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110507354.5A Pending CN113198179A (en) 2021-05-10 2021-05-10 Virtual object steering control method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113198179A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115797513A (en) * 2023-02-01 2023-03-14 腾讯科技(深圳)有限公司 Animation processing method, device, equipment, storage medium and program product
WO2023077926A1 (en) * 2021-11-05 2023-05-11 腾讯科技(深圳)有限公司 Virtual-character control method and apparatus, and storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007054656A (en) * 1997-02-18 2007-03-08 Sega Corp Image processor and image processing method
JP2012210477A (en) * 2012-07-24 2012-11-01 Nintendo Co Ltd Game device and game program
CN103733613A (en) * 2011-07-26 2014-04-16 爱信精机株式会社 Vehicle surroundings monitoring system
JP2014208298A (en) * 2014-07-11 2014-11-06 株式会社バンダイナムコゲームス Program and game system
CN110215685A (en) * 2019-06-21 2019-09-10 网易(杭州)网络有限公司 Virtual object control method and device in game, equipment, storage medium
WO2020114154A1 (en) * 2018-12-05 2020-06-11 腾讯科技(深圳)有限公司 Animation control method and device, storage medium, and electronic device
CN111659120A (en) * 2020-07-16 2020-09-15 网易(杭州)网络有限公司 Virtual role position synchronization method, device, medium and electronic equipment
CN111744195A (en) * 2020-06-11 2020-10-09 北京冰封互娱科技有限公司 Model control method and apparatus, storage medium, and electronic apparatus

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007054656A (en) * 1997-02-18 2007-03-08 Sega Corp Image processor and image processing method
CN103733613A (en) * 2011-07-26 2014-04-16 爱信精机株式会社 Vehicle surroundings monitoring system
JP2012210477A (en) * 2012-07-24 2012-11-01 Nintendo Co Ltd Game device and game program
JP2014208298A (en) * 2014-07-11 2014-11-06 株式会社バンダイナムコゲームス Program and game system
WO2020114154A1 (en) * 2018-12-05 2020-06-11 腾讯科技(深圳)有限公司 Animation control method and device, storage medium, and electronic device
CN110215685A (en) * 2019-06-21 2019-09-10 网易(杭州)网络有限公司 Virtual object control method and device in game, equipment, storage medium
CN111744195A (en) * 2020-06-11 2020-10-09 北京冰封互娱科技有限公司 Model control method and apparatus, storage medium, and electronic apparatus
CN111659120A (en) * 2020-07-16 2020-09-15 网易(杭州)网络有限公司 Virtual role position synchronization method, device, medium and electronic equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023077926A1 (en) * 2021-11-05 2023-05-11 腾讯科技(深圳)有限公司 Virtual-character control method and apparatus, and storage medium and electronic device
CN115797513A (en) * 2023-02-01 2023-03-14 腾讯科技(深圳)有限公司 Animation processing method, device, equipment, storage medium and program product
CN115797513B (en) * 2023-02-01 2023-05-09 腾讯科技(深圳)有限公司 Animation processing method, device, equipment, storage medium and program product

Similar Documents

Publication Publication Date Title
US9965253B2 (en) Methods and systems for generation and execution of miniapp of computer application served by cloud computing system
EP2750032B1 (en) Methods and systems for generation and execution of miniapp of computer application served by cloud computing system
US10850196B2 (en) Terminal device
US9424052B2 (en) Remotely emulating computing devices
US9707485B2 (en) Systems and methods for cloud processing and overlaying of content on streaming video frames of remotely processed applications
EP2919874B1 (en) Systems and methods for cloud processing and overlaying of content on streaming video frames of remotely processed applications
CN113198179A (en) Virtual object steering control method and device, storage medium and electronic equipment
US20220212102A1 (en) Method and apparatus for controlling cursor control, and related device
CN112516589A (en) Game commodity interaction method and device in live broadcast, computer equipment and storage medium
CN111481923B (en) Rocker display method and device, computer storage medium and electronic equipment
CN111760272B (en) Game information display method and device, computer storage medium and electronic equipment
CN111467791A (en) Target object control method, device and system
CN106984044B (en) Method and equipment for starting preset process
CN112169327A (en) Control method of cloud game and related device
CN114449162B (en) Method, device, computer equipment and storage medium for playing panoramic video
WO2022022729A1 (en) Rendering control method, device and system
CN112245908A (en) Method and device for controlling game virtual character, storage medium and electronic equipment
CN110152292B (en) Display control method and device for jumping characters in game, storage medium and electronic equipment
CN112473138B (en) Game display control method and device, readable storage medium and electronic equipment
CN110743161A (en) Virtual object control method, device, terminal and storage medium
CN114028814A (en) Virtual building upgrading method and device, computer storage medium and electronic equipment
CN110665218A (en) Game interaction method, game interaction device, storage medium and display equipment
CN117008713A (en) Augmented reality display method and device and computer readable storage medium
CN115430149A (en) Virtual football control method, virtual football control device, storage medium and equipment
CN116832446A (en) Virtual character control method and device and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination