Pose control method and device of virtual object and computer storage medium

文档序号:623982 发布日期:2021-05-11 浏览:11次 中文

阅读说明:本技术 一种虚拟对象的位姿控制方法、装置以及计算机存储介质 (Pose control method and device of virtual object and computer storage medium ) 是由 祝峰 于 2021-01-22 设计创作,主要内容包括:本公开提供了一种虚拟对象的位姿控制方法、装置以及计算机存储介质,其中,该方法包括:响应拾取目标虚拟物品的触发操作,获取所述目标虚拟物品的第一位姿信息;根据所述第一位姿信息确定所述目标虚拟物品的目标标准姿态;基于所述目标虚拟物品的第一位姿信息和所述目标标准姿态对应的第二位姿信息、以及目标虚拟角色执行拾取动作的目标部位的移动轨迹信息,展示所述目标虚拟物品变化到目标标准姿态、并被所述目标虚拟角色拾取的动画特效。本公开实施例中可以将处于任意姿态下的虚拟物品,调整到与目标虚拟角色的拾取动作适配的标准姿态,使用户可以控制目标虚拟角色拾取交互场景中处于任意姿态下的虚拟物品,增强虚拟对象拾取过程的真实体验。(The present disclosure provides a method, an apparatus, and a computer storage medium for controlling a pose of a virtual object, wherein the method includes: responding to a trigger operation for picking up a target virtual article, and acquiring first position and orientation information of the target virtual article; determining a target standard posture of the target virtual article according to the first posture information; and displaying the animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the moving track information of the target part of the target virtual character executing the picking-up action. In the embodiment of the disclosure, the virtual object in any posture can be adjusted to the standard posture adapted to the picking action of the target virtual character, so that the user can control the target virtual character to pick the virtual object in any posture in the interactive scene, and the real experience of the virtual object picking process is enhanced.)

1. A pose control method of a virtual object, comprising:

responding to a trigger operation for picking up a target virtual article, and acquiring first position and orientation information of the target virtual article;

determining a target standard posture of the target virtual article according to the first posture information;

and displaying the animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the moving track information of the target part of the target virtual character executing the picking-up action.

2. The method of claim 1, wherein said determining a target standard pose of the target virtual item from the first pose information comprises:

determining a candidate standard posture matched with the picking action of the target virtual character from a plurality of standard postures corresponding to the target virtual article configured in advance;

respectively calculating the change angles of the target virtual article from the current posture to the candidate standard posture;

and selecting the candidate standard posture with the minimum change angle as the target standard posture.

3. The method of claim 2, wherein the standard pose is preconfigured according to the following:

configuring a standard gesture matched with each picking action according to at least one picking action of the target virtual character; or configuring a plurality of standard postures according to the shape of the target virtual article; wherein the standard gesture has corresponding second gesture information.

4. The method of claim 3, wherein determining a candidate standard pose matching the pick-up action of the target virtual character from a plurality of standard poses corresponding to the pre-configured target virtual item comprises:

and according to the attitude information of the target part when the target virtual character executes the picking action, determining the candidate standard attitude matched with the attitude information of the target part from a plurality of standard attitudes corresponding to the target virtual object configured in advance.

5. The method of claim 1, wherein the pose information includes pose information and position information, the animated special effect being exhibited according to the steps of:

displaying a rotation animation special effect that the target virtual article rotates from the current posture to the target standard posture according to the posture information of the target virtual article and the target standard posture; and the number of the first and second groups,

and displaying a moving animation special effect of the target virtual article moving along with the target part according to the position information of the target virtual article and the moving track information of the target part of the target virtual character in the process of executing the picking action.

6. The method of claim 5, wherein presenting a rotation animated special effect that the target virtual item rotates from a current pose to a target standard pose and a movement animated special effect that the target virtual item moves following the target location comprises:

and synchronously displaying the rotary animation special effect and the moving animation special effect of the target virtual article.

7. The method according to any one of claims 1 to 6, wherein the step of displaying the animated special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character comprises the following steps:

responding to the first-stage action of the target virtual character for finishing the bending action, synchronously displaying the second-stage action of the target virtual character for finishing the bending action and the process of the target part for executing the picking action, and the animation special effect of the target virtual article which rotates from the current posture to the target standard posture and is picked by the target virtual character.

8. The method of claim 1, wherein obtaining first pose information for a target virtual item in response to a triggering operation to pick the target virtual item comprises:

responding to a trigger operation aiming at a pickup button in a current interactive interface, and acquiring first absolute pose information of the target virtual object under a scene map coordinate system and second absolute pose information of the target virtual character under the scene map coordinate system, wherein the first absolute pose information corresponds to the trigger operation;

and determining the relative pose information of the target virtual object relative to the target virtual character according to the first absolute pose information and the second absolute pose information, and taking the relative pose information as the first pose information of the target virtual object.

9. A pose control apparatus of a virtual object, characterized by comprising:

the response module is used for responding to the trigger operation of picking up the target virtual article and acquiring first attitude information of the target virtual article;

the determining module is used for determining a target standard posture of the target virtual article according to the first posture information;

