Object rotation method, electronic equipment and storage medium
By introducing rotation components, including coarse precision components and fine precision components, the problem that the prior art cannot take into account remote control, coarse precision control and fine precision control, diversified rotation control of 3D virtual objects is achieved, and the user experience is improved.
Patent Information
- Application Number
- CN202311137397.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-04
- Publication Date
- 2025-03-04
AI Technical Summary
In the 3D virtual object rotation operation, the prior art cannot take into account remote control, coarse precision control and fine precision control, and cannot meet users' diverse needs for virtual object rotation.
A method of rotation of an object is provided. By introducing a rotating component, including a coarse precision component and a fine precision component, a user can switch between the fine precision component and the coarse precision component through different operation modes (such as gestures and operation of a virtual hand) to achieve a variety of rotation controls of a 3D virtual object.
This method improves users' experience of virtual object rotation, meets users' different needs for virtual object rotation, and realizes the consideration of remote control, coarse precision control and fine precision control.
Smart Images

Figure CN119559362A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of extended reality, and in particular to an object rotation method, an electronic device, and a storage medium. Background Art
[0002] Extended Reality (XR) is a technology that connects the real world and the virtual world through electronic devices. Extended Reality can include Augmented Reality (AR), Virtual Reality (VR) and Mixed Reality (MR).
[0003] In XR space, 3D virtual objects are a basic type of interactive objects. Rotation is one of the most common operations that users perform on 3D virtual objects. However, the current method of rotating 3D virtual objects is to simply apply the rotation operation method in two-dimensional space to three-dimensional space. In actual use, there are various limitations and it is impossible to take into account the user needs of remote control, coarse-precision control, and fine-precision control of rotation. Summary of the invention
[0004] The present application provides an object rotation method, an electronic device, and a storage medium, which help to enhance the user's experience of virtual object rotation and meet the user's different needs for virtual object rotation.
[0005] In a first aspect, the present application provides an object rotation method, applied to an electronic device, comprising: determining one or more target virtual objects in response to a user's selection operation; displaying a rotation component in response to a recognized wake-up gesture; and rotating the target virtual object by means of the rotation component.
[0006] The method provided in this application can enhance the user's experience of rotating virtual objects and meet the user's different needs for rotating virtual objects.
[0007] In one possible implementation, the rotation component includes a coarse-precision component and a fine-precision component, and rotating the target virtual object through the rotation component includes: in response to a first rotation operation of the user, performing a first rotation action on the target virtual object based on the fine-precision component; or, in response to a second rotation operation of the user, performing a second rotation action on the target virtual object based on the coarse-precision component.
[0008] In one possible implementation manner, performing a first rotation action on the target virtual object based on the fine-precision component includes: determining a target rotation axis based on the fine-precision component; and rotating the target virtual object to a target rotation angle through the target rotation axis.
[0009] In one possible implementation, the fine-precision component displays a dial, and the dial includes multiple preset rotation angles. The method also includes: if the target rotation angle is not any of the multiple preset rotation angles, rotating the target virtual object to the preset rotation angle closest to the target rotation angle.
[0010] In one possible implementation manner, the method further includes: during the rotation about the target rotation axis, displaying the rotated angle.
[0011] In one possible implementation, performing a first rotation action on the target virtual object based on the fine-precision component includes: determining an orbital trajectory based on the fine-precision component, wherein the orbital trajectory includes an orbital plane and an orbital radius; and causing the target virtual object to orbit around an initial position of the target virtual object on the orbital plane with the orbital radius.
[0012] In one possible implementation manner, the shape of the rotating component is a scaled-down shape of the target virtual object, or the shape of the rotating component is a preset shape.
[0013] In a second aspect, the present application provides an object rotation device, comprising one or more functional modules, wherein the one or more functional modules are used to implement the object rotation method as described in the first aspect.
[0014] In a third aspect, the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program to implement the object rotation method as described in the first aspect.
[0015] In a fourth aspect, the present application provides a readable storage medium, which stores a program. When the readable storage medium is executed on an electronic device, the electronic device implements the object rotation method as described in the first aspect.
[0016] In a fifth aspect, the present application provides a program, which, when executed on a processor of an electronic device, enables the electronic device to execute the object rotation method as described in the first aspect.
[0017] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0019] Figure 2A schematic diagram of a flow chart of an embodiment of the object rotation method provided in the present application;
[0020] Figure 3 An architectural diagram of a rotating assembly provided in an embodiment of the present application;
[0021] Figure 4 A schematic diagram of an embodiment of a rotation axis change provided by the present application;
[0022] Figure 5 A schematic diagram of the rotation angle provided in the embodiment of the present application;
[0023] Figure 6 A schematic diagram of another embodiment of the rotation axis change provided by the present application;
[0024] Figure 7 A schematic diagram of a dial provided in an embodiment of the present application;
[0025] Figure 8a A schematic diagram of an embodiment of one-handed rotation provided for the present application;
[0026] Figure 8b A schematic diagram of an embodiment of two-handed rotation provided in the present application;
[0027] Fig. 9 A schematic diagram of an embodiment of the revolution provided by the present application;
[0028] Fig.10 A schematic diagram of another embodiment of the revolution provided by the present application;
[0029] Fig.11 A schematic diagram of another embodiment of one-handed rotation provided for the present application;
[0030] Fig.12 A schematic diagram of another embodiment of two-handed rotation provided by the present application;
[0031] Fig.13 A schematic diagram of the structure of an object rotating device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] In the embodiments of the present application, unless otherwise specified, the character " / " indicates that the objects before and after the association are in an or relationship. For example, A / B can represent A or B. "And / or" describes the association relationship of the associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
[0033] It should be pointed out that the words "first", "second", etc. involved in the embodiments of the present application are only used to distinguish the description purpose, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated, nor can they be understood as indicating or implying order.
[0034] In the embodiments of the present application, "at least one" refers to one or more, and "plurality" refers to two or more. In addition, "at least one of the following" or similar expressions refers to any combination of these items, which may include any combination of single items or plural items. For example, at least one of A, B, or C may represent: A, B, C, A and B, A and C, B and C, or A, B and C. Among them, each of A, B, and C may be an element itself, or a set containing one or more elements.
[0035] In the embodiments of the present application, "exemplary", "in some embodiments", "in another embodiment", etc. are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present concepts in a concrete way.
[0036] In the embodiments of the present application, "of", "corresponding", and "corresponding" can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. In the embodiments of the present application, communication and transmission can sometimes be used interchangeably. It should be noted that when the distinction between them is not emphasized, the meanings to be expressed are consistent. For example, transmission can include sending and / or receiving, which can be a noun or a verb.
[0037] The equal to involved in the embodiments of the present application can be used in conjunction with greater than, and is applicable to the technical solution adopted when greater than, and can also be used in conjunction with less than, and is applicable to the technical solution adopted when less than. It should be noted that when equal to is used in conjunction with greater than, it cannot be used in conjunction with less than; when equal to is used in conjunction with less than, it cannot be used in conjunction with greater than.
[0038] Extended Reality (XR) is a technology that connects the real world and the virtual world through electronic devices. Extended Reality can include Augmented Reality (AR), Virtual Reality (VR) and Mixed Reality (MR).
[0039] In XR space, 3D virtual objects are a basic type of interactive objects. Rotation is one of the most common operations that users perform on 3D virtual objects. However, the current method of rotating 3D virtual objects is simply to apply the rotation operation method in two-dimensional space to three-dimensional space. In actual use, there are various limitations, and it is impossible to take into account the user needs of remote control, coarse-precision control, and fine-precision control of rotation. Among them, remote control refers to the control of a 3D virtual object when the user's virtual hand is not in contact with the 3D virtual object, and the remote range may refer to the range beyond one arm. Coarse-precision control refers to rotating a 3D virtual object by means of a virtual hand. In addition, the current fine-precision control can only realize the rotation of a 3D virtual object with a preset rotation axis (for example, the X-axis, Y-axis, or Z-axis).
[0040] Based on the above problems, an embodiment of the present application proposes an object rotation method, which is applied to an electronic device. The electronic device may be a wearable device. Wearable devices may also be called wearable smart devices or XR devices, which are a general term for wearable devices that use wearable technology to intelligently design and develop wearable devices for daily wear, such as glasses, helmets, etc. A wearable device is a portable device that is worn directly on the body or integrated into the user's clothes or accessories. Wearable devices are not just hardware devices, but also realize powerful functions through software support, data interaction, and cloud interaction.
[0041] Figure 1 First, a schematic structural diagram of the electronic device 100 is shown as an example.
[0042] The electronic device 100 may include at least one processor and at least one memory connected to the processor, wherein the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method provided in the embodiment shown in this document.
[0043] Figure 1 A block diagram of an exemplary electronic device 100 suitable for implementing embodiments herein is shown. Figure 1 The electronic device 100 shown is merely an example and should not limit the functionality and scope of use of the embodiments of this document.
[0044] like Figure 1 As shown, components of the electronic device 100 may include, but are not limited to: one or more processors 110 , a memory 120 , a communication bus 140 connecting different system components (including the memory 120 and the processor 110 ), and a communication interface 130 .
[0045] The communication bus 140 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnection (PCI) bus.
[0046] The electronic device 100 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the device, including volatile and non-volatile media, removable and non-removable media.
[0047] The memory 120 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) and / or cache memory. The device may further include other removable / non-removable, volatile / non-volatile computer system storage media. Figure 1 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a compact disc read only memory (CD-ROM), a digital versatile disc read only memory (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to the communication bus 140 via one or more data medium interfaces. The memory 120 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments herein.
[0048] A program / utility having a set (at least one) of program modules may be stored in memory 120, such program modules 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 may include an implementation of a network environment. The program modules generally perform the functions and / or methods of the embodiments described herein.
[0049] The electronic device 100 may also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), one or more devices that enable a user to interact with the device, and / or any device that enables the device to communicate with one or more other devices (e.g., network card, modem, etc.). Such communication may be performed via the communication interface 130. Furthermore, the electronic device 100 may also communicate with the network adapter ( Figure 1 The network adapter can communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the communication bus 140. It should be understood that although Figure 1 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Drives; hereinafter referred to as: RAID) systems, tape drives, and data backup storage systems.
[0050] The processor 110 executes various functional applications and data processing by running the programs stored in the memory 120, such as implementing the methods provided in the embodiments of this document.
[0051] It is understandable that the interface connection relationship between the modules illustrated in the embodiments of this document is only for illustrative purposes and does not constitute a structural limitation on the electronic device 100. In other embodiments of this document, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0052] Next, combine Figure 2-Figure 12 The object rotation method provided in the embodiment of the present application is exemplified.
[0053] like Figure 2 The figure is a flow chart of an embodiment of the object rotation method provided by the present application, which specifically includes the following steps:
[0054] Step 201: The electronic device maps the user's real hand into the virtual space.
[0055] Specifically, the electronic device can track the data of each bone node of the user's hand through devices such as cameras or sensors, and map the user's real hand movements into the virtual space.
[0056] It will be understood that the above-mentioned cameras and sensors are merely exemplary illustrations and do not constitute a limitation on the embodiments of the present application. In some embodiments, the user's real hand movements may also be mapped into the virtual space through other devices.
[0057] Step 202: The electronic device determines whether there is a rotating component in the virtual space.
[0058] Specifically, the rotation component can be considered as a component for controlling the rotation of a virtual object. The rotation component can also be considered as a user interface, a user operation interface or a human-computer interaction interface. This application does not make special provisions for the specific form of the rotation component. Through the rotation component, the user's virtual hand can rotate the 3D virtual object without touching the 3D virtual object, thus realizing remote control of the 3D virtual object.
[0059] In addition, the rotating component can be regarded as a miniature form of the virtual object in the virtual space, which is equivalent to copying a copy of the virtual object near the user, thereby allowing the user to observe the virtual object at close range and realize remote control of the virtual object.
[0060] In some optional embodiments, the thumbnail form of the rotating component may have a shape, which may be a sphere, a cube, or a shape corresponding to the 3D virtual object. It can be understood that the shape corresponding to the 3D virtual object may be a reduced shape of the 3D virtual object, that is, the shape corresponding to the 3D virtual object may be an irregular shape. For example, if the 3D virtual object is a sculpture, the rotating component may be a component in the shape of a sculpture.
[0061] In some optional embodiments, the shape of the rotating component may change with the user's operation. For example, when the user holds the rotating component in his hand to observe, the rotating component may be a shape corresponding to the 3D virtual object; or, when the user controls the rotation of the 3D virtual object, the rotating component may be a representative shape such as a sphere or a cube.
[0062] In some optional embodiments, multiple 3D virtual objects can be rotated and controlled by a rotation component. It is understandable that when a user rotates a 3D virtual object by a rotation component, the rotation component can be a sphere, a cube, or a shape corresponding to the 3D virtual object; when a user rotates multiple 3D virtual objects by a rotation component, the rotation component can be a representative shape such as a sphere or a cube.
[0063] In some optional embodiments, the rotation component may include a coarse precision component and a fine precision component. As described above, the coarse precision component can be used for the user to control the rotation of the virtual object by rotating the palm. Different from the fine precision control in the prior art, the fine precision component in the embodiment of the present application can be used to control the rotation of the virtual object according to a user-defined rotation axis or a user-defined rotation axis and rotation angle. Through the above-mentioned coarse precision component and fine precision component, different rotation requirements of users can be met.
[0064] In some optional embodiments, the coarse precision component can be located on the outside of the rotating component, and the fine precision component can be located on the inside of the rotating component. It can be understood that the coarse precision component and the fine precision component have their corresponding ranges of action, wherein the outside of the rotating component is the range of action of the coarse precision component, and the inside of the rotating component is the range of action of the fine precision component. Exemplarily, when the user's hand is within the range of action of the coarse precision component, for example, when the user's hand approaches the outside of the rotating component, the coarse precision component is awakened, and the user can use the coarse precision component for rotation control; when the user's hand is within the range of action of the fine precision component, for example, when the user's hand is on the inside of the rotating component, the fine precision component is awakened, and the user can use the fine precision component for rotation control.
[0065] Now combined Figure 3 Provides an example of the user interface for the Rotation component. Figure 3 For example, taking the shape of a rotating component as a sphere, the sphere can be considered as the entire rotating component, the outer surface or outer side of the sphere can be considered as a coarse-precision component, and the inner side of the sphere can be considered as a fine-precision component. For example, the user can touch the outer side of the sphere with a virtual hand to rotate the 3D virtual object corresponding to the sphere with a predefined rotation axis (for example, the Z axis, the Y axis, or the Z axis). Alternatively, the user can put the virtual hand deep into the interior of the sphere to rotate the 3D virtual object corresponding to the sphere with a custom rotation axis or a custom rotation axis and rotation angle.
[0066] Among them, in the fine-precision component, the component center, the axis control point and the rotation control point may be included. The component center can be considered as the center of the sphere, that is, the center of the rotating component. The axis control point can change with the position of the user's finger operation. For example, the user can change the position of the axis control point by clicking, double-clicking or dragging with a finger. The position of the axis control point can be any position on the rotating component. It is understandable that the user can also change the position of the axis control point in other ways, and the embodiment of the present application does not specifically limit this. The line connecting the axis control point and the center of the component is the rotation axis, which can realize the user-defined rotation axis. The rotation control point can be considered as a control point used to control the rotation of the virtual object. By moving the rotation control point by the user, the virtual object is rotated, thereby realizing fine rotation control of the 3D virtual object.
[0067] Figure 4 The schematic diagram of determining the rotation axis is shown as an example. Figure 4 , the left picture shows the rotation axis 1 selected by the user at time t1. For example, the user determines the position of the axis control point at S1 through the virtual hand. At this time, the line connecting the axis control point at position S1 and the component center is the rotation axis 1. At time t2, the user's virtual hand moves to position S2, that is, the position of the axis control point at time t2 is determined to be S2. At this time, the line connecting the axis control point at position S2 and the component center is the rotation axis 2, that is, the rotation axis 1 is updated to the rotation axis 2.
[0068] In some optional embodiments, when rotating a 3D virtual object, the 3D virtual object can also be rotated at a custom angle. The above rotation can include rotation controlled by a coarse precision component and rotation controlled by a fine precision component. Exemplarily, taking the rotation controlled by a fine precision component as an example, during the rotation of the 3D virtual object, the current rotation angle can be displayed on the rotation component. When the 3D virtual object rotates to the angle desired by the user, the user can stop the rotation, thereby achieving the effect of rotating at a custom angle.
[0069] Figure 5 The schematic diagram of the rotation angle is shown as an example. Figure 5 , P1 is the position of the rotation control point at time t3, and P1 can be any point on the rotation component, that is, the user can select any point on the rotation component as P1. It can be understood that P1 is the initial position of the rotation control point. When the user moves the rotation control point from P1 to P2, the rotation angle can be the angle between the first connecting line and the second connecting line, wherein the first connecting line is the connecting line between P1 and the axis control point, and the second connecting line is the connecting line between P2 and the axis control point.
[0070] It is understandable that, during the process of P1 moving from P2, the above rotation angle can be displayed on the rotating component, for example, on a fine-precision component, so that the user can clearly know how much the rotation has been made.
[0071] In some optional embodiments, when the user rotates a 3D virtual object through a coarse-precision component, the coarse-precision component may also display the rotated angle in real time. The manner in which the coarse-precision component displays the rotated angle in real time may specifically refer to the manner in which the fine-precision component displays the rotated angle in real time in the above-mentioned embodiment, which will not be repeated here.
[0072] If the electronic device determines that the rotating component has been displayed in the virtual space, step 203 may be executed; or,
[0073] If the electronic device determines that the rotating component is not displayed in the virtual space, step 205 may be executed.
[0074] Step 203: In response to the user's selection operation, the electronic device determines the target virtual object.
[0075] Specifically, the user's virtual hand can move in the virtual space to select a target virtual object.
[0076] The electronic device may detect whether the user has selected the target virtual object by collision detection. For example, the electronic device may detect whether the user's virtual hand has collided with the virtual object, or the electronic device may detect whether the hand ray of the user's virtual hand has collided with the virtual object. If the user's virtual hand or the hand ray of the virtual hand collides with the virtual object, it can be considered that the user has selected the target virtual object, that is, the virtual object that collides with the user's virtual hand or the hand ray of the virtual hand is the target virtual object.
[0077] It is understandable that the user can select one or more virtual objects as target virtual objects through the above selection method.
[0078] Step 204: In response to the recognized wake-up gesture, the electronic device displays a rotating component.
[0079] Specifically, after the user determines the target virtual object, the user can wake up the rotation component through a gesture.
[0080] If the electronic device recognizes the wake-up gesture, the electronic device may display the rotating component and execute step 205; or,
[0081] If the electronic device does not recognize the wake-up gesture, the electronic device may not display the rotating component and execute step 203.
[0082] Among them, the wake-up gesture may include but is not limited to click, pinch, grab, palm up and other gestures.
[0083] Step 205: The electronic device determines whether the user's virtual hand enters the action range of the fine-precision component.
[0084] Specifically, after the rotating component is displayed in the electronic device, it can be determined whether the user's virtual hand enters the action range of the fine-precision component.
[0085] The action range of the fine precision component can be the interior of the rotating component. Figure 4 Taking the spherical rotating component shown in the figure as an example, the scope of action of the fine precision component is the inside of the sphere. That is to say, if the user's virtual hand enters the inside of the sphere, it can be considered that the user's virtual hand has entered the scope of action of the fine precision component; if the user's virtual hand does not enter the inside of the sphere, it can be considered that the user's virtual hand has not entered the scope of action of the fine precision component.
[0086] If the electronic device determines that the user's virtual hand has entered the range of action of the fine-precision component, step 206 is executed; or,
[0087] If the electronic device determines that the user's virtual hand has not entered the range of action of the fine-precision component, step 207 is executed.
[0088] Step 206: In response to the user's first rotation operation, the electronic device performs a first rotation action on the target virtual object.
[0089] Specifically, if the electronic device determines that the user's virtual hand has entered the action range of the fine-precision component, it means that the user's virtual hand is within the action range of the fine-precision component.
[0090] Next, the user can rotate the target virtual object with a custom rotation axis, or the user can rotate it with a custom angle on the custom rotation axis.
[0091] Figure 6 The schematic diagram exemplarily shows the rotation of the target virtual object based on the control of the fine-precision component. Figure 6 The two figures below are schematic diagrams of the rotation of the target virtual object, and the two figures above are schematic diagrams of the rotation of the rotation component corresponding to the target virtual object. When the user sets the rotation axis 1 in the fine precision component, the target virtual object can rotate according to the rotation axis 1. When the user changes the rotation axis 1 to the rotation axis 2, the target virtual object can rotate according to the rotation axis 2.
[0092] It is understandable that after setting the rotation axis, the user can also rotate the target virtual object at a custom angle, wherein the custom angle can also be understood as the angle desired by the user. The effect of the custom rotation can be referred to as follows: Figure 5 The schematic diagram shown will not be repeated here.
[0093] In some optional embodiments, before the target virtual object rotates, the electronic device may also detect a confirmation gesture of the user, which is used to confirm whether the user confirms to rotate with the rotation axis currently selected by the user. Exemplarily, after the user selects the rotation axis, he may confirm with a confirmation gesture. In response to the detected confirmation gesture, the electronic device may rotate based on the rotation axis selected by the user. It is understandable that if the electronic device does not detect the user's confirmation gesture, it cannot rotate, thereby avoiding misoperation of rotation.
[0094] In some optional embodiments, during the process of the user rotating the target virtual object, a dial may be displayed in the fine precision component, and the dial may include multiple preset rotation angles, wherein the preset rotation angle may be a rotation angle commonly used by the user, or a rotation angle specified by other users, and the embodiment of the present application does not specifically limit this. Exemplarily, taking the minimum scale of 45 degrees as an example, the dial may include several preset rotation angles of 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, and 315 degrees. Among them, the initial position of the rotation control point may be 0 degrees. When the user moves the rotation control point to the middle of any two adjacent preset rotation angles, the rotation control point may automatically move to the preset rotation angle closest to it, that is, the target virtual object may automatically rotate to the preset rotation angle closest to it, thereby realizing a method of automatic adsorption. For example, assuming that the rotation control point moves from 0 degrees to 80 degrees, since 80 degrees is between 45 degrees and 90 degrees and is closest to 90 degrees, the rotation control point automatically moves to the preset rotation angle of 90 degrees, that is, the target virtual object automatically rotates to 90 degrees. It can be seen that the above automatic adsorption rotation method adds a scale tolerance mechanism. Since the user's rotation accuracy of the virtual object is limited, for users with common rotation angles, the above automatic adsorption method can greatly reduce the user's interaction difficulty and improve the user's experience.
[0095] In some optional embodiments, when the user rotates the target virtual object using the above-mentioned automatic adsorption method, the coarse-precision component can fade, so that the user can clearly see the dial in the fine-precision component, thereby making it more convenient for the user to operate and reducing the difficulty of user interaction.
[0096] Figure 7 The schematic diagram of automatic adsorption is shown as an example. Figure 7, Rotation component 1 is a component when the user has not determined to use the fine precision component for rotation. When the user determines to use the fine precision component for rotation, the rotation component can be as shown in rotation component 2. In rotation component 2, the coarse precision component has faded, and rotation component 2 displays a dial, which can include several preset rotation angles of 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, and 315 degrees. Assuming that the initial position of the rotation control point is Q1, the angle corresponding to Q1 is 0 degrees. When the user moves the rotation control point from Q1 to Q2, since the angle corresponding to Q2 is 30 degrees, which is between 0 degrees and 45 degrees and is closest to 45 degrees, the rotation control point will automatically move to Q3, where the angle corresponding to Q3 is 45 degrees. Correspondingly, since the rotation control point in the rotation component moves from Q1 to Q3, that is, it rotates 45 degrees, the target virtual object corresponding to the rotation component also rotates 45 degrees.
[0097] It is understandable that the above-mentioned preset rotation angles of 0 degrees, 45 degrees, 90 degrees, 135 degrees, 180 degrees, 225 degrees, 270 degrees, 315 degrees, etc. are only exemplary. In some embodiments, other preset rotation angles may also be used, and the embodiments of the present application do not specifically limit this. Exemplarily, the preset rotation angle may also be 0 degrees, 60 degrees, 120 degrees, 180 degrees, 240 degrees, 300 degrees, etc. When the user rotates the control point to any target angle on the dial, the rotation control point may be moved to the preset rotation angle closest to the target angle. For example, assuming that the user moves the rotation control point to 75 degrees, since 75 degrees is closest to 90 degrees, the rotation control point may automatically move to 90 degrees.
[0098] In some optional embodiments, the user can also simultaneously rotate multiple 3D virtual objects based on fine-precision component control, thereby ensuring the consistency of rotation of multiple virtual objects and avoiding the inconvenience of the user manipulating each virtual object.
[0099] Exemplarily, the user can select multiple 3D virtual objects, and these multiple 3D virtual objects can be target virtual objects. Among them, the specific method of selecting objects can refer to the relevant description in the above embodiment, for example, by detecting the collision between the virtual object and the virtual hand or detecting the collision between the virtual object and the hand ray of the virtual hand, which will not be repeated here. Then, the user can summon the rotation component through the gesture recognition algorithm. It can be understood that the above-mentioned multiple selected 3D virtual objects can correspond to one rotation component. In this embodiment, after summoning the rotation component, the user can activate the fine precision component. For example, the user can put the virtual hand into the rotation component, thereby activating the fine precision component, and can operate the above-mentioned multiple 3D virtual objects through the fine precision component, for example, the rotation axis can be changed, and the rotation angle can be changed based on the selected rotation axis, so that the above-mentioned multiple 3D virtual objects can rotate together with the rotation axis and rotation angle selected by the user.
[0100] Figure 8a and Figure 8b The schematic diagram exemplarily shows a plurality of 3D virtual objects rotating together. Figure 8a , the user can select target virtual object 1, target virtual object 2 and target virtual object 3 as three target virtual objects through the object selection method, where target virtual object 1, target virtual object 2 and target virtual object 3 in the left figure are virtual objects before rotation. Then, the user can summon the rotation component, and activate the fine precision component after summoning the rotation component. After the fine precision component controls the rotation of target virtual object 1, target virtual object 2 and target virtual object 3, the rotated virtual objects shown in the right figure can be obtained.
[0101] Then, based on this, the user can further select target virtual object 2 and target virtual object 3 as two target virtual objects, and can again use the fine precision component to control the rotation of target virtual object 2 and target virtual object 3, thereby obtaining the following: Figure 8b The rotation diagram shown. Figure 8b , compared to Figure 8a The three target virtual objects in the image rotate simultaneously. Figure 8b Only two target virtual objects are rotated. It can be seen that the user can dynamically rotate multiple virtual objects at the same time, and the number of virtual objects can be determined according to the needs of the user.
[0102] It is understandable that the above embodiments all show scenes in which the target virtual object rotates by means of a fine-precision component. In some optional embodiments, the user can also make the target virtual object revolve by means of a fine-precision component. Exemplarily, the user can determine the orbital trajectory after summoning the rotation component and activating the fine-precision component. Among them, the orbital trajectory may include information such as the orbital plane and the orbital radius. The orbital plane may be a plane perpendicular to the axis of rotation. After determining the orbital trajectory, the user can make the target virtual object revolve around the initial position of the target virtual object on the orbital plane with the orbital radius.
[0103] Optionally, the revolution plane can be a plane including the revolution center and the component center and perpendicular to the rotation axis. In this case, the user can drag the rotating component within the revolution plane, and the revolution radius can be the distance between the component center at the target position and the rotation axis of the rotating component at the initial position. It can be understood that the revolution center can be determined by the position of the component center of the rotating component at the initial position.
[0104] Fig. 9 The schematic diagram of an embodiment of the revolution trajectory is shown as an example. Fig. 9 , the revolution center can be the position of the component center when the rotating component is in the initial position, and the rotation axis 1 is the rotation axis of the rotating component in the initial position. When the user wishes to orbit the target virtual object, the user can drag the rotating component. For example, the user can drag the rotating component in the revolution plane, and the revolution plane can be a plane including the revolution center and the component center and perpendicular to the rotation axis. When the user drags the rotating component to the target position, the rotation axis of the rotating component at the target position is the rotation axis 2, and the distance from the component center at the target position to the rotation axis 1 is the revolution radius.
[0105] Alternatively, the revolution plane may be a plane that does not include the revolution center but includes the component center at the target position and is perpendicular to the rotation axis. In this case, the user can drag the rotating component arbitrarily, and the revolution radius may be the distance between the component center at the target position and the rotation axis of the rotating component at the initial position, wherein the first plane may be a plane perpendicular to the revolution plane and includes the revolution center.
[0106] Fig.10 The schematic diagram of another embodiment of the revolution trajectory is shown as an example. Fig.10, the revolution center may be the position of the component center when the rotating component is at the initial position, and the rotation axis 1 is the rotation axis of the rotating component at the initial position. When the user wishes to orbit the target virtual object, the user may drag the rotating component. For example, the user may drag the rotating component arbitrarily in the virtual space. When the user drags the rotating component to the target position, the rotation axis of the rotating component at the target position is the rotation axis 2, and the revolution plane may be a plane that does not include the revolution center but includes the component center at the target position and is perpendicular to the rotation axis. The distance from the component center at the target position to the rotation axis 1 is the revolution radius.
[0107] Step 207: In response to the user's second rotation operation, the electronic device performs a second rotation action on the target virtual object.
[0108] Specifically, if the electronic device determines that the user's virtual hand has not entered the action range of the fine-precision component, it means that the user's virtual hand is within the action range of the coarse-precision component.
[0109] Next, the user may use the coarse-precision component to arbitrarily rotate the target virtual object, wherein the arbitrary rotation may be performed according to the rotation angle and rotation direction of the user's virtual hand.
[0110] In some optional embodiments, the user can achieve rotation based on the coarse precision component with one hand. Fig.11 The schematic diagram of one-handed rotation is shown as an example. Alternatively, the user can also use both hands to achieve the rotation based on the coarse-precision component. Fig.12 The schematic diagram of rotating both hands is shown as an example, and the embodiments of the present application do not impose any special limitation on this.
[0111] In some optional embodiments, the user may also rotate multiple 3D virtual objects simultaneously through coarse-precision components. The specific method of rotating multiple 3D virtual objects simultaneously through coarse-precision components can be referred to the method of rotating multiple 3D virtual objects simultaneously through fine-precision components, which will not be repeated here.
[0112] It is understandable that the present application uses the XR field as an example for illustrative explanation, but it is not sufficient to limit the embodiments of the present application. In some embodiments, the technical solution of the present application can also be applied to terminal devices or real space. For example, it can be applied to control the rotation interaction of objects on a large screen, or drone interaction, etc.
[0113] In addition, the style of the rotating component in the embodiment of the present application is only an exemplary description and does not constitute a limitation of the embodiment of the present application. In some embodiments, during remote control, the coarse precision component may be invisible and controlled through hand interaction, or the rotation axis of the rotating component may be replaced by other styles, for example, by finger pointing, or the style of the revolution center may be changed, for example, a reduced version of the target virtual object may be displayed at the revolution center, etc.
[0114] Fig.13 FIG. 1 is a schematic diagram of a structure of an embodiment of the object rotating device of the present application. Fig.13 As shown, the object rotation device 1300 may include: a determination module 1310, a display module 1320 and a rotation module 1330; wherein,
[0115] A determination module 1310, configured to determine one or more target virtual objects in response to a selection operation by a user;
[0116] The display module 1320 is used to display the rotating component in response to the recognized wake-up gesture;
[0117] The rotation module 1330 is used to rotate the target virtual object through the rotation component.
[0118] In one possible implementation, the rotation component includes a coarse precision component and a fine precision component, and the rotation module 1330 is further used for:
[0119] In response to a first rotation operation of the user, performing a first rotation action on the target virtual object based on the fine-precision component; or,
[0120] In response to a second rotation operation by the user, a second rotation action is performed on the target virtual object based on the coarse precision component.
[0121] In one possible implementation, the rotation module 1330 is further configured to:
[0122] determining a target rotation axis based on the fine-precision component;
[0123] The target virtual object is rotated to a target rotation angle through the target rotation axis.
[0124] In one possible implementation, the fine-precision component displays a dial, the dial includes a plurality of preset rotation angles, and the rotation module 1330 is further used to:
[0125] If the target rotation angle is not any one of the plurality of preset rotation angles, the target virtual object is rotated to a preset rotation angle that is closest to the target rotation angle.
[0126] In one possible implementation, the display module 1320 is further used for:
[0127] During the rotation about the target rotation axis, the rotation angle is displayed.
[0128] In one possible implementation, the rotation module 1330 is further configured to:
[0129] Determining a revolution trajectory based on the fine-precision component, wherein the revolution trajectory includes a revolution plane and a revolution radius;
[0130] The target virtual object is caused to revolve around an initial position of the target virtual object at the revolving radius on the revolving plane.
[0131] In one possible implementation, the shape of the rotating component is a reduced shape of the target virtual object, or
[0132] The shape of the rotating component is a preset shape.
[0133] Fig.13 The object rotation device 1300 provided in the illustrated embodiment may be used to execute the technical solution of the method embodiment illustrated in the present application, and its implementation principle and technical effects may be further referred to the relevant description in the method embodiment.
[0134] It should be understood that the above Fig.13 The division of the various modules of the object rotation device 1300 shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. In the implementation process, each step of the above method or the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0135] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more microprocessors (DSP), or one or more field programmable gate arrays (FPGA). For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0136] In the above embodiments, the processor involved may include, for example, a CPU, a DSP, a microcontroller or a digital signal processor, and may also include a GPU, an embedded neural network processor (Neural-network Process Units; hereinafter referred to as: NPU) and an image signal processor (Image Signal Processing; hereinafter referred to as: ISP). The processor may also include necessary hardware accelerators or logic processing hardware circuits, such as ASIC, or one or more integrated circuits for controlling the execution of the program of the technical solution of the present application. In addition, the processor may have the function of operating one or more software programs, and the software programs may be stored in a storage medium.
[0137] An embodiment of the present application also provides a readable storage medium, in which a program is stored. When the program is run on an electronic device, the electronic device executes the method provided by the embodiment shown in the present application.
[0138] An embodiment of the present application also provides a program product, which includes a program. When the program product is run on an electronic device, the electronic device executes the method provided by the embodiment shown in the present application.
[0139] In the embodiments of the present application, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent the existence of A alone, the existence of A and B at the same time, and the existence of B alone. Among them, A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, c can be single or multiple.
[0140] Those of ordinary skill in the art will appreciate that the various units and algorithm steps described in the embodiments disclosed herein can be implemented in a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0141] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0142] In several embodiments provided in the present application, if any function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for enabling a device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-OnlyMemory; hereinafter referred to as: ROM), random access memory (Random Access Memory; hereinafter referred to as: RAM), disk or optical disk and other media that can store program codes.
[0143] The above is only a specific implementation of the present application. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. The protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for rotating an object, characterized in that: Applied to electronic equipment, the method comprises: In response to a selection operation by a user, determining one or more target virtual objects; In response to the recognized wake-up gesture, displaying a rotating component; The target virtual object is rotated by the rotation component.
2. The method according to claim 1, characterized in that The rotation component includes a coarse precision component and a fine precision component, and rotating the target virtual object by the rotation component includes: In response to a first rotation operation of the user, performing a first rotation action on the target virtual object based on the fine-precision component; or, In response to a second rotation operation by the user, a second rotation action is performed on the target virtual object based on the coarse precision component.
3. The method according to claim 2, characterized in that The performing a first rotation action on the target virtual object based on the fine-precision component comprises: determining a target rotation axis based on the fine-precision component; The target virtual object is rotated to a target rotation angle through the target rotation axis.
4. The method according to claim 3, characterized in that The fine-precision component displays a dial, the dial includes a plurality of preset rotation angles, and the method further includes: If the target rotation angle is not any one of the plurality of preset rotation angles, the target virtual object is rotated to a preset rotation angle that is closest to the target rotation angle.
5. The method according to claim 3, characterized in that: The method further comprises: During the rotation about the target rotation axis, the rotation angle is displayed.
6. The method according to any one of claims 2 to 5, characterized in that: The performing a first rotation action on the target virtual object based on the fine-precision component comprises: Determining a revolution trajectory based on the fine-precision component, wherein the revolution trajectory includes a revolution plane and a revolution radius; The target virtual object is caused to revolve around an initial position of the target virtual object at the revolving radius on the revolving plane.
7. The method according to any one of claims 1 to 6, characterized in that: The shape of the rotating component is a reduced shape of the target virtual object, or The shape of the rotating component is a preset shape.
8. An electronic device, characterized in that: include: A processor and a memory, wherein the memory is used to store a program; and the processor is used to run the program to implement the object rotation method as described in any one of claims 1 to 7.
9. A readable storage medium, characterized in that: The readable storage medium stores a program, and when the program is run on an electronic device, the object rotation method according to any one of claims 1 to 7 is implemented.