Method, device and computer equipment for interacting with virtual display objects
By loading 3D interface operation controls into a 3D virtual scene and adjusting the interactive camera parameters, the problem of inconsistent information between game characters in a 3D virtual scene was solved, improving immersion and interaction efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
- Filing Date
- 2021-11-30
- Publication Date
- 2026-06-19
AI Technical Summary
When game characters interact with virtual objects in a 3D virtual scene, the element information they obtain is inconsistent with that obtained through a 2D interface, resulting in a sense of disconnect and reduced immersion, which in turn affects interaction efficiency.
In a 3D virtual scene, load 3D interface operation controls for virtual display objects, and adjust the parameters of the interactive camera to make the positions of the 3D interface operation controls correspond to the positions of the 2D interface operation controls, thus ensuring information consistency.
By ensuring information consistency and avoiding a sense of disconnect, the immersion and interaction efficiency of game characters in three-dimensional virtual scenes can be improved.
Smart Images

Figure CN116196616B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information technology, and in particular to an interactive method, apparatus, and computer device for displaying virtual objects. Background Technology
[0002] Game characters interact with virtual objects in a 3D virtual scene to obtain information about the corresponding elements within those objects.
[0003] Currently, virtual objects and corresponding interactive icons are typically displayed in 3D virtual scenes to prompt game characters to interact with them and obtain information about the corresponding elements. After the game character interacts with the virtual object, a 2D user interface is displayed on the terminal screen, allowing the player to access information about the elements within the virtual object. However, the virtual object merely serves as an interaction entry point. The information about the elements within the virtual object differs from the interactive information displayed in the 2D interface during actual interaction. This discrepancy between the information seen by the game character in the 3D virtual scene and the interactive information seen through the 2D interface during actual interaction can create a sense of disconnect for the game character, reducing immersion in the 3D virtual scene and hindering interaction between the game character and the virtual object, ultimately resulting in low interaction efficiency. Summary of the Invention
[0004] This invention provides an interaction method, apparatus, and computer device for virtual display objects. The main purpose is to ensure that the information content obtained by the game character before and after interacting with the virtual display object is consistent, thereby avoiding the sense of disconnect for the game character, improving the immersion of the game character in the three-dimensional virtual scene, and further promoting the interaction between the game character and the virtual display object, thus improving the interaction efficiency between the game character and the virtual display object.
[0005] According to a first aspect of the present invention, an interactive method for a virtual display object is provided, comprising:
[0006] Obtain the 3D interface operation controls corresponding to each display element in the virtual display object;
[0007] The three-dimensional interface operation controls are loaded into the three-dimensional virtual scene where the virtual display object is located, thereby generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element;
[0008] When the game character interacts with the virtual display object, a two-dimensional operation interface corresponding to each display element is determined, wherein the scene information displayed by the three-dimensional interface operation control is consistent with the interaction information displayed by the corresponding two-dimensional interface operation control in the two-dimensional operation interface.
[0009] By adjusting the parameters of the interactive camera, the position of the 3D interface operation control corresponds to the position of the corresponding 2D interface operation control, and the 2D operation interface is displayed on the display interface.
[0010] Optionally, the parameters include the position information and shooting angle corresponding to the interactive camera, and adjusting the parameters of the interactive camera to make the position of the three-dimensional interface operation control correspond to the position of the corresponding two-dimensional interface operation control includes:
[0011] By adjusting the position information and shooting angle of the interactive camera, the position of the three-dimensional interface operation control is made to coincide with the position of the corresponding two-dimensional interface operation control.
[0012] Optionally, the virtual display object includes a first virtual display object and a second virtual display object, the first virtual display object and the second virtual display object being at the same position in the three-dimensional virtual scene and facing opposite directions, the various display elements including each first display element corresponding to the first virtual display object and each second display element corresponding to the second virtual display object, the step of loading the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, and generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element, includes:
[0013] The three-dimensional interface operation controls corresponding to each of the first display elements are loaded into the three-dimensional virtual scene where the first virtual display object is located, thereby generating a first virtual display object with the three-dimensional interface operation controls corresponding to each of the first display elements, wherein the first virtual display object includes model data;
[0014] The three-dimensional interface operation controls corresponding to each of the second display elements are loaded into the three-dimensional virtual scene where the second virtual display object is located, thereby generating a second virtual display object with the three-dimensional interface operation controls corresponding to each of the second display elements. The second virtual display object does not include model data.
[0015] Optionally, before determining the two-dimensional operation interface corresponding to each display element when the game character interacts with the virtual display object, the method further includes:
[0016] Determine the first line connecting the center of the first virtual display object and the interactive camera, and set the first interactive angle range corresponding to the first virtual display object according to the angle between the first line and the first normal corresponding to the first virtual display object, wherein the direction of the first normal is the same as the orientation of the first virtual display object.
[0017] Determine the second line connecting the center of the second virtual display object and the interactive camera, and set the second interactive angle range corresponding to the second virtual display object according to the angle between the second line and the second normal corresponding to the second virtual display object, wherein the direction of the second normal is the same as the orientation of the second virtual display object.
[0018] Optionally, when the game character interacts with the virtual display object, determining the two-dimensional operation interface corresponding to each display element includes:
[0019] When the game character interacts with the virtual display object, determine the target interaction angle of the game character.
[0020] If the target interaction angle is within the range of the first interaction angle, then a two-dimensional operation interface corresponding to each of the first display elements is determined;
[0021] If the target interaction angle is within the range of the second interaction angle, then a two-dimensional operation interface corresponding to each of the second display elements is determined.
[0022] Optionally, the method further includes:
[0023] In response to the triggering event of the two-dimensional interface operation control corresponding to the target display element in the first virtual display object or the second virtual display object, a two-dimensional full-screen interface corresponding to the target display element is generated, and the interactive information corresponding to the target display element is displayed in the two-dimensional full-screen interface.
[0024] Optionally, the method further includes:
[0025] In response to the tearing command of the two-dimensional interface operation control of the target display element, the tearing effect image and the back image corresponding to the two-dimensional interface operation control of the target display element are obtained;
[0026] Using the diagonal of the torn effect image as the side length, generate a square canvas corresponding to the torn effect image, and place the torn effect image in the square canvas;
[0027] During the process of tearing off the target display element, one edge of the square canvas is used as the tearing edge. The tearing effect image is determined to be symmetrical about the first axis with respect to the tearing edge, and the back image is placed at the first symmetrical position.
[0028] The tearing effect of the two-dimensional interface operation controls corresponding to the target display element is achieved by using the tearing effect image and the back image after placement in the square canvas.
[0029] Optionally, the step of achieving the tearing effect of the two-dimensional interface operation controls corresponding to the target display element through the tearing effect image and the placed back image in the square canvas includes:
[0030] In response to the tearing command, the square canvas is offset based on the tearing edge, and the offset of the square canvas at each moment is calculated. The tearing effect image is then moved in the opposite direction based on the offset.
[0031] Determine the axially symmetrical position of the offset tearing effect image relative to the tearing edge, and reposition the back image at the axially symmetrical position;
[0032] Part of the back image and part of the tearing effect image located in the offset square canvas are displayed, while the remaining back image and remaining tearing effect image located outside the offset square canvas are hidden, so as to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element.
[0033] Optionally, the method further includes:
[0034] Determine the center point corresponding to the tearing effect diagram, and the target diagonal line perpendicular to the tearing edge in the tearing effect diagram;
[0035] Based on the center point and target diagonal of the tear-off effect image, calculate the end ratio and anchor point ratio of the target display element respectively;
[0036] When the anchor point ratio is less than the preset anchor point ratio, offsetting the square canvas is prohibited;
[0037] When the end ratio reaches the preset end ratio, the two-dimensional interface operation controls and three-dimensional interface operation controls corresponding to the target display element are hidden respectively.
[0038] Optionally, the step of calculating the end ratio and anchor point ratio corresponding to the target display element based on the center point and target diagonal of the tear-off effect image includes:
[0039] During the offsetting of the square canvas, the real-time position and the initial position of the midpoint of the tearing edge are connected to obtain the third line corresponding to the tearing edge;
[0040] Project the third connecting line onto the target diagonal to obtain the end projection corresponding to the torn edge;
[0041] Calculate the ending ratio corresponding to the target display element based on the length of the ending projection and the length of the target diagonal;
[0042] Determine the real-time distance between the midpoint of the torn edge and the center point corresponding to the torn effect image, and calculate the anchor point ratio corresponding to the target display element based on the real-time distance and the length of the target diagonal.
[0043] According to a second aspect of the present invention, an interactive device for displaying virtual objects is provided, comprising:
[0044] The acquisition unit is used to acquire the 3D interface operation controls corresponding to each display element in the virtual display object;
[0045] The generation unit is used to load the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, and generate a virtual display object with the three-dimensional interface operation controls corresponding to each display element;
[0046] The determining unit is used to determine the two-dimensional operation interface corresponding to each display element when the game character interacts with the virtual display object, wherein the scene information displayed by the three-dimensional interface operation control is consistent with the interaction information displayed by the corresponding two-dimensional interface operation control in the two-dimensional operation interface.
[0047] The adjustment unit is used to adjust the parameters of the interactive camera so that the position of the three-dimensional interface operation control corresponds to the position of the corresponding two-dimensional interface operation control, and to display the two-dimensional operation interface on the display interface.
[0048] Optionally, the parameters include the position information and shooting angle of the interactive camera. The adjustment unit is specifically used to adjust the position information and shooting angle of the interactive camera so that the position of the three-dimensional interface operation control coincides with the position of the corresponding two-dimensional interface operation control.
[0049] Optionally, the virtual display object includes a first virtual display object and a second virtual display object, which are located at the same position in the three-dimensional virtual scene and face opposite directions. Each display element includes each first display element corresponding to the first virtual display object and each second display element corresponding to the second virtual display object. The generation unit includes: a first generation module and a second generation module.
[0050] The first generation module is used to load the three-dimensional interface operation controls corresponding to each of the first display elements into the three-dimensional virtual scene where the first virtual display object is located, and generate a first virtual display object with the three-dimensional interface operation controls corresponding to each of the first display elements, wherein the first virtual display object includes model data;
[0051] The second generation module is used to load the three-dimensional interface operation controls corresponding to each of the second display elements into the three-dimensional virtual scene where the second virtual display object is located, and generate a second virtual display object with the three-dimensional interface operation controls corresponding to each of the second display elements, wherein the second virtual display object does not include model data.
[0052] Optionally, the determining unit is further configured to determine a first line connecting the center of the first virtual display object and the interactive camera, and set a first interactive angle range corresponding to the first virtual display object according to the angle between the first line and the first normal corresponding to the first virtual display object, wherein the direction of the first normal is the same as the orientation of the first virtual display object.
[0053] The determining unit is further configured to determine a second line connecting the center of the second virtual display object and the interactive camera, and to set a second interactive angle range corresponding to the second virtual display object based on the angle between the second line and the second normal corresponding to the second virtual display object, wherein the direction of the second normal is the same as the orientation of the second virtual display object.
[0054] Optionally, the determining unit includes: a first determining module and a second determining module.
[0055] The first determining module is used to determine the target interaction angle of the game character when the game character interacts with the virtual display object;
[0056] The second determining module is used to determine a two-dimensional operation interface corresponding to each of the first display elements if the target interaction angle is within the range of the first interaction angle.
[0057] The second determining module is further configured to determine a two-dimensional operation interface corresponding to each of the second display elements if the target interaction angle is within the range of the second interaction angle.
[0058] Optionally, the generation unit is further configured to respond to a triggering event of a two-dimensional interface operation control corresponding to a target display element in the first virtual display object or the second virtual display object, generate a two-dimensional full-screen interface corresponding to the target display element, and display the interactive information corresponding to the target display element in the two-dimensional full-screen interface.
[0059] Optionally, the device further includes: a tearing unit,
[0060] The acquisition unit is further configured to, in response to the tearing instruction of the two-dimensional interface operation control of the target display element, acquire the tearing effect image and the back image corresponding to the two-dimensional interface operation control of the target display element.
[0061] The generation unit is further configured to generate a square canvas corresponding to the tearing effect image, using the diagonal of the tearing effect image as the side length, and place the tearing effect image in the square canvas;
[0062] The determining unit is further configured to take one side of the square canvas as the tearing edge during the process of tearing the target display element, determine the first axis symmetric position of the tearing effect image relative to the tearing edge, and place the back image at the first axis symmetric position.
[0063] The tearing unit is used to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element by using the tearing effect image in the square canvas and the back image after placement.
[0064] Optionally, the tearing unit includes: a moving module, a third determining module, and a tearing module.
[0065] The moving module is used to respond to the tearing command, offset the square canvas based on the tearing edge, calculate the offset of the square canvas at each moment, and move the tearing effect image in the opposite direction based on the offset.
[0066] The third determining module is used to determine the second axis symmetrical position of the offset tearing effect image relative to the tearing edge, and to reposition the back image at the second axis symmetrical position.
[0067] The tearing module is used to display part of the back image and part of the tearing effect image located in the offset square canvas, and to hide the remaining back image and remaining tearing effect image located outside the offset square canvas, so as to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element.
[0068] Optionally, the tearing unit further includes: a calculation module and a hiding module.
[0069] The third determining module is also used to determine the center point corresponding to the tearing effect diagram, and the target diagonal line perpendicular to the tearing edge in the tearing effect diagram;
[0070] The calculation module is used to calculate the end ratio and anchor point ratio of the target display element based on the center point and target diagonal of the tear-off effect image, respectively.
[0071] The moving module is used to prevent the square canvas from being offset when the anchor point ratio is less than a preset anchor point ratio;
[0072] The hiding module is used to hide the two-dimensional interface operation controls and the three-dimensional interface operation controls corresponding to the target display element when the end ratio reaches the preset end ratio.
[0073] Optionally, the computing module includes a connection submodule and a computing submodule.
[0074] The connecting submodule is used to project the third connecting line onto the target diagonal to obtain the end projection corresponding to the tearing edge;
[0075] The calculation submodule is used to calculate the end ratio corresponding to the target display element based on the length of the end projection and the length of the target diagonal.
[0076] The calculation submodule is also used to determine the real-time distance between the midpoint of the tear-off edge and the center point corresponding to the tear-off effect image, and to calculate the anchor point ratio corresponding to the target display element based on the real-time distance and the length of the target diagonal.
[0077] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the above-described interactive method for virtual display objects.
[0078] According to a fourth aspect of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described interactive method for virtual display objects.
[0079] This invention provides an interactive method, apparatus, and computer device for virtual display objects. The invention can acquire three-dimensional interface operation controls corresponding to each display element in a virtual display object; load the three-dimensional interface operation controls into a three-dimensional virtual scene where the virtual display object is located, generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element; when a game character interacts with the virtual display object, a two-dimensional operation interface corresponding to each display element is determined, wherein the scene information displayed by the three-dimensional interface operation controls is consistent with the interaction information displayed by the corresponding two-dimensional interface operation controls in the two-dimensional operation interface; simultaneously, by adjusting the parameters of the interactive camera, the position of the three-dimensional interface operation controls corresponds to the position of the corresponding two-dimensional interface operation controls, and the two-dimensional operation interface is displayed on the display interface. Therefore, by loading 3D interface operation controls that are consistent with the information content of 2D interface operation controls into the 3D virtual scene where the virtual resource object is located, when the game character interacts with the virtual resource object, the parameters of the interactive camera are adjusted simultaneously to ensure that the information content obtained by the game character before and after interacting with the virtual resource object is consistent. This can avoid the game character experiencing a sense of disconnect, improve the game character's immersion in the 3D virtual scene, and further promote the interaction between the game character and the virtual display object, thereby improving the interaction efficiency between the game character and the virtual display object. Attached Figure Description
[0080] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0081] Figure 1 The flowchart illustrates an interactive method for a virtual display object provided by an embodiment of the present invention.
[0082] Figure 2 This invention provides a flowchart of another method for interacting with a virtual display object according to an embodiment of the invention.
[0083] Figure 3 A schematic diagram illustrating the tearing effect provided by an embodiment of the present invention is shown;
[0084] Figure 4 This diagram illustrates the structure of an interactive device for displaying virtual objects according to an embodiment of the present invention.
[0085] Figure 5 This invention provides a schematic diagram of the structure of another interactive device for displaying virtual objects according to an embodiment of the invention.
[0086] Figure 6 A schematic diagram of the physical structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation
[0087] The present invention will be described in detail below with reference to the accompanying drawings and embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in the present application can be combined with each other.
[0088] Currently, the element information obtained by game characters in a 3D virtual scene is inconsistent with the interactive information obtained through a 2D interface during actual interaction, which is not conducive to promoting interaction between game characters and virtual display objects, resulting in low interaction efficiency between game characters and virtual display objects.
[0089] To address the aforementioned problems, embodiments of the present invention provide an interactive method for virtual display objects, such as... Figure 1 As shown, the method includes:
[0090] 101. Obtain the 3D interface operation controls corresponding to each display element in the virtual display object.
[0091] Among them, a virtual display object is any object that can be displayed in a three-dimensional virtual scene and can be interacted with by game characters, such as a notice board in a three-dimensional virtual scene. Each display element is an element in the virtual display object that can be seen by game characters and can be interacted with by game characters, such as a notice on a notice board.
[0092] This invention is primarily applied to scenarios where game characters interact with virtual objects in a three-dimensional virtual scene. The executing entity of this invention is a device or equipment capable of enabling game characters to interact with virtual objects, specifically located on the game client or server side.
[0093] To ensure that the element information obtained by the game character in the 3D virtual scene is consistent with the interactive information obtained through the 2D interface during actual interaction, this embodiment of the invention can pre-edit the 3D interface operation blueprint (i.e., 3D UI blueprint) corresponding to each display element in the virtual display object in the UE engine. The element information in this 3D interface operation blueprint is identical to the information seen by the game character through the 2D interface when interacting with the virtual display object. When the game character is in the 3D virtual scene where the virtual display object is located, based on the 3D interface operation blueprint corresponding to each display element, 3D interface operation controls corresponding to each display element are generated. These controls are then loaded into the 3D virtual scene where the game character is located, seamlessly embedding the interactive information that can only be displayed in the 2D interface into the 3D virtual scene, thus ensuring consistency in the information obtained by the game character before and after interacting with the virtual display object.
[0094] 102. Load the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, and generate a virtual display object with the three-dimensional interface operation controls corresponding to each display element.
[0095] In this embodiment of the invention, when the game character and the virtual display object are in the same three-dimensional virtual scene, the generated three-dimensional interface operation controls corresponding to each display element are loaded into the corresponding positions of the virtual display object according to the position information of each display element in the virtual display object. That is, the three-dimensional interface operation controls corresponding to each display element are embedded in the three-dimensional virtual scene where the game character is located. The element information displayed by the three-dimensional interface operation controls is consistent with the interaction information obtained through the two-dimensional operation interface when the game character actually interacts with the virtual display object.
[0096] Furthermore, in existing technologies, the information obtained by a game character interacting with a virtual display object from the front is the same as the information obtained when interacting with the virtual display object from the back. This means that two-way interaction between the game character and the virtual display object cannot be achieved, violating the game character's normal cognition and failing to simulate a realistic scenario. To overcome these shortcomings, this invention provides an original virtual display object (first virtual display object) and a simulated virtual resource display object (second virtual resource display object). The first and second virtual display objects are located at the same position in the three-dimensional virtual scene but face opposite directions. Moreover, the first display elements in the first virtual display object are different from the second display elements in the second virtual display object. By setting the interaction angle ranges corresponding to the first and second virtual resource objects respectively, the game character can interact with different display elements when in different interaction angle ranges. That is, the interaction information obtained by the game character interacting with the virtual display object from the front is different from the interaction information obtained when interacting with the virtual display object from the back, achieving two-way interaction between the game character and the virtual display object, thus more realistically simulating real-world scenarios.
[0097] In this scenario, during the process of loading the 3D interface operation controls corresponding to each first display element and each second display element into the 3D virtual scene, step 102 specifically includes: loading the 3D interface operation controls corresponding to each first display element into the 3D virtual scene where the first virtual display object is located, generating a first virtual display object with the 3D interface operation controls corresponding to each first display element; loading the 3D interface operation controls corresponding to each second display element into the 3D virtual scene where the second virtual display object is located, generating a second virtual display object with the 3D interface operation controls corresponding to each second display element, wherein the first virtual display object includes model data, and the second virtual display object does not include model data. Thus, the first virtual display object with model data and the second virtual display object without model data are placed in opposite positions at the same location, so that the game character can only see one virtual display object in the 3D virtual space, while being able to interact with the front and back of the virtual resource object to obtain different element information content.
[0098] For example, the first display elements in the first virtual display object include A, B, and C, and the second display elements in the second virtual display object include D and E. When the game character is in the same three-dimensional virtual scene as the first and second virtual display objects, the three-dimensional interface operation controls corresponding to the first display elements A, B, and C are loaded into the three-dimensional virtual scene, so that the first virtual display object contains the three-dimensional interface operation controls corresponding to the first display elements A, B, and C. Similarly, the three-dimensional interface operation controls corresponding to the second display elements D and E are loaded into the three-dimensional virtual scene, so that the second virtual display object contains the three-dimensional interface operation controls corresponding to the second display elements D and E. This ensures that the element information obtained by the game character through interaction with the virtual display objects from both sides in the three-dimensional virtual scene is inconsistent.
[0099] 103. When the game character interacts with the virtual display object, determine the two-dimensional operation interface corresponding to each display element.
[0100] The scene information displayed by the three-dimensional interface operation controls is consistent with the interactive information displayed by the corresponding two-dimensional interface operation controls in the two-dimensional operation interface. In this embodiment of the invention, to ensure that the game character can interact with the front and back of the virtual display object respectively and obtain different element information, it is necessary to pre-set the interaction angle ranges corresponding to the first and second virtual display objects. When the game character is in different interaction angle ranges, it can obtain information content of different display elements. Based on this, the method further includes: determining a first line connecting the center of the first virtual display object and the interactive camera, and setting a first interaction angle range corresponding to the first virtual display object according to the angle between the first line and the first normal corresponding to the first virtual display object; determining a second line connecting the center of the second virtual display object and the interactive camera, and setting a second interaction angle range corresponding to the second virtual display object according to the angle between the second line and the second normal corresponding to the second virtual display object, wherein the direction of the first normal is the same as the orientation of the first virtual display object, the direction of the second normal is the same as the orientation of the second virtual display object, and the interactive camera is filmed from the perspective of the game character.
[0101] For example, when the virtual display object is an interactive panel in a 3D virtual scene, a first line connecting the center of the first interactive panel with model data and the center of the interactive camera is determined, and the angle between this first line and the first normal corresponding to the first interactive panel is set to between +90 degrees and -90 degrees. That is, the first interactive angle range corresponding to the first interactive panel is (-90 degrees, +90 degrees). Similarly, a second line connecting the center of the second interactive panel without model data and the center of the interactive camera is determined, and the angle between this second line and the second normal corresponding to the second interactive panel is set to between +90 degrees and -90 degrees. That is, the second interactive angle range corresponding to the second interactive panel is (-90 degrees, +90 degrees).
[0102] In a specific application scenario, when the game character interacts with the front and back of the virtual display object, step 103 specifically includes: when the game character interacts with the virtual display object, determining the target interaction angle of the game character; if the target interaction angle is within the range of the first interaction angle, determining the two-dimensional operation interface corresponding to each of the first display elements; if the target interaction angle is within the range of the second interaction angle, determining the two-dimensional operation interface corresponding to each of the second display elements.
[0103] Specifically, when a game character interacts with a virtual display object, based on the game character's current position, a first line connecting the current first virtual display object and the center of the interactive camera is determined, along with the target interaction angle between this first line and the first normal corresponding to the first virtual display object. If the target interaction angle corresponding to the game character is within the first interaction angle range, it means that the game character can interact with the first virtual display object. At this time, a second operation interface corresponding to each first element object in the first virtual display object is generated. This second operation interface includes two-dimensional interface operation controls corresponding to each first element object. If the target interaction angle corresponding to the game character is not within the first interaction angle range, it means that the game character cannot interact with the first virtual display object. Simultaneously, based on the current position of the game character, the second line connecting the current second virtual display object and the center of the interactive camera is determined, as well as the target interaction angle between this second line and the normal corresponding to the second virtual display object. If the target interaction angle corresponding to the game character is within the range of the second interaction angle, it means that the game character can interact with the second virtual display object. At this time, a second operation interface corresponding to each second element object in the second virtual display object is generated. The second operation interface includes two-dimensional interface operation controls corresponding to each second element object. If the target interaction angle corresponding to the game character is not within the range of the second interaction angle, it means that the game character cannot interact with the second virtual display object.
[0104] 104. Adjust the parameters of the interactive camera so that the position of the three-dimensional interface operation control corresponds to the position of the corresponding two-dimensional interface operation control, and display the two-dimensional operation interface on the display interface.
[0105] The parameters of the interactive camera include its position and shooting angle. In this embodiment, when a game character interacts with a virtual display object, a two-dimensional operation interface corresponding to each display element is shown. To prevent the game character from feeling detached from the three-dimensional virtual scene during interaction, a two-dimensional operation interface needs to be generated without the game character's awareness. This embodiment adjusts the parameters of the interactive camera to make the three-dimensional interface operation controls corresponding to each display element correspond to the two-dimensional interface operation controls corresponding to each display element in the two-dimensional operation interface. That is, the two-dimensional interface operation controls corresponding to each display element in the two-dimensional operation interface cover the corresponding three-dimensional interface operation controls. Optionally, the remaining part of the two-dimensional interface (i.e., the background part of the two-dimensional interface) is transparent, covering the camera image captured by the interactive camera. This allows other scene content in the three-dimensional virtual scene to be displayed through the background of the two-dimensional interface, so that the player still believes they are seeing information content in the three-dimensional virtual scene during interaction. This achieves the effect that the player visually feels they are not actually interacting in the scene, rather than having opened a two-dimensional interface, thus improving the immersion in the three-dimensional virtual scene.
[0106] This invention provides an interactive method for a virtual display object. The method acquires 3D interface operation controls corresponding to each display element in the virtual display object; loads these 3D interface operation controls into a 3D virtual scene where the virtual display object resides, generating a virtual display object with the 3D interface operation controls corresponding to each display element; when a game character interacts with the virtual display object, a 2D operation interface corresponding to each display element is determined, wherein the scene information displayed by the 3D interface operation controls is consistent with the interaction information displayed by the corresponding 2D interface operation controls in the 2D operation interface; simultaneously, the parameters of the interactive camera are adjusted to make the position of the 3D interface operation controls correspond to the position of the corresponding 2D interface operation controls, and the 2D operation interface is displayed on the display interface. Therefore, by loading 3D interface operation controls that are consistent with the information content of 2D interface operation controls into the 3D virtual scene where the virtual resource object is located, when the game character interacts with the virtual resource object, the parameters of the interactive camera are adjusted simultaneously to ensure that the information content obtained by the game character before and after interacting with the virtual resource object is consistent. This can avoid the game character experiencing a sense of disconnect, improve the game character's immersion in the 3D virtual scene, and further promote the interaction between the game character and the virtual display object, thereby improving the interaction efficiency between the game character and the virtual display object.
[0107] Furthermore, to better illustrate the interaction process between the game character and the virtual resource object, as a refinement and extension of the above embodiments, this embodiment of the invention provides another method for interacting with virtual display objects, such as... Figure 2 As shown, the method includes:
[0108] 201. Obtain the 3D interface operation controls corresponding to each display element in the virtual display object.
[0109] Among them, the virtual display object can be a notice board in a three-dimensional virtual scene, and when the scope of the virtual display object is a notice board in a three-dimensional virtual scene, each display element can be a notice pasted on the notice board.
[0110] In this embodiment of the invention, based on the information content displayed by each notice in the two-dimensional operation interface, the three-dimensional interface operation blueprint corresponding to each notice can be pre-edited in the UE engine. When the game character and the notice board are in the same three-dimensional virtual scene, the three-dimensional interface operation blueprint corresponding to each notice in the notice board is obtained, and the three-dimensional interface operation control corresponding to each notice is generated based on the three-dimensional interface operation blueprint.
[0111] 202. Load the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, and generate a virtual display object with the three-dimensional interface operation controls corresponding to each display element.
[0112] In this embodiment of the invention, based on the position information of each notice on the notice board, the corresponding three-dimensional interface operation controls can be loaded into the three-dimensional virtual scene, so that the notice content seen by the game character in the three-dimensional scene is consistent with the notice content seen through the two-dimensional operation interface during actual interaction. Furthermore, by setting a first notice board with model data and a second notice board without model data, the game character can interact with the front and back of the notice board respectively, and the notice content obtained by the game character interacting with the front of the notice board is different from the notice content obtained by interacting with the back of the notice board.
[0113] It should be noted that the virtual display objects in this invention are not limited to notice boards that can be interacted with from both sides, but can also include other virtual display objects that can be interacted with from multiple sides. For virtual display objects with multiple sides, it is necessary to set a first virtual display object with model data and at least two second virtual display objects without model data. The display elements in different virtual display objects are different. At the same time, it is also necessary to set the corresponding interaction angle range for different virtual display objects. When the game character is within a certain interaction angle range, it can interact with the display elements in the corresponding virtual display object.
[0114] 203. When the game character interacts with the virtual display object, determine the two-dimensional operation interface corresponding to each display element.
[0115] The scene information displayed by the three-dimensional interface operation controls is consistent with the interactive information displayed by the corresponding two-dimensional interface operation controls in the two-dimensional operation interface.
[0116] In specific application scenarios, when the virtual display object is a notice board, the target interaction angle corresponding to the game character is determined. If the target interaction angle is within the first interaction angle range, a two-dimensional operation interface corresponding to each notice in the first notice board is determined. If the target interaction angle is within the second angle range, a two-dimensional operation interface corresponding to each notice in the second notice board is determined. The notice content displayed on the two-dimensional operation interface corresponding to the first notice board (the front of the notice board) can be an official announcement, and the notice content displayed on the two-dimensional operation interface corresponding to the second notice board (the back of the notice board) can be a wanted list.
[0117] 204. Adjust the parameters of the interactive camera so that the position of the three-dimensional interface operation control corresponds to the position of the corresponding two-dimensional interface operation control, and display the two-dimensional operation interface on the display interface.
[0118] The parameters include the position information and shooting angle of the interactive camera. In this embodiment of the invention, to ensure that the game character still feels like it is in a three-dimensional virtual scene during interaction, step 204 specifically includes: adjusting the position information and shooting angle of the interactive camera to make the position of the three-dimensional interface operation control coincide with the position of the corresponding two-dimensional interface operation control.
[0119] In specific application scenarios, the position information and shooting angle of the interactive camera can be adjusted so that the position of the 3D interface operation control corresponding to each notice coincides with the position of the 2D interface operation control of the corresponding notice.
[0120] Furthermore, by adjusting the position information and shooting angle of the interactive camera to make the position of the three-dimensional interface operation control coincide with the position of the corresponding two-dimensional interface operation control, specifically, this includes: controlling the interactive camera to move, thereby adjusting the position information and shooting angle of the interactive camera, and making the position of the three-dimensional interface operation control in the camera image captured by the interactive camera coincide with the position of the corresponding two-dimensional interface operation control in the two-dimensional interface to be displayed on the game client. Specifically, when the interactive camera moves to a preset time, an animation corresponding to the appearance of the two-dimensional operation interface is played in the game client, so that the two-dimensional interface is displayed in the game client in a fade-in manner. The preset time can be a moment before the end of the interactive camera's movement process, for example, 0.5 seconds before the end time. In this embodiment of the invention, before the two-dimensional operation interface is displayed, an interface animation is used to gradually reveal the two-dimensional operation interface. For example, if the interactive camera is performing interpolation motion, in the last 0.5 seconds before the two-dimensional operation interface is about to enter the camera's corresponding shooting area, and the interactive camera is about to stop, an interface animation is used to gradually reveal the two-dimensional operation interface, thereby improving the smoothness of the interactive effect and enhancing the immersive experience during the interaction process.
[0121] 205. In response to the triggering event of the two-dimensional interface operation control corresponding to the target display element in the first virtual display object or the second virtual display object, generate a two-dimensional full-screen interface corresponding to the target display element, and display the interactive information corresponding to the target display element in the two-dimensional full-screen interface.
[0122] The target display element can be any one of the first display objects in the first virtual display object, or any one of the second display objects in the second virtual display object.
[0123] In this embodiment of the invention, when a game character interacts with a first virtual display object or a second virtual display object, if the game character wants to read the interaction information of a first display element in the first virtual display object or the interaction information of a second display element in the second virtual display object, it will click the two-dimensional interface operation control corresponding to the corresponding display element (target display element). In response to the triggering event of the two-dimensional interface operation control corresponding to the target display element, a two-dimensional full-screen interface corresponding to the target display element is generated. The game character can read the interaction information corresponding to the target display element through the two-dimensional full-screen interface. When the target display element is a notice in the bulletin board, the interaction information corresponding to the target display element can specifically be an official announcement or an assassination list.
[0124] In specific application scenarios, after a game character reads the interactive information corresponding to a target display element, it may want to tear the target display element from a virtual display object to receive a corresponding task. To simulate the effect of the target display element being torn, the method further includes: responding to the tearing instruction of the two-dimensional interface operation control of the target display element, obtaining a tearing effect image and a back image corresponding to the two-dimensional interface operation control of the target display element; generating a square canvas corresponding to the tearing effect image with the diagonal of the tearing effect image as the side length, and placing the tearing effect image in the square canvas; during the process of the target display element being torn, taking one side of the square canvas as the tearing edge, determining the first axis-symmetrical position of the tearing effect image relative to the tearing edge, and placing the back image at the first axis-symmetrical position; and realizing the tearing effect of the two-dimensional interface operation control corresponding to the target display element through the tearing effect image in the square canvas and the placed back image. Furthermore, the step of achieving the tearing effect of the two-dimensional interface operation control corresponding to the target display element through the tearing effect image and the placed back image in the square canvas includes: responding to the tearing command, offsetting the square canvas based on the tearing edge, calculating the offset amount of the square canvas at each moment, and moving the tearing effect image in the opposite direction based on the offset amount; determining the axially symmetrical position of the offset tearing effect image relative to the tearing edge, and repositioning the back image at the axially symmetrical position; displaying a portion of the back image and a portion of the tearing effect image located in the offset square canvas, and hiding the remaining back image and remaining tearing effect image located outside the offset square canvas, so as to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element.
[0125] The specific process of achieving the tear-off effect is explained in detail using a notice in the bulletin board as an example, but the technical solution in the embodiments of the present invention is not limited to the bulletin board.
[0126] like Figure 3As shown, when a game character reads the information in a notice in the bulletin board and tears the notice by controlling the mouse, the server retrieves the tearing effect and back image corresponding to the two-dimensional interface operation controls of the notice. It then places the tearing effect image and the back image on a square canvas and their corresponding symmetrical positions, respectively. Simultaneously, the tearing effect image corresponding to the two-dimensional interface operation controls within the square canvas is displayed, while the back image corresponding to the two-dimensional interface operation controls outside the square canvas is hidden. When the game character tears the notice, the operation is actually dragging the square canvas. To ensure that the square canvas moves while the tearing effect image does not, the offset of the square canvas at each moment needs to be calculated, and the tearing effect image is moved in the opposite direction based on this offset. This creates the illusion that the tearing effect image has not moved. Figure 3 The square within the dashed frame represents the offset square canvas. Further, the position of the current tearing effect image relative to the tearing edge is determined along the second axis of symmetry, and the back image is repositioned at this second axis-symmetric position. Since only the tearing effect image and the back image within the square canvas are displayed, the portion of the tearing effect image that has moved out of the square canvas is hidden, creating the illusion of being cropped. Simultaneously, because the position of the back image is always symmetrical to the tearing effect image about the tearing edge, the hidden portion of the tearing effect image happens to become the displayed portion of the back image entering the square canvas, thus giving the game character the illusion that the notice is folded over when it is torn.
[0127] Furthermore, to simulate the effect of a notice being firmly stuck and unable to be torn off, and the effect of tearing the notice off after it has been torn to a certain extent, it is necessary to calculate the end ratio and anchor point ratio of the notice based on the center point and target diagonal of the tearing effect image. The method further includes the following steps for calculating the end ratio and anchor point ratio: determining the center point of the tearing effect image and the target diagonal perpendicular to the tearing edge; calculating the end ratio and anchor point ratio of the target display element based on the center point and target diagonal of the tearing effect image; prohibiting the offset of the square canvas when the anchor point ratio is less than a preset anchor point ratio; and hiding the two-dimensional and three-dimensional interface operation controls corresponding to the target display element when the end ratio reaches the preset end ratio. Further, the step of calculating the end ratio and anchor point ratio corresponding to the target display element based on the center point and target diagonal of the tear-off effect image includes: during the offset of the square canvas, connecting the real-time position and initial position of the midpoint of the tear-off edge to obtain the third connecting line corresponding to the tear-off edge; projecting the third connecting line onto the target diagonal to obtain the end projection corresponding to the tear-off edge; calculating the end ratio corresponding to the target display element based on the length of the end projection and the length of the target diagonal; determining the real-time distance between the midpoint of the tear-off edge and the center point corresponding to the tear-off effect image, and calculating the anchor point ratio corresponding to the target display element based on the real-time distance and the length of the target diagonal. The preset anchor point ratio and preset end ratio can be set according to the actual tearing situation of the notice in the 3D virtual scene, such as setting the preset anchor point ratio to a value in (0,1) and the preset end ratio to a value in (0,1).
[0128] Specifically, during the process of the notice being torn down by the game character, when the anchor point ratio is less than the preset anchor point ratio, it means that the notice to be torn down is a notice that is prohibited from being torn down. At this time, the square canvas is prevented from following the mouse movement, thus simulating the effect of the notice being "pinned". When the end ratio reaches the preset end ratio, it means that the notice has been successfully torn down. At this time, the two-dimensional interface operation controls and three-dimensional interface operation controls corresponding to the notice are hidden respectively, thus simulating the effect of the notice being torn down.
[0129] This invention provides another method for interacting with virtual display objects. The invention can acquire three-dimensional interface operation controls corresponding to each display element in the virtual display object; load the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element; when a game character interacts with the virtual display object, a two-dimensional operation interface corresponding to each display element is determined, wherein the scene information displayed by the three-dimensional interface operation controls is consistent with the interaction information displayed by the corresponding two-dimensional interface operation controls in the two-dimensional operation interface; simultaneously, by adjusting the parameters of the interactive camera, the position of the three-dimensional interface operation controls corresponds to the position of the corresponding two-dimensional interface operation controls, and the two-dimensional operation interface is displayed on the display interface. Therefore, by loading 3D interface operation controls that are consistent with the information content of 2D interface operation controls into the 3D virtual scene where the virtual resource object is located, when the game character interacts with the virtual resource object, the parameters of the interactive camera are adjusted simultaneously to ensure that the information content obtained by the game character before and after interacting with the virtual resource object is consistent. This can avoid the game character experiencing a sense of disconnect, improve the game character's immersion in the 3D virtual scene, and further promote the interaction between the game character and the virtual display object, thereby improving the interaction efficiency between the game character and the virtual display object.
[0130] Furthermore, as Figure 1 In specific implementation, embodiments of the present invention provide an interactive device for displaying virtual objects, such as... Figure 4 As shown, the device includes: an acquisition unit 31, a generation unit 32, a determination unit 33, and an adjustment unit 34.
[0131] The acquisition unit 31 can be used to acquire the three-dimensional interface operation controls corresponding to each display element in the virtual display object.
[0132] The generation unit 32 can be used to load the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, and generate a virtual display object with the three-dimensional interface operation controls corresponding to each display element.
[0133] The determining unit 33 can be used to determine the two-dimensional operation interface corresponding to each display element when the game character interacts with the virtual display object, wherein the scene information displayed by the three-dimensional interface operation control is consistent with the interaction information displayed by the corresponding two-dimensional interface operation control in the two-dimensional operation interface.
[0134] The adjustment unit 34 can be used to adjust the parameters of the interactive camera so that the position of the three-dimensional interface operation control corresponds to the position of the corresponding two-dimensional interface operation control, and to display the two-dimensional operation interface on the display interface.
[0135] In specific application scenarios, the parameters include the position information and shooting angle of the interactive camera. The adjustment unit 34 can be used to adjust the position information and shooting angle of the interactive camera so that the position of the three-dimensional interface operation control coincides with the position of the corresponding two-dimensional interface operation control.
[0136] In a specific application scenario, the virtual display object includes a first virtual display object and a second virtual display object. The first virtual display object and the second virtual display object are located at the same position in the three-dimensional virtual scene and face opposite directions. The display elements include each first display element corresponding to the first virtual display object and each second display element corresponding to the second virtual display object. The generation unit 32, as shown... Figure 5 As shown, it includes: a first generation module 321 and a second generation module 322.
[0137] The first generation module 321 can be used to load the three-dimensional interface operation controls corresponding to each of the first display elements into the three-dimensional virtual scene where the first virtual display object is located, and generate a first virtual display object with the three-dimensional interface operation controls corresponding to each of the first display elements, wherein the first virtual display object includes model data.
[0138] The second generation module 322 can be used to load the three-dimensional interface operation controls corresponding to each of the second display elements into the three-dimensional virtual scene where the second virtual display object is located, and generate a second virtual display object with the three-dimensional interface operation controls corresponding to each of the second display elements, wherein the second virtual display object does not include model data.
[0139] In a specific application scenario, the determining unit 33 can also be used to determine the first line connecting the center of the first virtual display object and the interactive camera, and set the first interactive angle range corresponding to the first virtual display object according to the angle between the first line and the first normal corresponding to the first virtual display object, wherein the direction of the first normal is the same as the orientation of the first virtual display object.
[0140] The determining unit 33 can also be used to determine the second line connecting the center of the second virtual display object and the interactive camera, and set the second interactive angle range corresponding to the second virtual display object according to the angle between the second line and the second normal corresponding to the second virtual display object, wherein the direction of the second normal is the same as the orientation of the second virtual display object.
[0141] In a specific application scenario, the determining unit 33 includes: a first determining module 331 and a second determining module 332.
[0142] The first determining module 331 can be used to determine the target interaction angle of the game character when the game character interacts with the virtual display object.
[0143] The second determining module 332 can be used to determine the two-dimensional operation interface corresponding to each of the first display elements if the target interaction angle is within the range of the first interaction angle.
[0144] The second determining module 332 can also be used to determine the two-dimensional operation interface corresponding to each of the second display elements if the target interaction angle is within the range of the second interaction angle.
[0145] Furthermore, the generation unit 32 can also be used to generate a two-dimensional full-screen interface corresponding to the target display element in response to the triggering event of the two-dimensional interface operation control corresponding to the target display element in the first virtual display object or the second virtual display object, and display the interactive information corresponding to the target display element in the two-dimensional full-screen interface.
[0146] Furthermore, in order to achieve the tearing effect of the display elements, the device also includes a tearing unit 35.
[0147] The acquisition unit 31 can also be used to acquire the tearing effect image and the back image corresponding to the two-dimensional interface operation control of the target display element in response to the tearing instruction of the two-dimensional interface operation control of the target display element.
[0148] The generation unit 32 can also be used to generate a square canvas corresponding to the tearing effect image with the diagonal of the tearing effect image as the side length, and place the tearing effect image in the square canvas.
[0149] The determining unit 33 can also be used to take one side of the square canvas as the tearing edge during the process of tearing the target display element, determine the first axisymmetric position of the tearing effect image relative to the tearing edge, and place the back image at the first axisymmetric position.
[0150] The tearing unit 35 can be used to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element by using the tearing effect image in the square canvas and the back image after placement.
[0151] Furthermore, the tearing unit 35 includes: a moving module 351, a third determining module 352, and a tearing module 353.
[0152] The moving module 351 can be used to respond to the tearing command, offset the square canvas based on the tearing edge, calculate the offset of the square canvas at each moment, and move the tearing effect image in the opposite direction based on the offset.
[0153] The third determining module 352 can be used to determine the second axis symmetric position of the offset tearing effect image relative to the tearing edge, and to reposition the back image at the second axis symmetric position.
[0154] The tearing module 353 can be used to display part of the back image and part of the tearing effect image in the offset square canvas, and hide the remaining back image and remaining tearing effect image outside the offset square canvas, so as to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element.
[0155] Furthermore, the tearing unit 35 also includes a calculation module 354 and a hiding module 355.
[0156] The third determining module 352 can also be used to determine the center point corresponding to the tearing effect diagram, and the target diagonal line perpendicular to the tearing edge in the tearing effect diagram.
[0157] The calculation module 354 can be used to calculate the end ratio and anchor point ratio of the target display element based on the center point and target diagonal of the tear-off effect image.
[0158] The moving module 351 can be used to prevent the square canvas from being offset when the anchor point ratio is less than a preset anchor point ratio.
[0159] The hiding module 355 can be used to hide the two-dimensional interface operation controls and the three-dimensional interface operation controls corresponding to the target display element when the end ratio reaches the preset end ratio.
[0160] Furthermore, the computing module 354 includes a connection submodule and a computing submodule.
[0161] The connecting submodule can be used to project the third connecting line onto the target diagonal to obtain the end projection corresponding to the tearing edge.
[0162] The calculation submodule can be used to calculate the end ratio corresponding to the target display element based on the length of the end projection and the length of the target diagonal.
[0163] The calculation submodule can also be used to determine the real-time distance between the midpoint of the tear-off edge and the center point corresponding to the tear-off effect image, and calculate the anchor point ratio corresponding to the target display element based on the real-time distance and the length of the target diagonal.
[0164] It should be noted that other corresponding descriptions of the functional modules involved in the interactive device for displaying virtual objects provided in this embodiment of the invention can be found in [reference needed]. Figure 1 The corresponding description of the method shown will not be repeated here.
[0165] Based on the above, Figure 1 Accordingly, this embodiment of the invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following steps: obtaining three-dimensional interface operation controls corresponding to each display element in a virtual display object; loading the three-dimensional interface operation controls into a three-dimensional virtual scene where the virtual display object is located, generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element; when a game character interacts with the virtual display object, determining a two-dimensional operation interface corresponding to each display element, wherein the scene information displayed by the three-dimensional interface operation controls is consistent with the interaction information displayed by the corresponding two-dimensional interface operation controls in the two-dimensional operation interface; adjusting the parameters of the interactive camera to make the position of the three-dimensional interface operation controls correspond to the position of the corresponding two-dimensional interface operation controls, and displaying the two-dimensional operation interface on the display interface.
[0166] Based on the above, Figure 1 The method shown and as Figure 4 The embodiment of the device shown in the invention also provides a physical structure diagram of a computer device, such as... Figure 6As shown, the computer device includes: a processor 41, a memory 42, and a computer program stored in the memory 42 and executable on the processor. Both the memory 42 and the processor 41 are mounted on a bus 43. When the processor 41 executes the program, it performs the following steps: acquiring three-dimensional interface operation controls corresponding to each display element in a virtual display object; loading the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element; when a game character interacts with the virtual display object, determining a two-dimensional operation interface corresponding to each display element, wherein the scene information displayed by the three-dimensional interface operation controls is consistent with the interaction information displayed by the corresponding two-dimensional interface operation controls in the two-dimensional operation interface; adjusting the parameters of the interactive camera to make the position of the three-dimensional interface operation controls correspond to the position of the corresponding two-dimensional interface operation controls, and displaying the two-dimensional operation interface on the display interface.
[0167] The technical solution of this invention enables the acquisition of 3D interface operation controls corresponding to each display element in a virtual display object; the loading of these 3D interface operation controls into the 3D virtual scene where the virtual display object resides generates a virtual display object with the corresponding 3D interface operation controls for each display element; when a game character interacts with the virtual display object, a 2D operation interface corresponding to each display element is determined, wherein the scene information displayed by the 3D interface operation controls is consistent with the interaction information displayed by the corresponding 2D interface operation controls in the 2D operation interface; simultaneously, by adjusting the parameters of the interactive camera, the position of the 3D interface operation controls corresponds to the position of the corresponding 2D interface operation controls, and the 2D operation interface is displayed on the display interface. Therefore, by loading 3D interface operation controls consistent with the information content of the 2D interface operation controls into the 3D virtual scene where the virtual resource object resides, and simultaneously adjusting the parameters of the interactive camera when the game character interacts with the virtual resource object, the consistency of the information content obtained before and after the interaction between the game character and the virtual resource object can be ensured, thereby promoting interaction between the game character and the virtual display object and improving the interaction efficiency between the game character and the virtual display object.
[0168] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0169] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of interacting with a virtual display object, the method comprising: include: Obtain the 3D interface operation controls corresponding to each display element in the virtual display object; The three-dimensional interface operation controls are loaded into the three-dimensional virtual scene where the virtual display object is located, thereby generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element; When the game character interacts with the virtual display object, a two-dimensional operation interface corresponding to each display element is determined, wherein the scene information displayed by the three-dimensional interface operation control is consistent with the interaction information displayed by the corresponding two-dimensional interface operation control in the two-dimensional operation interface. By adjusting the parameters of the interactive camera, the position of the three-dimensional interface operation control is made to correspond to the position of the corresponding two-dimensional interface operation control, and the two-dimensional operation interface is displayed on the display interface. The virtual display object includes a first virtual display object and a second virtual display object, which are located at the same position in the three-dimensional virtual scene and face opposite directions. Each display element includes a first display element corresponding to the first virtual display object and a second display element corresponding to the second virtual display object. The step of loading the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, generating a virtual display object with the three-dimensional interface operation controls corresponding to each display element, includes: The three-dimensional interface operation controls corresponding to each of the first display elements are loaded into the three-dimensional virtual scene where the first virtual display object is located, thereby generating a first virtual display object with the three-dimensional interface operation controls corresponding to each of the first display elements, wherein the first virtual display object includes model data; The three-dimensional interface operation controls corresponding to each of the second display elements are loaded into the three-dimensional virtual scene where the second virtual display object is located, thereby generating a second virtual display object with the three-dimensional interface operation controls corresponding to each of the second display elements. The second virtual display object does not include model data.
2. The method of claim 1, wherein, The parameters include the position information and shooting angle corresponding to the interactive camera. Adjusting the parameters of the interactive camera to make the position of the 3D interface operation control correspond to the position of the corresponding 2D interface operation control includes: By adjusting the position information and shooting angle of the interactive camera, the position of the three-dimensional interface operation control is made to coincide with the position of the corresponding two-dimensional interface operation control.
3. The method of claim 1, wherein, Before determining the two-dimensional operation interface corresponding to each display element when the game character interacts with the virtual display object, the method further includes: Determine the first line connecting the center of the first virtual display object and the interactive camera, and set the first interactive angle range corresponding to the first virtual display object according to the angle between the first line and the first normal corresponding to the first virtual display object, wherein the direction of the first normal is the same as the orientation of the first virtual display object. Determine the second line connecting the center of the second virtual display object and the interactive camera, and set the second interactive angle range corresponding to the second virtual display object according to the angle between the second line and the second normal corresponding to the second virtual display object, wherein the direction of the second normal is the same as the orientation of the second virtual display object.
4. The method of claim 3, wherein, When a game character interacts with the virtual display object, determining the two-dimensional operation interface corresponding to each display element includes: When the game character interacts with the virtual display object, determine the target interaction angle of the game character. If the target interaction angle is within the range of the first interaction angle, then a two-dimensional operation interface corresponding to each of the first display elements is determined; If the target interaction angle is within the range of the second interaction angle, then a two-dimensional operation interface corresponding to each of the second display elements is determined.
5. The method of claim 4, wherein, The method further includes: In response to the triggering event of the two-dimensional interface operation control corresponding to the target display element in the first virtual display object or the second virtual display object, a two-dimensional full-screen interface corresponding to the target display element is generated, and the interactive information corresponding to the target display element is displayed in the two-dimensional full-screen interface.
6. The method of claim 5, wherein, The method further includes: In response to the tearing command of the two-dimensional interface operation control of the target display element, the tearing effect image and the back image corresponding to the two-dimensional interface operation control of the target display element are obtained; Using the diagonal of the torn effect image as the side length, generate a square canvas corresponding to the torn effect image, and place the torn effect image in the square canvas; During the process of tearing off the target display element, one edge of the square canvas is used as the tearing edge. The tearing effect image is determined to be symmetrical about the first axis with respect to the tearing edge, and the back image is placed at the first symmetrical position. The tearing effect of the two-dimensional interface operation controls corresponding to the target display element is achieved by using the tearing effect image and the back image after placement in the square canvas.
7. The method of claim 6, wherein, The process of achieving the tearing effect of the two-dimensional interface operation controls corresponding to the target display element by using the tearing effect image and the placed back image in the square canvas includes: In response to the tearing command, the square canvas is offset based on the tearing edge, and the offset of the square canvas at each moment is calculated. The tearing effect image is then moved in the opposite direction based on the offset. Determine the position of the offset tearing effect image relative to the second axis of the tearing edge, and reposition the back image at the second axis of symmetry. Part of the back image and part of the tearing effect image located in the offset square canvas are displayed, while the remaining back image and remaining tearing effect image located outside the offset square canvas are hidden, so as to achieve the tearing effect of the two-dimensional interface operation control corresponding to the target display element.
8. The method of claim 7, wherein, The method further includes: Determine the center point corresponding to the tearing effect diagram, and the target diagonal line perpendicular to the tearing edge in the tearing effect diagram; Based on the center point and target diagonal of the tear-off effect image, calculate the end ratio and anchor point ratio of the target display element respectively; When the anchor point ratio is less than the preset anchor point ratio, offsetting the square canvas is prohibited; When the end ratio reaches the preset end ratio, the two-dimensional interface operation controls and three-dimensional interface operation controls corresponding to the target display element are hidden respectively.
9. The method of claim 8, wherein, The step of calculating the end ratio and anchor point ratio of the target display element based on the center point and target diagonal of the tear-off effect image includes: During the offsetting of the square canvas, the real-time position and the initial position of the midpoint of the tearing edge are connected to obtain the third line corresponding to the tearing edge; Project the third connecting line onto the target diagonal to obtain the end projection corresponding to the torn edge; Calculate the ending ratio corresponding to the target display element based on the length of the ending projection and the length of the target diagonal; Determine the real-time distance between the midpoint of the torn edge and the center point corresponding to the torn effect image, and calculate the anchor point ratio corresponding to the target display element based on the real-time distance and the length of the target diagonal.
10. An interactive device for a virtual display object, characterized by include: The acquisition unit is used to acquire the 3D interface operation controls corresponding to each display element in the virtual display object; The generation unit is used to load the three-dimensional interface operation controls into the three-dimensional virtual scene where the virtual display object is located, and generate a virtual display object with three-dimensional interface operation controls corresponding to each display element. The virtual display object includes a first virtual display object and a second virtual display object. The first virtual display object and the second virtual display object are located at the same position in the three-dimensional virtual scene and face opposite directions. Each display element includes each first display element corresponding to the first virtual display object and each second display element corresponding to the second virtual display object. The determining unit is used to determine the two-dimensional operation interface corresponding to each display element when the game character interacts with the virtual display object, wherein the scene information displayed by the three-dimensional interface operation control is consistent with the interaction information displayed by the corresponding two-dimensional interface operation control in the two-dimensional operation interface. The adjustment unit is used to adjust the parameters of the interactive camera so that the position of the three-dimensional interface operation control corresponds to the position of the corresponding two-dimensional interface operation control, and to display the two-dimensional operation interface on the display interface. The generation unit is specifically configured to load the three-dimensional interface operation controls corresponding to each of the first display elements into the three-dimensional virtual scene where the first virtual display object is located, thereby generating a first virtual display object with the three-dimensional interface operation controls corresponding to each of the first display elements, wherein the first virtual display object includes model data; and to load the three-dimensional interface operation controls corresponding to each of the second display elements into the three-dimensional virtual scene where the second virtual display object is located, thereby generating a second virtual display object with the three-dimensional interface operation controls corresponding to each of the second display elements, wherein the second virtual display object does not include model data.
11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 9.