and the display module is used for displaying the animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the movement track information of the target part of the target virtual character executing the picking-up action.

10. A computer device, comprising: a processor, a memory storing machine readable instructions executable by the processor, the processor for executing the machine readable instructions stored in the memory, the machine readable instructions when executed by the processor, the processor performing the steps of the pose control method of a virtual object according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when executed by a computer apparatus, executes the steps of the pose control method of a virtual object according to any one of claims 1 to 8.

Technical Field

The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for controlling a pose of a virtual object, and a computer storage medium.

Background

With the development of computer technology, various interactive applications, such as game applications, are gradually developed to meet the use requirements of users. The pick action of the virtual character is generally set in the game application so that the player can control the virtual character to pick up the virtual item in the interactive scene.

However, the extending length and the bending angle of the arm of the generally set virtual character for the picking action are fixed, and when the virtual object to be picked by the virtual character is not suitable for the picking action, the virtual character cannot pick the virtual object.

Disclosure of Invention

The embodiment of the disclosure at least provides a method and a device for controlling the pose of a virtual object and a computer storage medium.

In a first aspect, an embodiment of the present disclosure provides a method for controlling a pose of a virtual object, including:

responding to a trigger operation for picking up a target virtual article, and acquiring first position and orientation information of the target virtual article;

determining a target standard posture of the target virtual article according to the first posture information;

and displaying the animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the moving track information of the target part of the target virtual character executing the picking-up action.

In one possible implementation, the determining the target standard pose of the target virtual item according to the first pose information comprises:

determining a candidate standard posture matched with the picking action of the target virtual character from a plurality of standard postures corresponding to the target virtual article configured in advance;

respectively calculating the change angles of the target virtual article from the current posture to the candidate standard posture;

and selecting the candidate standard posture with the minimum change angle as the target standard posture.

In one possible embodiment, the standard pose is preconfigured according to the following:

configuring a standard gesture matched with each picking action according to at least one picking action of the target virtual character; or configuring a plurality of standard postures according to the shape of the target virtual article; wherein the standard gesture has corresponding second gesture information.

In one possible embodiment, determining a candidate standard gesture matching the picking action of the target virtual character from a plurality of standard gestures corresponding to the target virtual item configured in advance comprises:

and according to the attitude information of the target part when the target virtual character executes the picking action, determining the candidate standard attitude matched with the attitude information of the target part from a plurality of standard attitudes corresponding to the target virtual object which are configured in advance.

In one possible implementation, the pose information includes pose information and position information, and the animated special effect is exhibited according to the following steps:

displaying a rotation animation special effect that the target virtual article rotates from the current posture to the target standard posture according to the posture information of the target virtual article and the target standard posture; and the number of the first and second groups,

and displaying a moving animation special effect of the target virtual article moving along with the target part according to the position information of the target virtual article and the moving track information of the target part of the target virtual character in the process of executing the picking action.

In one possible implementation, displaying a rotation animation special effect that the target virtual article rotates from the current posture to the target standard posture and a movement animation special effect that the target virtual article moves along with the target part comprises:

and synchronously displaying the rotary animation special effect and the moving animation special effect of the target virtual article.

In one possible embodiment, presenting an animated special effect of the target virtual item changing to a target standard pose and being picked up by the target virtual character comprises:

responding to the first-stage action of the target virtual character for finishing the bending action, synchronously displaying the second-stage action of the target virtual character for finishing the bending action and the process of the target part for executing the picking action, and the animation special effect of the target virtual article which rotates from the current posture to the target standard posture and is picked by the target virtual character.

In one possible implementation, the acquiring the first attitude information of the target virtual item in response to the triggering operation of picking up the target virtual item includes:

responding to a trigger operation aiming at a pickup button in a current interactive interface, and acquiring first absolute pose information of the target virtual object under a scene map coordinate system and second absolute pose information of the target virtual character under the scene map coordinate system, wherein the first absolute pose information corresponds to the trigger operation;

and determining the relative pose information of the target virtual object relative to the target virtual character according to the first absolute pose information and the second absolute pose information, and taking the relative pose information as the first pose information of the target virtual object.

In a second aspect, an embodiment of the present disclosure further provides a pose control apparatus for a virtual object, including:

the response module is used for responding to the trigger operation of picking up the target virtual article and acquiring first attitude information of the target virtual article;

the determining module is used for determining a target standard posture of the target virtual article according to the first posture information;

and the display module is used for displaying the animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the movement track information of the target part of the target virtual character executing the picking-up action.

In a possible implementation manner, the determining module is specifically configured to determine, from a plurality of standard poses corresponding to the target virtual article configured in advance, a candidate standard pose matching the picking action of the target virtual character; respectively calculating the change angles of the target virtual article from the current posture to the candidate standard posture; and selecting the candidate standard posture with the minimum change angle as the target standard posture.

In a possible embodiment, the apparatus further comprises:

the configuration module is used for configuring a standard gesture matched with each picking action according to at least one picking action of the target virtual character; or configuring a plurality of standard postures according to the shape of the target virtual article; wherein the standard gesture has corresponding second gesture information.

