Interaction method and apparatus, and device, medium and program
By obtaining the relative position information of the interactive panel and the virtual object in the XR scene, determining the target position and displaying the panel, combined with the guidance effects, the problem of inaccurately saved interactive panel positions is solved, and the user experience and operation efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/082626
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-21
- Filing Date
- 2024-03-20
- Publication Date
- 2024-09-26
AI Technical Summary
In extended reality (XR) scenarios, inaccurate location preservation of interactive panels results in cumbersome user operations and the inability to achieve seamless transition between the virtual world and the real world.
By obtaining the relative position information between the interactive panel and the virtual object, the target position of the interactive panel is determined, and the panel is displayed at the target position, combined with guidance effects to help users quickly locate, reduce operating costs, and improve user experience.
It achieves accurate position saving and rapid positioning of interactive panels, reduces the complexity of user operations, and improves the seamless conversion experience between the virtual world and the real world.
Smart Images

Figure CN2024082626_26092024_PF_FP
Abstract
Description
Interactive methods, devices, equipment, media and programs
[0001] This application claims priority to Chinese Patent Application No. 202310280407.3 filed on March 21, 2023, and the contents of the above-mentioned Chinese patent application disclosure are hereby incorporated by reference in their entirety as a part of this application. Technical Field
[0002] The embodiments of the present application relate to an interaction method, apparatus, device, medium and program. Background Art
[0003] Extended Reality (XR) combines the real and virtual worlds through computers to create a virtual environment where humans and machines can interact. XR is also a general term for various technologies, including Virtual Reality (VR), Augmented Reality (AR), and Mixed Reality (MR). By integrating the visual interaction technologies of these three, XR creates an immersive experience, allowing users to seamlessly transition between the virtual and real worlds.
[0004] In XR scenarios, multiple interactive panels are typically supported. Users can open multiple interactive panels in the virtual scene and move them around. Typically, when an interactive panel is first opened, it is displayed in a default initial position. If the user moves the panel, it will be displayed in the default initial position the next time it is opened, making operation of the interactive panel cumbersome.
[0005] Summary of the Invention
[0006] Embodiments of the present application provide an interaction method, apparatus, device, medium, and program.
[0007] In a first aspect, an embodiment of the present application provides an interaction method, the method comprising:
[0008] In response to an instruction to open an interaction panel of a virtual object in a virtual scene, obtaining relative position information between the interaction panel and the virtual object, the relative position information being position information of the interaction panel relative to the virtual object after a last movement;
[0009] Determining target position information of the interactive panel according to the position information of the virtual object and the relative position information;
[0010] The interactive panel is displayed at the target position of the interactive panel according to the target position information of the interactive panel.
[0011] In some embodiments, the method further comprises:
[0012] Play a guidance effect, where the guidance effect is used to indicate the corresponding relationship between the virtual object and the interaction panel.
[0013] In some embodiments, the playing guiding special effect includes:
[0014] determining a distance between the virtual object and the interaction panel according to the relative position information;
[0015] When the distance is greater than a preset distance, the guiding special effect is played.
[0016] In some embodiments, the method further comprises:
[0017] When it is detected that the guidance special effect meets a preset condition, the guidance special effect is controlled to disappear.
[0018] In some embodiments, the guiding special effect meeting a preset condition includes: the playing time of the guiding special effect reaching a preset time.
[0019] In some embodiments, the guiding special effect meeting a preset condition includes: the number of times the guiding special effect is played reaches a preset number of times.
[0020] In some embodiments, after the guide special effect disappears, the method further includes:
[0021] When a first operation on the virtual object is detected, the guiding special effect is replayed.
[0022] In some embodiments, the guiding special effect includes at least one guiding line, the starting position of the guiding line is the position of the virtual object, and the ending position of the guiding line is the target position of the interactive panel;
[0023] The playing guide special effect includes: controlling the guide line to extend from the starting position to the end position along a preset path.
[0024] In some embodiments, a streamer effect or a light spot effect is displayed around the guide line.
[0025] In some embodiments, in response to an instruction to open an interaction panel of a virtual object in a virtual scene, obtaining relative position information between the interaction panel and the virtual object includes:
[0026] In response to an instruction to open an interaction panel of a virtual object in a virtual scene, acquiring relative position information and relative posture information between the interaction panel and the virtual object;
[0027] The method further includes: determining target posture information of the interactive panel based on the posture information of the virtual object and the relative posture information;
[0028] The step of displaying the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel includes:
[0029] The interactive panel is displayed at the target position of the interactive panel according to the target position information and the target posture information of the interactive panel.
[0030] In some embodiments, before displaying the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel, the method further includes:
[0031] Get user's posture information;
[0032] The step of displaying the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel includes:
[0033] The interactive panel is displayed at the target position of the interactive panel according to the target position information of the interactive panel and the posture information of the user, with the posture of the interactive panel facing the user.
[0034] In some embodiments, the method further comprises:
[0035] When the interaction panel of the virtual object is initially opened, determining an initial display position of the interaction panel of the virtual object according to the position of the virtual object and a preset initial relative position between the interaction panel of the virtual object and the virtual object;
[0036] displaying the interactive panel according to an initial display position of the interactive panel;
[0037] In response to a movement instruction for the interactive panel, controlling the interactive panel to move;
[0038] In response to a closing instruction for the interaction panel, the interaction panel is closed, and relative position information between the virtual object and the interaction panel after the movement is saved.
[0039] In some embodiments, the virtual scene is a user-defined scene, and the virtual object is a user-defined object.
[0040] On the other hand, an embodiment of the present application provides an interactive device, comprising:
[0041] an acquisition module, configured to, in response to an instruction to open an interaction panel of a virtual object in a virtual scene, acquire relative position information between the interaction panel and the virtual object, the relative position information being position information of the interaction panel relative to the virtual object after a last movement;
[0042] a determination module, configured to determine target position information of the interaction panel based on the position information of the virtual object and the relative position information;
[0043] The display module is configured to display the interaction panel at a target position of the interaction panel according to the target position information of the interaction panel.
[0044] On the other hand, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any of the methods described above.
[0045] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program enables a computer to execute any of the methods described above.
[0046] On the other hand, an embodiment of the present application provides a computer program product, including a computer program, which implements any of the methods described above when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0048] FIG1 is a flow chart of an interactive method provided in Example 1 of the present application;
[0049] FIG2 is a flow chart of an interactive method provided in Example 2 of the present application;
[0050] FIG3 is a schematic diagram showing a display of an interactive panel of a virtual object;
[0051] FIG4 is a flow chart of an interactive method provided in Example 3 of the present application;
[0052] FIG5 is a schematic diagram of an operation of the interactive panel;
[0053] FIG6 is a schematic diagram of the structure of an interactive device provided in Example 4 of the present application;
[0054] FIG7 is a schematic structural diagram of an electronic device provided in Example 5 of the present application. DETAILED DESCRIPTION
[0055] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0056] It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or devices.
[0057] To facilitate understanding of the embodiments of the present application, before describing each embodiment of the present application, some concepts involved in all embodiments of the present application are first appropriately explained as follows:
[0058] XR is a general term for VR, AR and AR technology. XR devices include but are not limited to VR devices, AR devices and MR devices.
[0059] VR: A technology for creating and experiencing a virtual world. It generates a virtual environment through computational means. It is a multi-source information (the virtual reality mentioned in this article includes at least visual perception, and can also include auditory perception, tactile perception, motion perception, and even taste perception, olfactory perception, etc.). It realizes the simulation of the fusion of virtual environments, interactive three-dimensional dynamic vision and entity behavior, immersing users in a simulated virtual reality environment, and realizing applications in various virtual environments such as maps, games, videos, education, medical care, simulation, collaborative training, sales, assisted manufacturing, maintenance and repair.
[0060] VR devices refer to terminals that achieve virtual reality effects, and can usually be provided in the form of glasses, helmet-mounted displays (HMDs), or contact lenses to achieve visual perception and other forms of perception. Of course, the form of virtual reality devices is not limited to this, and can be further miniaturized or enlarged as needed.
[0061] AR: An AR set refers to a simulated set in which at least one virtual object is superimposed on a physical set or a representation thereof. For example, an electronic system may have an opaque display and at least one imaging sensor that captures images or videos of a physical set, which are representations of the physical set. The system combines the images or videos with virtual objects and displays the combination on the opaque display. An individual using the system indirectly views the physical set via the images or videos of the physical set and observes the virtual objects superimposed on the physical set. When the system uses one or more image sensors to capture images of the physical set and uses those images to present the AR set on the opaque display, the displayed images are referred to as video pass-through. Alternatively, an electronic system for displaying the AR set may have a transparent or translucent display through which an individual can directly view the physical set. The system can display virtual objects on the transparent or translucent display, allowing an individual using the system to observe the virtual objects superimposed on the physical set. For another example, the system may include a projection system that projects virtual objects onto the physical set. Virtual objects can be projected, for example, onto physical surfaces or as holograms, allowing individuals using the system to observe virtual objects superimposed on a physical setting. Specifically, a technique involves calculating the camera's pose parameters in the real world (also known as the three-dimensional world, the real world) in real time as the camera captures images, and then adding virtual elements to the images captured by the camera based on the pose parameters. Virtual elements include, but are not limited to, images, videos, and three-dimensional models. The goal of AR technology is to overlay the virtual world on the real world on a screen for interaction.
[0062] MR: By presenting virtual scene information in a real scene, an interactive feedback information loop is established between the real world, the virtual world, and the user to enhance the realism of the user experience. For example, computer-generated sensory input (e.g., virtual objects) is integrated with sensory input from a physical scene or its representation in a simulated scene. In some MR scenes, computer-generated sensory input can adapt to changes in sensory input from the physical scene. In addition, some electronic systems used to present MR scenes can monitor the orientation and / or position relative to the physical scene so that virtual objects can interact with real objects (i.e., physical elements from the physical scene or their representations). For example, the system can monitor movement so that virtual plants appear stationary relative to physical buildings.
[0063] Virtual reality devices (VR devices), terminals that achieve virtual reality effects, can usually be provided in the form of glasses, head-mounted displays (Head Mount Display, abbreviated as HMD), or contact lenses to achieve visual perception and other forms of perception. Of course, the form of virtual reality devices is not limited to this and can be further miniaturized or enlarged according to actual needs.
[0064] Optionally, the virtual reality devices (i.e., XR devices) described in the embodiments of this application may include, but are not limited to, the following types:
[0065] 1) Mobile virtual reality devices support the configuration of mobile terminals (such as smartphones) in various ways (such as head-mounted displays with dedicated card slots). Through wired or wireless connection with the mobile terminal, the mobile terminal performs relevant calculations for virtual reality functions and outputs data to the mobile virtual reality device, such as watching virtual reality videos through the mobile terminal's APP.
[0066] 2) All-in-one virtual reality devices have a processor for performing related calculations for virtual functions, and thus have independent virtual reality input and output functions. They do not need to be connected to a PC or mobile terminal and have a high degree of freedom in use.
[0067] 3) Computer-based virtual reality (PCVR) devices use the PC to perform calculations and data output related to virtual reality functions. External computer-based virtual reality devices use the data output by the PC to achieve virtual reality effects.
[0068] Figure 1 is a flow chart of an interactive method provided in Example 1 of this application. This method is applied to electronic devices such as XR devices, electronic devices, and personal computers. This embodiment mainly uses XR devices as an example for illustration. As shown in Figure 1, the method provided in this embodiment includes the following steps.
[0069] S101. In response to an instruction to open an interaction panel of a virtual object in a virtual scene, obtain relative position information between the interaction panel and the virtual object, where the relative position information is position information of the interaction panel relative to the virtual object after a last movement.
[0070] The virtual scene can be a 3D extended reality scene provided by an XR device, or a 2D virtual scene provided by a mobile phone, computer, etc.
[0071] This virtual scene can be provided by the client itself or defined by the user. For example, in XR devices, to meet the needs of personalized users, a user-generated content (UGC) feature has been added. This allows users to customize a virtual scene in the game editor based on their needs. This user-defined virtual scene is also called the user's own world, and other users can enter and play in the user's customized scene.
[0072] The editor can provide editing elements such as polyhedrons, controls, materials, physics, logic, music, sound effects, special effects, and materials for users to use. Users can customize virtual scenes in the editor. User-defined virtual scenes can be called UGC worlds or UGC scenes. Customization in the embodiments of this application can be understood as scenes independently built by users in the editor using the editing elements provided by the editor.
[0073] When creating virtual scenes, users often need to set and view the parameters, properties, and functions of virtual objects within them. Virtual objects can be objects, props, or controls within the scene, while objects can be plants, animals, or buildings within the scene. Users typically set and view the parameters, properties, and functions of virtual objects within the scene using the virtual object's interactive panel. Virtual objects can be user-defined or system-provided.
[0074] The interactive panel can be understood as a window or pop-up window. The interactive panel displays the parameters, properties, and functions of the virtual object, and users can modify and view the properties and functions of the virtual object on the interactive panel. Therefore, the interactive panel can also be called a property panel or a settings panel.
[0075] It is understandable that after the virtual scene is created, the user may also open the interaction panel of the virtual objects in the virtual scene while playing the virtual scene.
[0076] The user operates the virtual object to open the interaction panel of the virtual object. The opening instruction of the interaction panel can be a click operation, double-click operation, hover operation, long press operation, etc. of the user on the virtual object.
[0077] When an instruction to open an interactive panel for a virtual object is received, the relative position information between the interactive panel and the virtual object is obtained. The relative position information obtained is the position information of the interactive panel relative to the virtual object after the last movement. In this embodiment, the relative position information of the interactive panel relative to the virtual object is stored each time the interactive panel moves. Therefore, the relative position information of the interactive panel relative to the virtual object after the last movement can be obtained. After the interactive panel is initially opened, it may have been moved multiple times. The last movement of the interactive panel refers to the most recent movement of the interactive panel.
[0078] For example, upon receiving an instruction to open the interactive panel of a virtual object, the relative position information between the interactive panel and the virtual object is queried based on the virtual object's identifier. This relative position information is saved after the interactive panel was last moved. This relative position information can be stored on a server or locally on the XR device. If the relative position information is stored on the server, the XR device requests the relative position information from the server.
[0079] The relative position information between the interactive panel and the virtual object can be the displacement of each coordinate axis of the interactive panel relative to the virtual object in the coordinate system of the virtual scene, that is, the offset of the coordinate values of the interactive panel on the X, Y, and Z axes relative to the coordinate values of the virtual scene. Of course, this relative position information can also be represented by other parameters, such as the orientation and distance of the interactive panel relative to the virtual scene.
[0080] Optionally, each time the interactive panel moves, the position information of the interactive panel and the virtual object in the virtual scene may be stored separately, and the corresponding relationship between the two may be stored.
[0081] S102: Determine target position information of the interaction panel according to the position information of the virtual object and the relative position information.
[0082] The virtual object's position in the virtual scene is known. Based on the virtual object's position and relative position information, the target position of the interactive panel in the virtual scene can be determined. The virtual object's position refers to its current position, i.e., its position when the interactive panel is currently opened. The target position of the interactive panel refers to the position where the interactive panel should be displayed after it is currently opened.
[0083] The position of the virtual object may or may not have changed since the last movement of the interactive panel. If the virtual object's position has not changed, the target position of the interactive panel, determined based on the virtual object's position and the relative position information, remains at the position after the last movement when the interactive panel is opened. If the virtual object's position has changed, the target position of the interactive panel will also change relative to its position after the last movement. However, regardless of whether the virtual object's position changes, the relative position of the interactive panel and the virtual object remains unchanged. This prevents the user from noticing the virtual object's movement and eliminates the need to re-move the interactive panel, reducing additional operational costs.
[0084] If the interaction panel of the virtual object is opened for the first time, the relative position information of the interaction panel after the last movement cannot be obtained. At this time, the interaction panel will be displayed at the preset initial display position.
[0085] Exemplarily, when the interaction panel of a virtual object is opened for the first time, the initial display position of the interaction panel of the virtual object is determined based on the position of the virtual object and the preset initial relative position of the interaction panel of the virtual object and the virtual object; and the interaction panel is displayed according to the initial display position of the interaction panel of the virtual object.
[0086] The initial display position is usually set where the user can see it. For example, the initial display position is in the upper left corner of the virtual object, 20 centimeters (cm) away from the virtual object. Setting the initial display position of the interactive panel in the upper left corner of the virtual object is in line with the user's viewing habits. Setting the interactive panel 20 centimeters away from the virtual object ensures that the user can see the interactive panel.
[0087] By saving the relative position information between the interaction panel and the virtual object, even if the user moves the position of the virtual object, the relative position information can be used to ensure that when the interaction panel is opened again, the relative position of the interaction panel and the virtual object remains unchanged. The user does not need to move the interaction panel again, which reduces additional operating costs and improves the user experience.
[0088] S103: Display the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel.
[0089] In this embodiment, based on an instruction to open an interactive panel of a virtual object in a virtual scene, the relative position information of the interactive panel and the virtual object is obtained. This relative position information is the position information of the interactive panel relative to the virtual object after the last movement; the target position information of the interactive panel is determined based on the position information of the virtual object and this relative position information; and the interactive panel is displayed at the target position of the interactive panel based on the target position information of the interactive panel. By recording the relative position information of the interactive panel and the virtual object after the last movement, when the user opens the interactive panel again, the relative position of the interactive panel and the virtual object can be maintained based on this relative position information, eliminating the need to readjust the position of the interactive panel of the virtual object, thereby reducing additional operating costs and improving the user experience.
[0090] Based on the first embodiment, the second embodiment of the present application provides an interactive method. For the same content, please refer to the description of the first embodiment, and this embodiment will not be repeated. FIG2 is a flowchart of the interactive method provided by the second embodiment of the present application. As shown in FIG2, the method provided by this embodiment includes the following steps.
[0091] S201. In response to an instruction to open an interaction panel of a virtual object in a virtual scene, obtain relative position information between the interaction panel and the virtual object, where the relative position information is position information of the interaction panel relative to the virtual object after a last movement.
[0092] S202: Determine target position information of the interaction panel according to the position information of the virtual object and the relative position information.
[0093] S203: Display the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel, and play a guiding special effect, where the guiding special effect is used to indicate the corresponding relationship between the virtual object and the interactive panel.
[0094] In this embodiment, when the user reopens the interactive panel, not only is the interactive panel displayed at the position where it was last moved, but a guidance effect is also played. The guidance effect is used to indicate the correspondence between the virtual object and the interactive panel, that is, to indicate which virtual object the interactive panel belongs to.
[0095] In one scenario, a user may open multiple interaction panels in a virtual scene. When a large number of interaction panels are opened, the user may not be able to distinguish which interaction panel belongs to which virtual object, and thus cannot quickly locate the interaction panel of the virtual object. In this embodiment, when displaying the interaction panel, by playing the guidance special effects, the user can accurately locate the interaction panel of the virtual object based on the guidance special effects.
[0096] In another scenario, the user may move the interaction panel of the virtual object to a very far position, making it impossible to quickly and accurately locate the interaction panel of the virtual object. In this embodiment, when the interaction panel is displayed, by playing a guidance effect, the user can accurately locate the interaction panel of the virtual object according to the guidance effect.
[0097] Optionally, the guidance effect includes at least one guide line, the starting position of the guide line being the location of the virtual object, and the ending position of the guide line being the target position of the interactive panel. Accordingly, the XR device controls the guide line to extend from the starting position to the ending position along a preset path, and the user can quickly locate the interactive panel of the virtual object based on the guide line.
[0098] Optionally, a light effect or a spot effect can be displayed around the guide line to provide users with a better visual and interactive experience. Referring to FIG3 , FIG3 is a schematic diagram of a display of an interactive panel for a virtual object. A guide line with a spot effect displayed between the virtual object and the interactive panel is a guide effect.
[0099] Optionally, the guidance special effects also include sound effects, which provide users with a better experience through visual and auditory effects.
[0100] It should be noted that the interactive panel and the guidance effects do not have a specific display order and can be displayed simultaneously. For example, the interactive panel can be displayed first, followed by the guidance effects. Alternatively, the guidance effects can be played first, followed by the interactive panel. Alternatively, the guidance effects can be displayed simultaneously, with both the interactive panel and the guidance effects starting to move from the virtual object's location, with the guidance effects located at the end point of the interactive panel. As the guidance line of the guidance effects extends, the interactive panel follows until it reaches the target location, at which point the interactive panel stops moving.
[0101] Optionally, when the interactive panel moves along the guide line of the guide special effect, the interactive panel may also gradually grow from small to large.
[0102] In one implementation method, the distance between the virtual object and the interactive panel can be determined based on the relative position information of the interactive panel relative to the virtual object after the last movement. When the distance is greater than the preset distance, the guiding special effect is played; when the distance is less than or equal to the preset distance, the guiding special effect is not played.
[0103] If the distance between the virtual object and the interaction panel is greater than the preset distance, it means that the interaction panel is far away from the virtual object and the user may not be able to see the interaction panel, or the interaction panel is not within the user's gaze area, that is, it is located at the edge of the user's field of view. At this time, playing the guiding special effects can help the user quickly locate the interaction panel.
[0104] S204: When it is detected that the guidance special effect meets a preset condition, the guidance special effect is controlled to disappear.
[0105] In this embodiment, the guide special effect disappears when the preset conditions are met, and the guide special effect can be made to disappear by stopping the playing of the guide special effect. In other embodiments of the present application, the guide special effect can be played repeatedly until the user closes the interactive panel.
[0106] Optionally, the guidance special effect meets the preset conditions, including: the playing time of the guidance special effect reaches the preset time, that is, the guidance special effect disappears after the preset time, and the preset time is, for example, 1 minute, then the guidance special effect disappears after repeated playback for 1 minute.
[0107] Exemplarily, the guiding effects can be played in the following ways: Method 1, the guiding line dynamically extends from the virtual object to the target position of the interactive panel, and then dynamically extends from the virtual object to the target position of the interactive panel again, and repeats the execution multiple times until the playback time reaches the preset time and then stops playing.
[0108] Method 2: After the guide special effect is played once, the final playback effect is maintained until it disappears after one minute. For example, the guide line dynamically extends from the virtual object to the target position of the interactive panel. The guide line no longer moves and maintains this state until the playback time reaches the preset time and then stops playing.
[0109] The guiding special effect meeting the preset conditions may also include: the number of times the guiding special effect is played reaches a preset number of times, that is, the guiding special effect may also disappear after being played a preset number of times, and the preset number of times is, for example, 1 time or 2 times.
[0110] The guidance effect meeting a preset condition may further include: receiving a guidance effect closing instruction, i.e., the guidance effect disappears after receiving a user closing operation on the guidance effect. Optionally, a guidance effect closing control is displayed in the virtual scene, and the guidance effect disappears after clicking the closing control, or the guidance effect can be closed by clicking, hovering, or long pressing the guidance effect.
[0111] The guiding special effect disappears when the preset conditions are met, which can prevent the guiding special effect from blocking the virtual scene or interfering with other subsequent operations.
[0112] S205: After the guiding special effect disappears, when a first operation on the virtual object is detected, replay the guiding special effect.
[0113] Optionally, after the navigation effect disappears and the interactive panel remains open, if the user needs to quickly locate the interactive panel, they can perform a first operation on the virtual object. When the first operation on the virtual object is detected, the navigation effect is replayed. Based on this navigation effect, the user can quickly locate the interactive panel corresponding to the virtual object. The first operation can be a click, double-click, hover, or long press on the virtual object.
[0114] In this embodiment, after determining the target position of the interactive panel based on the relative position information between the interactive panel and the virtual object after the last movement, as well as the position of the virtual object, the interactive panel is displayed at the target position and a guidance effect is played. The guidance effect is used to indicate the correspondence between the virtual object and the interactive panel. By playing the guidance effect, the user can accurately locate the interactive panel of the virtual object based on the guidance effect, providing a better user experience. The guidance effect can disappear when preset conditions are met, thereby avoiding obstruction of the virtual scene and affecting user operations.
[0115] Based on Examples 1 and 2, Example 2 of this application provides an interaction method for illustrating the complete process of initially opening, adjusting the position, and subsequently opening the interaction panel of a virtual object. For the same content, refer to the description of Example 1 and will not be repeated in this embodiment. Figure 4 is a flow chart of the interaction method provided in Example 3 of this application. As shown in Figure 4, the method provided in this embodiment includes the following steps.
[0116] S301: In response to an instruction to open an interaction panel of a virtual object in a virtual scene, determine whether the interaction panel of the virtual object is opened for the first time.
[0117] If the position information of the last movement of the interactive panel is not stored, it is determined that the interactive panel of the virtual object is opened for the first time, or a flag is set and whether the interactive panel of the virtual object is opened for the first time is determined according to the value of the flag.
[0118] S302: Determine an initial display position of the interaction panel of the virtual object according to the position of the virtual object and a preset initial relative position of the interaction panel of the virtual object and the virtual object.
[0119] The initial relative position is pre-set and is usually set in front of the virtual object and in a place that is easily visible to the user.
[0120] S303: Display the interactive panel according to the initial display position of the interactive panel.
[0121] S304: In response to the movement instruction for the interaction panel, control the movement of the interaction panel.
[0122] After the interactive panel is displayed at the initial display position, the user can move the position of the interactive panel according to their needs.
[0123] Optionally, the user can also change the posture of the interaction panel.
[0124] S305: In response to the closing instruction for the interaction panel, close the interaction panel and save the relative position information between the virtual object and the interaction panel after the movement.
[0125] Before closing the interaction panel, the user may move the interaction panel multiple times. Optionally, only the relative position information of the interaction panel with respect to the virtual object when the interaction panel is closed may be saved.
[0126] If the user changes the posture of the interaction panel, the relative posture information of the interaction panel with respect to the virtual object can also be saved.
[0127] S306: In response to an instruction to open an interaction panel of a virtual object in the virtual scene, obtain relative position information between the interaction panel and the virtual object.
[0128] S307: Determine the target position information of the interaction panel according to the position information and relative position information of the virtual object.
[0129] S308: Obtain user posture information.
[0130] The user's posture information can be obtained through the positioning module of the XR device, and a Simultaneous Localization and Mapping (SLAM) module or other modules for definition are set on the XR device.
[0131] S309 : Display the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel and the user's posture information, and play a guiding special effect, with the posture of the interactive panel facing the user.
[0132] When the user opens the interactive panel this time, the user's posture may have changed compared to the posture when the interactive panel was moved last time. In this embodiment, in order to facilitate the user to view the interactive panel, the posture of the interactive panel is determined based on the user's posture information, so that the posture of the interactive panel is always facing the user, giving the user a better experience.
[0133] In this embodiment, the target posture information of the interactive panel is determined based on the user's posture by obtaining the user's posture information, and the interactive panel is displayed based on the target position information and the target posture information of the interactive panel, so that the posture of the interactive panel is oriented toward the user. Optionally, in other embodiments of the present application, the target posture information of the interactive panel may be determined based on the posture information after the last movement of the interactive panel instead of based on the user's posture information, so that the posture of the interactive panel remains consistent with the posture after the last movement.
[0134] Accordingly, upon receiving an instruction to open the interactive panel, not only the relative position information between the interactive panel and the virtual object is obtained, but also the relative posture information between the interactive panel and the virtual object is obtained. The target position information of the interactive panel is determined based on the virtual object's position information and relative position information. The target posture information of the interactive panel is determined based on the virtual object's posture information and the relative posture information. Based on the target position information and target posture information of the interactive panel, the interactive panel is displayed in the virtual scene.
[0135] S310: When it is detected that the guidance special effect meets a preset condition, control the guidance special effect to disappear.
[0136] S311 : After the guiding special effect disappears, when a first operation on the virtual object is detected, replay the guiding special effect.
[0137] Figure 5 illustrates an operation diagram of the interactive panel. Figure 5(a) shows a user initially opening the interactive panel of a virtual object. When the user initially opens the interactive panel, the panel appears at the preset initial relative position of the virtual object. The user then moves the panel to the position shown in Figure 5(b). After completing the operation, the user can close the panel using the close control on the panel. The virtual scene after the panel is closed is shown in Figure 5(c).
[0138] After the virtual object's interactive panel is closed, if the user reopens it, it will be displayed at the location of its last move, as shown in Figure 5(b), and the guidance effect shown in Figure 5(d) will play once. After the guidance effect ends, it disappears from the virtual scene, and the virtual scene page changes to that shown in Figure 5(e). If the interactive panel is not closed, the user clicks the virtual object again to replay the guidance effect, as shown in Figure 5(f).
[0139] In Figure 5, the rectangular area represents the virtual object's bounding box, also known as a bounding volume or collision volume. This bounding box can be considered a transparent object that covers or surrounds all or part of the virtual object and is invisible to the user. The virtual object's bounding box is the operable area of the virtual object. When a user clicks a virtual object, they must click within the area of the virtual object's bounding box for the click to take effect.
[0140] It is understood that in the embodiment of the present application, not all steps S301-S311 are required steps. They can be selectively executed according to actual usage, or some steps may be replaced by other steps in the actual process. In addition, the execution order of the various steps is not limited to the order indicated by the above numbers. The order of some steps can be swapped, and some steps can be executed in parallel.
[0141] To facilitate better implementation of the interaction method of the embodiment of the present application, the embodiment of the present application further provides an interaction device. FIG6 is a schematic diagram of the structure of the interaction device provided in the fourth embodiment of the present application. As shown in FIG6 , the interaction device 100 may include:
[0142] an acquisition module 11 for acquiring relative position information between the interaction panel and the virtual object in response to an instruction to open the interaction panel of the virtual object in the virtual scene, wherein the relative position information is position information of the interaction panel relative to the virtual object after the last movement of the interaction panel;
[0143] A determination module 12, configured to determine target position information of the interaction panel based on the position information of the virtual object and the relative position information;
[0144] The display module 13 is configured to display the interaction panel at a target position of the interaction panel according to the target position information of the interaction panel.
[0145] In some embodiments, the display module 13 is further configured to:
[0146] Play a guidance effect, where the guidance effect is used to indicate the corresponding relationship between the virtual object and the interaction panel.
[0147] In some embodiments, the display module 13 is specifically used to:
[0148] determining a distance between the virtual object and the interaction panel according to the relative position information;
[0149] When the distance is greater than a preset distance, the guiding special effect is played.
[0150] In some embodiments, the display module 13 is further configured to:
[0151] When it is detected that the guidance special effect meets a preset condition, the guidance special effect is controlled to disappear.
[0152] In some embodiments, the guiding special effect meeting a preset condition includes: the playing time of the guiding special effect reaching a preset time.
[0153] In some embodiments, the guiding special effect meeting a preset condition includes: the number of times the guiding special effect is played reaches a preset number of times.
[0154] In some embodiments, the display module 13 is further configured to:
[0155] After the guiding special effect disappears, when a first operation on the virtual object is detected, the guiding special effect is replayed.
[0156] In some embodiments, the guiding special effect includes at least one guiding line, the starting position of the guiding line is the position of the virtual object, and the ending position of the guiding line is the target position of the interactive panel;
[0157] The display module 13 is specifically used to control the guide line to extend from the starting position to the end position along a preset path.
[0158] In some embodiments, a streamer effect or a light spot effect is displayed around the guide line.
[0159] In some embodiments, the acquisition module 11 is specifically configured to:
[0160] In response to an instruction to open an interaction panel of a virtual object in a virtual scene, acquiring relative position information and relative posture information between the interaction panel and the virtual object;
[0161] The acquisition module 11 is further configured to: determine target posture information of the interactive panel based on the posture information of the virtual object and the relative posture information;
[0162] The display module 13 is specifically used for:
[0163] The interactive panel is displayed at the target position of the interactive panel according to the target position information and the target posture information of the interactive panel.
[0164] In some embodiments, the acquisition module 11 is further used to: acquire user posture information;
[0165] The display module 13 is specifically used for:
[0166] The interactive panel is displayed at the target position of the interactive panel according to the target position information of the interactive panel and the posture information of the user, with the posture of the interactive panel facing the user.
[0167] In some embodiments, the display module 13 is further configured to:
[0168] When the interaction panel of the virtual object is initially opened, determining an initial display position of the interaction panel of the virtual object according to the position of the virtual object and a preset initial relative position between the interaction panel of the virtual object and the virtual object;
[0169] displaying the interactive panel according to an initial display position of the interactive panel;
[0170] In response to a movement instruction for the interactive panel, controlling the interactive panel to move;
[0171] In response to a closing instruction for the interaction panel, the interaction panel is closed, and relative position information between the virtual object and the interaction panel after the movement is saved.
[0172] In some embodiments, the virtual scene is a user-defined scene, and the virtual object is a user-defined object.
[0173] It should be understood that the device embodiment and the method embodiment may correspond to each other, and similar descriptions may refer to the method embodiment. To avoid repetition, they will not be described here.
[0174] The above describes the device 100 of the embodiment of the present application from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0175] The present application also provides an electronic device. FIG7 is a schematic diagram of the structure of an electronic device provided in the fifth embodiment of the present application. As shown in FIG7 , the electronic device 200 may include:
[0176] The memory 21 and the processor 22 are configured to store computer programs and transmit the program code to the processor 22. In other words, the processor 22 can call and run the computer program from the memory 21 to implement the method in the embodiment of the present application.
[0177] For example, the processor 22 may be configured to execute the above method embodiments according to instructions in the computer program.
[0178] In some embodiments of the present application, the processor 22 may include but is not limited to:
[0179] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0180] In some embodiments of the present application, the memory 21 includes but is not limited to:
[0181] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0182] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 21 and executed by the processor 22 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0183] As shown in FIG. 7 , the electronic device may further include a transceiver 23 , which may be connected to the processor 22 or the memory 21 .
[0184] The processor 22 can control the transceiver 23 to communicate with other devices. Specifically, it can send information or data to other devices or receive information or data sent by other devices. The transceiver 23 may include a transmitter and a receiver. The transceiver 23 may further include an antenna, and the number of antennas may be one or more.
[0185] It can be understood that, although not shown in FIG. 7 , the electronic device 200 may further include a camera module, a wireless fidelity WIFI module, a positioning module, a Bluetooth module, a display, a controller, etc., which will not be described in detail here.
[0186] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0187] The present application also provides a computer storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.
[0188] The present application also provides a computer program product, comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to execute the corresponding process of the method for controlling the position of a user in a virtual scene in an embodiment of the present application. For the sake of brevity, the details are not further described here.
[0189] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0190] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.
[0191] The above is only a specific embodiment of the present application, but the scope of protection of the present application is not limited to this. Any changes or substitutions that can be easily conceived by any person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. An interactive method, comprising: In response to an instruction to open an interactive panel of a virtual object in a virtual scene, relative position information between the interactive panel and the virtual object is acquired, where the relative position information is position information of the interactive panel relative to the virtual object after the last movement; Determining target position information of the interactive panel according to the position information of the virtual object and the relative position information; The interactive panel is displayed at the target position of the interactive panel according to the target position information of the interactive panel.
2. The method according to claim 1, further comprising: A guiding special effect is played, where the guiding special effect is used to indicate a corresponding relationship between the virtual object and the interactive panel.
3. The method according to claim 2, wherein: The playback guiding special effects include: Determining the distance between the virtual object and the interaction panel according to the relative position information; When the distance is greater than a preset distance, the guiding special effect is played.
4. The method according to claim 2 or 3, further comprising: When it is detected that the guiding special effect meets a preset condition, the guiding special effect is controlled to disappear.
5. The method according to claim 4, wherein: The guiding special effect meeting a preset condition includes: the playing time of the guiding special effect reaches a preset time.
6. The method according to claim 4 or 5, wherein: The guiding special effect meeting a preset condition includes: the playing times of the guiding special effect reaching a preset number of times.
7. The method according to any one of claims 4 to 6, wherein: After the guiding special effect disappears, the method further includes: When a first operation on the virtual object is detected, the guiding special effect is replayed.
8. The method according to any one of claims 2 to 7, wherein: The guiding special effect comprises at least one guiding line, the starting position of the guiding line is the position of the virtual object, and the ending position of the guiding line is the target position of the interactive panel; The playing guide special effect includes: controlling the guide line to extend from the starting position to the end position according to a preset path.
9. The method according to claim 8, wherein: A streamer effect or a light spot effect is displayed around the guide line.
10. The method according to any one of claims 1 to 7, wherein: The step of obtaining relative position information between the interaction panel and the virtual object in response to an instruction to open the interaction panel of the virtual object in the virtual scene includes: In response to an instruction to open an interactive panel of a virtual object in a virtual scene, obtaining relative position information and relative posture information between the interactive panel and the virtual object; The method further comprises: determining target posture information of the interactive panel according to the posture information of the virtual object and the relative posture information; The step of displaying the interaction panel at the target position of the interaction panel according to the target position information of the interaction panel includes: The interactive panel is displayed at the target position of the interactive panel according to the target position information and the target posture information of the interactive panel.
11. The method according to any one of claims 1 to 7, wherein: Before displaying the interactive panel at the target position of the interactive panel according to the target position information of the interactive panel, the method further comprises: Get user's posture information; The step of displaying the interaction panel at the target position of the interaction panel according to the target position information of the interaction panel includes: The interactive panel is displayed at the target position of the interactive panel according to the target position information of the interactive panel and the posture information of the user, with the posture of the interactive panel facing the user.
12. The method according to any one of claims 1 to 11, further comprising: When the interaction panel of the virtual object is opened for the first time, determining the initial display position of the interaction panel of the virtual object according to the position of the virtual object and the preset initial relative position between the interaction panel of the virtual object and the virtual object; Displaying the interaction panel according to an initial display position of the interaction panel; In response to a movement instruction for the interaction panel, controlling the interaction panel to move; In response to a closing instruction for the interaction panel, the interaction panel is closed, and relative position information between the virtual object and the interaction panel after the movement is saved.
13. The method according to any one of claims 1 to 12, wherein: The virtual scene is a scene defined by a user, and the virtual object is an object defined by a user.
14. An interactive device, comprising: an acquisition module, configured to, in response to an instruction to open an interaction panel of a virtual object in a virtual scene, acquire relative position information between the interaction panel and the virtual object, wherein the relative position information is position information of the interaction panel relative to the virtual object after the last movement; A determination module, configured to determine target position information of the interaction panel according to the position information of the virtual object and the relative position information; The display module is configured to display the interaction panel at a target position of the interaction panel according to the target position information of the interaction panel.
15. An electronic device, comprising: A processor and a memory, wherein the memory is configured to store a computer program, and the processor is configured to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 13.
16. A computer-readable storage medium configured to store a computer program, wherein: The computer program enables a computer to execute the method according to any one of claims 1 to 13.
17. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Interaction method, device, equipment, medium and program
CN118689297A
Multi-window Binding and dragging method and multi-window binding and dragging system
CN104331236A
Position adjusting method and device of operation control, terminal and storage medium
CN113262476A
3D object annotation
CN115398316A
Virtual space interaction method and device, equipment and medium
CN115509361A
Cited By
VR multi-terminal collaborative interaction method and system, computer equipment and storage medium
CN119002704A