In a possible implementation manner, the determining module is specifically configured to determine, according to pose information of the target portion when the target virtual character performs the pickup action, the candidate standard pose matching the pose information of the target portion from a plurality of standard poses corresponding to the target virtual article configured in advance.

In a possible implementation manner, the pose information includes pose information and position information, and the display module is specifically configured to display a rotation animation special effect that the target virtual object rotates from a current pose to a target standard pose according to the pose information of the target virtual object and the target standard pose; and displaying a moving animation special effect that the target virtual article moves along with the target part according to the position information of the target virtual article and the moving track information of the target part of the target virtual character in the process of executing the picking action.

In a possible implementation manner, the display module is specifically configured to simultaneously display the rotation animated special effect and the movement animated special effect of the target virtual article.

In a possible implementation manner, the display module is specifically configured to synchronously display, in response to the target virtual character executing a first-stage action of completing a stooping action, a second-stage action of executing the stooping action by the target virtual character and a process of executing a pickup action by the target part, and an animated special effect of the target virtual article rotating from a current posture to a target standard posture and being picked up by the target virtual character.

In a possible implementation manner, the response module is specifically configured to respond to a trigger operation for a pickup button in a current interactive interface, and acquire first absolute pose information of the target virtual object in a scene map coordinate system, which corresponds to the trigger operation, and second absolute pose information of the target virtual character in the scene map coordinate system; and determining the relative pose information of the target virtual object relative to the target virtual character according to the first absolute pose information and the second absolute pose information, and taking the relative pose information as the first pose information of the target virtual object.

In a third aspect, this disclosure also provides a computer device, a processor, and a memory, where the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the machine-readable instructions are executed by the processor to perform the steps in the first aspect or any one of the possible implementations of the first aspect.

In a fourth aspect, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, where the computer program is executed to perform the steps in the first aspect or any one of the possible implementation manners of the first aspect.

The method, the device and the computer storage medium for controlling the pose of the virtual object provided by the embodiment of the disclosure respond to the pickup trigger operation aiming at the target virtual object, acquire the first pose information of the target virtual object, and then determine the target standard pose of the target virtual object according to the first pose information; then, displaying an animation special effect that the target virtual article changes from the current pose to the target standard pose and is picked up by the target virtual character based on the first pose information of the target virtual article, the second pose information corresponding to the target standard pose and the moving track information of the target part of the target virtual character executing the picking-up action; in the embodiment of the disclosure, the virtual article in any posture can be adjusted to the standard posture adapted to the picking action of the target virtual character, so that the user can control the target virtual character to pick up the virtual article in any posture in the interactive scene, and the posture adjustment process and the whole picking process of the virtual article are displayed to the user, so that the user can clearly know the whole process of the virtual character to pick up the virtual article, and the real experience of the virtual article picking process is enhanced.

For the description of the effects of the above-described attitude control device of a virtual object, the computer apparatus, and the computer-readable storage medium, reference is made to the description of the above-described attitude control method of a virtual object, which is not described herein again.

In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.

Fig. 1 shows a flowchart of a pose control method for a virtual object according to an embodiment of the present disclosure;

fig. 2 is a schematic diagram illustrating a plurality of standard poses corresponding to a target virtual object in the pose control method for a virtual object provided by the embodiment of the present disclosure;

fig. 3 is a schematic diagram illustrating a presentation interface of a current interaction interface in the pose control method for a virtual object provided by the embodiment of the present disclosure;

fig. 4 is a schematic diagram illustrating a display screen of a first stage action of a stooping action in the pose control method for a virtual object provided by the embodiment of the disclosure;

fig. 5 is a schematic diagram illustrating a display screen of a second stage action of a stooping action in the pose control method for a virtual object provided by the embodiment of the disclosure;

fig. 6 is a schematic diagram illustrating a display interface of a rotary animated special effect of a target virtual article in the pose control method for a virtual object provided by the embodiment of the disclosure;

fig. 7 is a schematic diagram illustrating a display interface of a moving animated special effect of a target virtual article in a pose control method of a virtual object provided by an embodiment of the present disclosure;

fig. 8 is a schematic diagram illustrating a pose control apparatus for a virtual object according to an embodiment of the present disclosure;

fig. 9 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure.

Detailed Description

In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of embodiments of the present disclosure, as generally described and illustrated herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.

The pick action of the virtual character is generally set in the game application so that the player can control the virtual character to pick up the virtual item in the interactive scene. However, the set length of the arm extending out corresponding to the picking action and the bending angle of the virtual character are fixed, and when the virtual object to be picked by the virtual character is not suitable for the picking action, the player cannot control the virtual character to pick the virtual object.

Based on the research, the present disclosure provides a method, an apparatus, and a computer storage medium for controlling a pose of a virtual object, which may adjust a virtual object in any pose to a standard pose adapted to a pickup action of a target virtual character, so that a user may control the target virtual character to pick up the virtual object in any pose in an interactive scene, and display a pose adjustment process of the virtual object and a whole pickup process to the user, so that the user may clearly know the whole process of the virtual character picking up the virtual object, and a real experience of the virtual object pickup process is enhanced.

The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.

It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.

To facilitate understanding of the present embodiment, first, a detailed description is given of a pose control method for a virtual object disclosed in an embodiment of the present disclosure, where an execution subject of the pose control method for a virtual object provided in an embodiment of the present disclosure is generally a computer device with certain computing power, and the computer device includes, for example: a terminal device, which may be a User Equipment (UE), a mobile device, a User terminal, a cellular phone, a cordless phone, a Personal Digital Assistant (PDA), a handheld device, a computing device, a vehicle mounted device, a wearable device, or a server or other processing device. In some possible implementations, the pose control method of the virtual object may be implemented by a processor invoking computer readable instructions stored in a memory.

The following describes a pose control method of a virtual object according to an embodiment of the present disclosure, taking an execution subject as a terminal device as an example.

In some interactive applications, there may be a game process in which a player controls a virtual character to pick up or carry a virtual item in an interactive scene, and in order to enhance the real experience of the virtual item picking up process and make a display picture when the virtual item is picked up more conform to the process in which the item is picked up in a real scene, the embodiment of the present disclosure provides a method for controlling a pose of a virtual object as described in steps S101 to S103, which is described in detail as follows.

Referring to fig. 1, a flowchart of a pose control method for a virtual object according to an embodiment of the present disclosure is shown, where the method includes steps S101 to S103, where:

s101, responding to a trigger operation of picking up a target virtual article, and acquiring first attitude information of the target virtual article.

The target virtual object is used for representing a virtual object to be picked up by a user in the current interactive interface, and may include any virtual object in the current interactive interface, for example, at least one of multiple objects such as stones, boxes, branches, wood, and the like in the current interactive interface.

Here, the current interactive interface may be a scene interface in the interactive application; for example, when the interactive application is a game application, the current interactive interface is a game scene interface.

The first posture information may include current position information and current posture information of the target virtual article, where the current posture information may be current orientation information of the target virtual article, or may be angle information of the target virtual article with respect to the interactive interface.

In specific implementation, after a user triggers a pickup button in a current interactive interface, a terminal device responds to a trigger operation aiming at the pickup button in the current interactive interface and acquires first absolute pose information of a target virtual object to be picked up by the user in a scene map coordinate system and second absolute pose information of a target virtual character in the scene map coordinate system in the current interactive interface; and determining the relative pose information of the target virtual object relative to the target virtual character according to the first absolute pose information and the second absolute pose information, and taking the relative pose information as the first pose information of the target virtual object.

Here, the first absolute pose information of the target virtual article in the scene map coordinate system may include: current position information and current posture information of the target virtual article under a current interactive scene map coordinate system; the second absolute pose information of the target virtual character in the scene map coordinate system may include: current position information and current posture information of the target virtual character under a current interactive scene map coordinate system; wherein the current interaction scenario may comprise a game scenario.

Here, the relative pose information of the target virtual item with respect to the target virtual character is used to represent the position information and the pose information of the target virtual item with respect to the target virtual character.

In the embodiment of the present disclosure, after the position information and the posture information of the target virtual object in the current interaction scene coordinate system and the position information and the posture information of the target virtual character in the current interaction scene coordinate system are obtained, based on the pre-stored relative transformation relationship between the interaction scene coordinate system and the virtual object coordinate system and the virtual character coordinate system, changing the position information and the posture information of the target virtual article in the interactive scene coordinate system to the target virtual character coordinate system through the change of the coordinate system, determining the position information and the posture information of the target virtual article in the target virtual character coordinate system (namely determining the relative posture information of the target virtual article relative to the target virtual character), and taking the determined position information and the determined posture information of the target virtual article in the target virtual character coordinate system as the first posture information of the target virtual article.

In a specific implementation, after the relative pose information of the target virtual article with respect to the target virtual character is acquired in step S101, a target standard pose matching the picking action may be determined according to the relative pose information and the picking action of the target virtual character when the target virtual article is picked up, and the following step S102 is described in detail.

S102, determining a target standard posture of the target virtual article according to the first posture information.

The target standard posture is used for representing the orientation adaptive to the picking action of the target virtual character, the target standard posture comprises the relative posture of the target virtual object under the coordinate system of the target virtual character, and the relative posture is related to the orientation of the target virtual character when the target virtual character is picked; here, the target standard posture has corresponding second posture information, and the detailed description about the second posture information refers to the description of the second posture information in step S103 described below.

In a specific implementation, at least one standard posture corresponding to each virtual item in the interactive scene when being picked up is preconfigured, and a standard posture adapted to the picking action of the target virtual character may be generally preconfigured according to the following method, which is specifically described as follows: configuring a standard gesture matched with each picking action according to at least one picking action of the target virtual character; or, a plurality of standard postures are configured according to the shape of the target virtual object.

Wherein the standard gesture has corresponding second gesture information; here, the standard posture is used to represent a standard orientation that the target virtual item adapts to the picking motion of the target virtual character when being picked up; the second pose information includes standard pose information, and position information of the target virtual item at the standard pose.

Specifically, the standard posture of the target virtual item may be determined according to the standard action corresponding to the picked target virtual item: when the target virtual character can pick up the target virtual item through multiple picking actions, that is, the target virtual item corresponds to multiple picking actions, the corresponding standard postures are configured for the various picking actions, that is, the multiple standard postures are configured for the target virtual item, for example, the target virtual character can pick up the target virtual item through three picking actions: the picking motion 1, the picking motion 2 and the picking motion 3 pick the target virtual article, and the standard postures corresponding to the target virtual article comprise a standard posture matched with the picking motion 1, a standard posture matched with the picking motion 2 and a standard posture matched with the picking motion 3.

Specifically, at least one standard posture can be configured for the target virtual article according to the shape of the target virtual article; for example, when the target virtual article is a rectangular parallelepiped box, since the rectangular parallelepiped box has six surfaces, i.e., an upper surface, a lower surface, a front surface, a back surface, a left side surface and a right side surface, a standard posture corresponding to each surface is configured for the rectangular parallelepiped box, the rectangular parallelepiped box has 6 standard postures, and a schematic diagram of the 6 standard postures of the specific rectangular parallelepiped box may be as shown in fig. 2, including a standard posture 2a with the upper surface facing downward, a standard posture 2b with the lower surface facing downward, a standard posture 2c with the front surface facing downward, a standard posture 2d with the back surface facing downward, a standard posture 2e with the left side surface facing downward, and a standard posture 2f with the right side surface facing downward.

Here, at least one standard gesture corresponding to each virtual object in the configured interactive scene is generally stored.

In a specific implementation, after determining the first pose information of the target virtual object based on the step S101, a candidate standard pose matching the picking motion of the target virtual character when the target virtual object is picked up by the target virtual character may be determined from at least one standard pose corresponding to each virtual object configured and stored in advance; and respectively calculating the change angle of the target virtual article from the current posture to the candidate standard posture, and selecting the candidate standard posture with the minimum change angle as the target standard posture of the target virtual article.

The change angle refers to an angle of the target virtual article changing from the current posture to the standard posture; here, the change may include a rotational change, and thus, the change angle may include a rotational angle.

Specifically, after determining the current position information and the current posture information of the target virtual article, a candidate standard posture matched with the posture information of the target part can be determined from at least one standard posture corresponding to the target virtual article which is configured and stored in advance according to the posture information of the target part when the target virtual character executes the picking action; then, an included angle between the current orientation information of the target virtual article in the virtual character coordinate system and the candidate standard orientation of the target virtual article in the virtual character coordinate system is calculated (i.e., a change angle of the target virtual article from the current posture to the candidate standard posture is calculated), and the target candidate standard posture (orientation) with the smallest included angle (i.e., the change angle) is taken as the target standard posture (orientation) of the target virtual article.

Wherein the target site may include a hand of the target virtual character; here, the pose information of the target portion may include relative pose information between the two hands, that is, may include relative distance information, relative orientation information, and relative orientation information between the two hands; here, hand posture information of a pickup action performed by a target virtual character corresponding to each type of virtual item at the time of pickup is generally stored in advance, that is, a relative distance, a relative orientation, and a relative orientation between hands of the target virtual character when virtual items of each shape are picked up in different placing situations are generally stored in advance; for example, the picking motion corresponding to a cuboid-shaped virtual article placed on the ground with the front surface facing downward is: the two hands are parallel, and the distance between the two hands is equal to the length of the cuboid; for another example, the picking motion corresponding to a virtual article in the shape of a rectangular parallelepiped placed on the ground with the left side facing down is: the two hands are parallel, and the distance between the two hands is equal to the width of the cuboid; for another example, the picking motion corresponding to a conical virtual article placed on the ground with the bottom surface of the cone facing downward is: the two hands are in a semicircular state, and the radius of a circle formed by the two hands is smaller than that of the bottom surface.

For example, if the display interface of the current interactive interface is as shown in fig. 3 (taking the terminal device as a mobile phone as an example), the current interactive interface includes: a target virtual character, a cuboid box (target virtual article) with an included angle of 30 degrees with the ground, and a pickup button; after the user triggers the pick-up button in the current interactive interface, the terminal device responds to the trigger operation for the pick-up button in the current interactive interface, and acquires the first posture information of a target virtual object (here, the target virtual object is a cube box) to be picked up by the user in the current interactive interface, and after acquiring the first posture information of the cube box, the terminal device can, according to the posture information of the target virtual character when picking up the cube box shown in fig. 3: the two hands are parallel, the distance between the two hands can be equal to the side length of a cube, and 6 pre-configured standard postures corresponding to the cube box are determined from at least one pre-configured and stored standard posture corresponding to the cube box; then, calculating included angles between the current orientation of the cube box under the target virtual character coordinates and the 6 standard orientations corresponding to the determined cube box, and selecting the standard posture with the minimum included angle from the 6 preset standard postures corresponding to the cube box (namely, the standard orientation with the minimum change angle when the cube box changes from the current orientation under the target virtual character coordinates to the 6 standard orientations corresponding to the determined cube box): the standard posture 2b with the lower surface facing downward is used as the target standard posture of the target virtual object.

In a specific implementation, after determining the first pose information of the target virtual object based on the step S101 and determining the target standard pose of the target virtual object based on the step S102, an animation effect of the target virtual character picking up the target virtual object may be generated according to the first pose information of the target virtual object, the second pose information corresponding to the target standard pose, and the moving track of the hand when the target virtual character performs the picking up action, and the specific description is shown in the following step S103.

S103, displaying an animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the moving track information of the target part of the target virtual character executing the picking-up action.

The pose information comprises position information and posture information of the target virtual article under a target virtual character coordinate system; here, the posture information is orientation information.

Here, since the target virtual article has a corresponding standard position in each standard posture; therefore, the position information of the target virtual article under each standard posture can be stored in advance, namely, the standard position information can be correspondingly stored while the standard posture information of the target virtual article is stored; therefore, the standard position of the target virtual object in the standard posture can be determined according to the standard posture of the target virtual object, that is, the standard posture information of the target virtual object in the target virtual character coordinate system can be determined according to the standard posture of the target virtual object.

Here, the second pose information corresponding to the target standard pose is used to represent target standard pose information of the target virtual object in the target standard pose, and may include target standard pose information and target standard position information in a target virtual character coordinate system.

In a specific implementation, a rotation animation special effect that the target virtual article rotates from the current posture to the target standard posture can be generated based on the current posture information in the acquired first posture information of the target virtual article and the target standard posture (here, the target virtual article is adjusted from the first position in the first posture information to the target standard position in the second posture information corresponding to the target standard posture while the target virtual article is rotated from the current posture to the target standard posture); and generating a moving animation special effect that the target virtual article moves along with the hand of the target virtual character by the standard position information in the second attitude information when the target virtual article is picked up according to the current position information in the first attitude information of the target virtual article, the standard position information in the second attitude information corresponding to the target standard attitude and the moving track information of the hand of the target virtual character in the process of executing the picking-up action, and synchronously displaying the rotating animation special effect and the moving animation special effect of the target virtual article.

Here, the rotation animation effect includes not only the posture change animation effect in which the target virtual item is rotated from the current posture to the target standard posture, but also the position change animation effect (i.e., the shift animation effect) adjusted from the current position in the first posture information to the target standard position in the second posture information that matches the posture information of the hand of the target virtual character at the time of the pick-up action.

Here, the movement trajectory information of the hand of the target virtual character during the pick-up action may be preset according to the type of the virtual item to be picked up; for example, when the picked-up object is a virtual object with a large volume and a large weight, such as a stone, the movement track information of the picked-up stone is set to include the whole process track of picking up the stone from the ground and carrying the stone on the shoulder of the target virtual character; for another example, when the picked-up article is a box with a regular shape, the movement trajectory information of the picked-up box is set to include the entire process trajectory for moving the box from the ground to the waist position of the target virtual character.

Specifically, after a user triggers a pick-up button of the current interactive interface, the target virtual character executes a first-stage action of a stooping action, and when the target virtual character executes the first-stage action of finishing the stooping action, and executes a second-stage action of the stooping action and a hand pick-up action, a pick-up process of synchronously changing the target virtual article from a current pose in the first pose information to a target standard pose and adjusting the target virtual article from the current position to a target standard position in second pose information matched with the pose information of the hand of the target virtual character during the pick-up action and following the hand of the target virtual character is picked up is performed, wherein when the terminal device displays the second-stage action of the stooping action of the target virtual character and executes the hand pick-up action, a pose change animation special effect of synchronously displaying the target virtual article from the current pose to the target standard pose, And a shift animation special effect in which the target virtual article is adjusted from the current position to a target standard position in second posture information that matches posture information of a hand of the target virtual character at the time of the pick-up action, and a movement animation special effect in which the target virtual article follows movement of the hand of the target virtual character at the time of the pick-up action.

The first stage action of the bending action is used for representing the first half of the bending of the target virtual character, and the second stage action of the bending action is used for representing the second half of the bending of the target virtual character; here, various types of stooping motions may be generally set, and for example, the motions may include a motion in which the upper body of the target virtual character bends, the lower body does not move (that is, the angle between the upper body of the target virtual character and the ground is changed, and the lower body is still in a posture perpendicular to the ground is unchanged), and motions in which the upper body of the target virtual character bends, the lower body squats (that is, the angle between the upper body of the target virtual character and the ground is changed, and the angle between the leg of the lower body and the ground is also changed); here, the stooping action is exemplified by the movement of the upper body of the target virtual character bending and the lower body not moving, the front half of the stooping action of the target virtual character may include the step of gradually bending the upper body of the target virtual character from a standing upright position (that is, the target virtual character is perpendicular to the ground, and the upper body and the lower body of the target virtual character are on the same horizontal line, that is, the angle between the upper body of the target virtual character and the ground is 90 degrees, and the angle between the lower body of the target virtual character and the ground is 90 degrees) until the angle between the upper body and the ground reaches a first preset threshold (here, the first preset threshold may be calculated according to a plurality of practical results, for example, may be 45 degrees), and a display screen of the first-stage movement of a specific stooping action may be shown in fig. 4, in which a state 1 in which the angle between the upper body of the target virtual character and the ground is 30 degrees is displayed, gradually bending down to change to a state 2 with an included angle of 45 degrees between the upper half body and the ground; the step of bending the target virtual character at the second half can include that the target virtual character gradually bends the upper half body from the time when the included angle between the upper half body of the target virtual character and the ground reaches a first preset threshold value until the upper half body is parallel to the ground, namely the included angle between the upper half body of the target virtual character and the ground is 0 degree; specifically, as shown in fig. 5, a display screen of the second stage of the stooping motion may show a state 2 in which the target avatar gradually stoops from a state 2 in which the angle between the upper body and the floor is 45 degrees to a state 3 in which the angle between the upper body and the floor is 0 degrees.

Here, during the bending of the target virtual object, the target virtual character hand swings a pickup motion to touch the target virtual article, the target virtual article rotates from the current posture to the target standard posture and moves following the movement of the target virtual character hand, thereby generating a posture change animation effect in which the target virtual article rotates from the current posture to the target standard posture, a shift animation effect in which the target virtual article is adjusted from the current position to the target standard position in the second posture information matching the posture information of the target virtual character hand at the time of the pickup motion, and a movement animation effect in which the target virtual article moves following the hand of the target virtual character at the time of the pickup, that is, an animation effect at the time of the pickup of the target virtual article.

Illustratively, after the user triggers the pick-up button in the interactive interface, the target virtual character continues to perform the bending-down action after performing the first-stage action of the bending-down action (i.e. the included angle between the upper half of the target virtual character and the ground reaches a first preset threshold), the terminal device synchronously displays the posture change animation special effect of the target virtual object rotating from the current posture to the target standard posture and the shift animation of the target virtual object adjusting from the current position to the target standard position in the second posture information matched with the posture information of the hand of the target virtual character during the pick-up action when displaying the second-stage action of the target virtual character performing the bending-down action (i.e. the included angle between the upper half of the target virtual character and the ground gradually decreases from the first preset threshold to 0) and the hand performs the pick-up action (here, the posture change special effect of the target virtual object rotating from the current posture to the target standard posture, and the shift animation of the target virtual object adjusting from the, And a shift animation effect in which the target virtual item is adjusted from the current position to a target standard position in second posture information that matches posture information of a hand of the target virtual item at the time of the pickup action, as a rotation animation effect in which the target virtual item is rotated from the current posture to the target standard posture), and a movement animation effect in which the target virtual item follows movement of the hand of the target virtual item when the target virtual item is picked up; a specific display interface of the rotation animation special effect of the target virtual article is shown in fig. 6, taking a terminal device as a mobile phone as an example, the display interface includes: a target virtual character, a cuboid box (target virtual article), and a rotation change process from the current posture a of the cuboid box to the target standard posture b, wherein the target virtual article in the current posture a is represented by a dotted line cuboid box, and the target virtual article rotated to the target standard posture b is represented by a solid line cuboid box; a specific display interface of the moving animation special effect of the target virtual article is shown in fig. 7, taking a terminal device as a mobile phone as an example, the display interface includes: the target virtual character, the rectangular parallelepiped box (target virtual article), and the movement change process in which the rectangular parallelepiped box is moved from the position a to the position b following the hand of the target virtual character, and the target virtual article at the position a and the target virtual article at the position b.

In the embodiment of the disclosure, in response to a pickup trigger operation for a target virtual article, first attitude information of the target virtual article is acquired, and then a target standard attitude of the target virtual article is determined according to the first attitude information; then, displaying an animation special effect that the target virtual article changes from the current pose to the target standard pose and is picked up by the target virtual character based on the first pose information of the target virtual article, the second pose information corresponding to the target standard pose and the moving track information of the target part of the target virtual character executing the picking-up action; (ii) a In the embodiment of the disclosure, the virtual article in any posture can be adjusted to the standard posture adapted to the picking action of the target virtual character, so that the user can control the target virtual character to pick up the virtual article in any posture in the interactive scene, and the posture adjustment process and the whole picking process of the virtual article are displayed to the user, so that the user can clearly know the whole process of the virtual character to pick up the virtual article, and the real experience of the virtual article picking process is enhanced.

It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.

Based on the same inventive concept, the embodiment of the present disclosure further provides a pose control apparatus for a virtual object corresponding to the pose control method for the virtual object, and as the principle of the apparatus in the embodiment of the present disclosure for solving the problem is similar to the pose control method for the virtual object described above in the embodiment of the present disclosure, the implementation of the apparatus can refer to the implementation of the method, and repeated details are omitted.

Referring to fig. 8, there is shown a schematic diagram of a pose control apparatus 800 for a virtual object according to an embodiment of the present disclosure, the apparatus including: a response module 801, a determination module 802, and a presentation module 803; wherein the content of the first and second substances,

the response module 801 is configured to, in response to a trigger operation for picking up a target virtual item, acquire first pose information of the target virtual item.

A determining module 802, configured to determine a target standard pose of the target virtual object according to the first pose information.

A displaying module 803, configured to display an animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character, based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture, and the movement track information of the target part of the target virtual character performing the picking up action.

In a possible implementation, the determining module 802 is specifically configured to determine, from a plurality of standard poses corresponding to the target virtual article configured in advance, a candidate standard pose matching the picking action of the target virtual character; respectively calculating the change angles of the target virtual article from the current posture to the candidate standard posture; and selecting the candidate standard posture with the minimum change angle as the target standard posture.

In a possible embodiment, the apparatus further comprises:

the configuration module is used for configuring a standard gesture matched with each picking action according to at least one picking action of the target virtual character; or configuring a plurality of standard postures according to the shape of the target virtual article; wherein the standard gesture has corresponding second gesture information.

In a possible implementation manner, the determining module 802 is specifically configured to determine, according to the pose information of the target portion when the target virtual character performs the pickup action, the candidate standard pose matching the pose information of the target portion from a plurality of standard poses corresponding to the target virtual article configured in advance.

In a possible implementation manner, the pose information includes pose information and position information, and the displaying module 803 is specifically configured to display a rotation animation special effect that the target virtual object rotates from a current pose to a target standard pose according to the pose information of the target virtual object and the target standard pose; and displaying a moving animation special effect that the target virtual article moves along with the target part according to the position information of the target virtual article and the moving track information of the target part of the target virtual character in the process of executing the picking action.

In a possible implementation, the displaying module 803 is specifically configured to simultaneously display the rotation animated special effect and the movement animated special effect of the target virtual article.

In a possible implementation manner, the displaying module 803 is specifically configured to, in response to the target virtual character performing a first-stage action of completing a bending action, synchronously display a second-stage action of performing the bending action by the target virtual character and a process of performing a pickup action by the target portion, and an animated special effect of the target virtual article rotating from a current posture to a target standard posture and being picked up by the target virtual character.

In a possible implementation manner, the response module 801 is specifically configured to respond to a trigger operation for a pickup button in a current interactive interface, and acquire first absolute pose information of the target virtual object in a scene map coordinate system, which corresponds to the trigger operation, and second absolute pose information of the target virtual character in the scene map coordinate system; and determining the relative pose information of the target virtual object relative to the target virtual character according to the first absolute pose information and the second absolute pose information, and taking the relative pose information as the first pose information of the target virtual object.

In the embodiment of the disclosure, in response to a pickup trigger operation for a target virtual article, first attitude information of the target virtual article is acquired, and then a target standard attitude of the target virtual article is determined according to the first attitude information; then, displaying an animation special effect that the target virtual article changes from the current pose to the target standard pose and is picked up by the target virtual character based on the first pose information of the target virtual article, the second pose information corresponding to the target standard pose and the moving track information of the target part of the target virtual character executing the picking-up action; in the embodiment of the disclosure, the virtual article in any posture can be adjusted to the standard posture adapted to the picking action of the target virtual character, so that the user can control the target virtual character to pick up the virtual article in any posture in the interactive scene, and the posture adjustment process and the whole picking process of the virtual article are displayed to the user, so that the user can clearly know the whole process of the virtual character to pick up the virtual article, and the real experience of the virtual article picking process is enhanced.

The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.

Based on the same technical concept, the embodiment of the application also provides computer equipment. Referring to fig. 9, a schematic structural diagram of a computer device 900 provided in the embodiment of the present application includes a processor 901, a memory 902, and a bus 903. The memory 902 is used for storing execution instructions, and includes a memory 9021 and an external memory 9022; the memory 9021 is also referred to as an internal memory, and is configured to temporarily store operation data in the processor 901 and data exchanged with an external memory 9022 such as a hard disk, the processor 901 exchanges data with the external memory 9022 through the memory 9021, and when the computer device 900 is operated, the processor 901 communicates with the memory 902 through the bus 903, so that the processor 901 executes the following instructions:

responding to a trigger operation for picking up a target virtual article, and acquiring first position and orientation information of the target virtual article; determining a target standard posture of the target virtual article according to the first posture information; and displaying the animation special effect that the target virtual article changes to the target standard posture and is picked up by the target virtual character based on the first posture information of the target virtual article, the second posture information corresponding to the target standard posture and the moving track information of the target part of the target virtual character executing the picking-up action.

The specific processing flow of the processor 901 may refer to the description of the above method embodiment, and is not described herein again.

The embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, executes the steps of the method for controlling the pose of a virtual object described in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.

The embodiments of the present disclosure also provide a computer program product, where the computer program product carries a program code, where instructions included in the program code may be used to execute the steps of the method for controlling the pose of the virtual object in the foregoing method embodiments, which may be referred to specifically in the foregoing method embodiments, and are not described herein again.

The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.

The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.

Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

23页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种角色碰撞规避方法、装置、设备以及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类